[REQ] triangulation ruby
-
I have no idea how easy this is to make, but I'd really appreciate if anyone could take a stab at creating a ruby that can triangulate all rectangular polygons to triangles.
If possible to have a few different triangulation options, see image.
If possible can it triangulate with say 1,2,3 iriterations as well as 3 different patterns?
The reason I'd like this is for a new 'organic' modeling method I have brewing.
thanks for consideration.
-
Could you guarantee that all quads are truly quads in your process? ie, not actually triangles with an inner edge smoothed so it just looks like a quad?
If this really only needed to be developed for quads, then yes, it should be quite do-able I think.
Chris
-
i think TIGs written such a plugin already, called something like triangulate.rb im sure a quick search will throw up some results. It wouldnt do your different methods of triangulation but its a start.
-
My triangulateQuadFaces.rb already triangulates quad faces successfully but always from vertex[0] to vertex[2].
It's here http://forums.sketchucation.com/viewtopic.php?p=201025#p201025
You seem to want a subdivide option on top of that?
My [and CJP's and TT's!] triangulateFaces.rb triangulates any face successfully but is 'messy', just like auto-fold ! http://forums.sketchucation.com/viewtopic.php?p=175613#p175613 -
TIG, you are correct, I want to use it with the SDS plugin, the current triangulation does not work well on all shapes, so if I had more ways to triangulate before subdivision the better and smoother results I can accomplish.
-
TIG, I downloaded both the ruby's and they work great for triangulating quads, and they seem to triangulate differently from each other (I did a test with a box), however they only split the quad, so they can only do 1 iriteration. Now id another ruby can be added to split a triangle into two, that would be awesome.
Or... one ruby with an options panel, thus incorporating all triangulation/splitting ruby's into one.
-
The 'basic quad' version always divides a four-sided face from its vertex[0] to its vertex[2] wherever they are.
The 'general' version triangulates quads and upwards, but this uses the API mesh methods to divide the faces - this seems to take a face and divides it up from the first vertex it finds - which might be nearest the camera ? Therefore the results can differ...They have a built in check and ignore any three-sided faces as they are already triangulated.
You could run [a yet to be invented script] 'subdivideAndTrianglulateQuadFaces()'...
Which subdivides each quad-face into a triangle [AND beyond], which is overlaid so that you have your 3/4/5th option for the subdivision: however, your 6th version needs to be done to the quad first as it becomes 4 quads then subdivided [its sibling is type-4]...It's quite possible - any other ideas before I sleep on it ?
-
Yea, that sounds awesome.
If it can group after triangulation that would be very handy when you need to SDS just parts of a model/mesh.
-
other opcion is subdivideSelected.rb (in English) of wikii.
has two options.
- division triangular
- division rectangular
-
Solo
So, if your Mandarin is up to it, then it might already exist ?
-
ooooh!
Anyone able to translate that ruby? is it free? how can I get an English version?
-
hey Pete,
wikii is a member here and i think that tool is included in SUtools?
http://forums.sketchucation.com/viewtopic.php?f=180&t=14480
the download link is missing now though.. maybe PM him?
[edit] oops, fixed link.
-
the plugin is free and simple of traslate
-
Could somebody post a link to the ruby? It looks like a plugin I could use as well.
thanks!
s -
Here's a tweaked version of it, I've given it a Plugins submenu 'Subdivide Selected' with the two options of 'At Vertices' and 'At Mid-Points'.
I also made a few minor adjustments and moved the midpoints def inside of the main def wrapper to avoid clashes with others...
Seems to work fine.
Hope wikii doesn't mind...
subdivideSelected.rb -
exelente tig. thank you very much.
Maybe, Jim can add this option to plug protrudes, NO?
-
Thanks TIG. Plugin works great for me. Curious to see Pete's new SDS method.
-
Thanks a bunch TIG, this should do the trick.
Adam, I am planning to use this division with Sculpt tools and SDS. Sculpt tools works great for moving vertices on pre-divided meshes, I feel like I have more control over what to expect from the subdivision now.
-
Moved the thread to the Developer's forum. We have reorganized so that the Plugin section is only a list of plugins you can download and use.
Advertisement