[Plugins] TriangulateAllFaces v1.2 20131020

[Plugins] TriangulateAllFaces v1.2 20131020

Postby TIG » Thu Oct 17, 2013 7:00 pm

Copyright 2013 TIG (c)

Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided that the
copyright notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Name: TriangulateAllFaces.rb

Usage: Plugins > "TriangulateAllFaces"
Processes all Selected Faces: Triangulating them, with a 'split'.
Non-Tris are first Triangulated, then those Triangles are split.
If there is no Selection then ALL Faces in the Current Context are processed.
A dialog asks for 'Bisect-Angle' or 'Centroid' mode for the 'split' of the face.
The last used mode is reused during that session.
UV-mapping is preserved.
It is one step undoable.

Version:
1.0 20131017 First issue.
1.1 20131018 Triangulation improved. Triangles split 'centrally'.
1.2 20131020 Dialog choice of Bisect-Angle or Centroid modes.

Download from the SCF PluginStore

Download

or get the SketchUcation Plugin Store tools and AutoInstall it from within SketchUp itself... http://sketchucation.com/resources/plug ... e-download
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby anar » Thu Oct 17, 2013 7:56 pm

It doesn't exacly do what was expected but it's OK with me because it does subdivide and preserve boundary edges which is what I was after.
Thanks TIG !

I will have to test it on a more complex example.




0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby anar » Thu Oct 17, 2013 8:08 pm

I just tested it on a more complex surface and it seems ther is some problems (?).

In red : edges seem to be not coplanar
In green : it generates "spikes" (long triangles)

But it looks promising !



0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby TIG » Thu Oct 17, 2013 9:31 pm

How big is that test piece ?
Intersections of small geometry is known to cause issues. :?
If it's temporarily scaled up x100 does it still happen ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby anar » Thu Oct 17, 2013 11:23 pm

It's a big piece.
Because I know SU limitations with small faces (I've been using it since it's first release) I always work in meters.

The smallest face before use of your plugin is about 5m x 5m x 6,5m.
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby TIG » Fri Oct 18, 2013 9:34 am

I'm working on v1.1... watch this space... ;)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.0 20131017

Postby anar » Fri Oct 18, 2013 9:35 am

I do !
I press "F5" every 30mn...

Thanks TIG !
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby TIG » Fri Oct 18, 2013 11:00 am

Here's an update, v1.1 viewtopic.php?p=495430#p495430
It now handles non-Tris and splits better, centralizing them; incidentally, it now also preserves UV-mapping of textures etc...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby anar » Fri Oct 18, 2013 11:06 am

You rock !
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby anar » Fri Oct 18, 2013 11:14 am

Works like a charm on that test :
Test_part_before.jpg

Test_part_after.jpg
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby pilou » Fri Oct 18, 2013 11:16 am

Very cool ...and fractalisissimo (if you repeat the function) ...but that is not yet "median" ! ;)
only 3 triangles at start! :)

nomedian.jpg
0
Last edited by pilou on Fri Oct 18, 2013 3:49 pm, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby anar » Fri Oct 18, 2013 12:58 pm

Could be made even better if it was producing a symmetrical result.
But for now I'm very happy with this V1.1 !

Subdivide5.jpg

Subdivide6.jpg
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby anar » Fri Oct 18, 2013 1:07 pm

Pilou wrote:...but that is not yet "median" ! ;)


And if it was I know of some people that would be very interested :
http://mathforum.org/sketchup/
0

anar 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby jumpjack » Fri Oct 18, 2013 2:43 pm

Can the plugin also triangulate already triangular faces, i.e. split it into smaller faces? It would be useful if you need to usce the sculpt plugin.

What about the "opposite" of this plugin? De-triangulate faces would be very useful after importing an STL file!
0

jumpjack 
 

Re: [Plugins] TriangulateAllFaces v1.1 20131018

Postby TIG » Fri Oct 18, 2013 3:03 pm

It only triangulates triangular faces !
BUT... any faces that aren't triangular [>=4 sides], are first triangulated... :D

To triangulate non-triangular faces, you could also use my 'Triangulate Selected Faces' tool...

They will both maintain UV-mapping etc.

Find my Quadrilateralizer tool that makes all selected faces into 'quadrilaterals' - first it triangulates any with >4 sides, the divides the triangle into 3 quadrilaterals etc - [it's probably not the result you hope for - but then it will be all quadrilaterals...]

Also look at thomthom's Quad-Face toolset...

Just try tkem and see what these things do :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.2 20131020

Postby TIG » Sun Oct 20, 2013 1:17 pm

Here is v1.2 viewtopic.php?p=495430#p495430
Now dialog let's you choose Bisect-Angle or Centroid mode for the triangulation splits...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugins] TriangulateAllFaces v1.2 20131020

Postby tomot » Sun Oct 20, 2013 7:36 pm

very nice TIG: I love this stuff: :bounce:

I was wondering if you could take a look at separate Ruby using Voronoi Tesselation
I found some code that might help but needs Ruby interpretation.
http://bl.ocks.org/mbostock/4060366

Cheers!
0

tomot 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Google Bot, onzki and 13 guests

Visit our sponsors: