Jump to content
Bob Wagner

Triangulation Again

Recommended Posts

Does anyone have in their collection of code an algorithm to triangulate a 3D polygon. In version 10.5, I did this by Converting to Nurbs then converting to 3Dpolys. This doesn't work in 12.5, not unless you choose each nurb surface and set its U and V value to 2. This I haven't worked out how to do in a plugin. At the moment I export as 3DS and re-import the 3Ds file. This might be ok for now but not what I really want.

Why do this you ask? Well I have my unfolding working pretty well, but it all requires a model to be triangulated.

Unfolding.jpg

Share this post


Link to post

//calculate the number of vertexia & faces in symmetry triangle

//This is based on the class type

//First the polyhedron face...

for(i=1; i<=frequency; i++){

if(i == 1)

vertex = 3;

else

vertex += (i + 1);

}

faces = frequency * frequency;

edges = (vertex + faces) - 1;

{ frequency is the number of edge subdivisions of the triangle }

Share this post


Link to post

Thanks for this. However I already an cope with this, the problem is actually dividing the big polygon into the individual triangles.

Number of sides -2, is how many triangles minimum needed. however you have to check for turns left and right and check it the triangle actually formed is in the original polygon etc.

Bob

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...