This detects much more objects as cylinders, even objects that are not cylinders. You can download this file: The objects with green wirecolor are …
aaandres: If you are talking about the scene with two cylinders that you have shared, my last code finds them as cylinders (in 11ms to be more preci…
My first code, posted here also works: ( function FindCenterOfCircle p1 p2 p3 = ( fn barycentricToWorld p1 p2 p3 u v w = (u*p1 + v*p…
PolyTools3D: As you can see, I did not include any time measurement in the code, which means it is not meant to be measured, it is just a generic id…
I use threshold value of 0.1 and the results above are using 0.1. P.S. When I am not at work my phone is somewhere in the house.
Thank you to all. All methods works fine and I use all of them. Aandres, your first method finds 62 cylinders(300 ms). The Polytools method finds 59…
The caps should be always 2. If there is only one cap the code will works the same way. My version of the script uses shortest edges, so there is no m…
If I use this” elem1_total_radius /= elem1edgesVerts.numberset [code/] for the 3 elements(with proper variables) the result is the same. Or maybe I …
I have this so far. ( o = snapshotAsMesh $ meshop.autoSmooth o #{1..o.numfaces} 89.9 smoothGroups = #() for i=1 to o.numfaces do …
If this have to return if the object is cylinder or not: case of ( ((abs (elem1_total_radius – elem2_total_radius)) < 0.001) : t…
Serejah: just an idea maybe we can use smoothgroups to determine if mesh has two caps? ( obj = snapshotAsMesh $ meshop.autoSmooth obj…
Yes, the side faces are not quads. If they was quads then I can easily find the longest edges(polygons) and sue them to find the caps.
denisT: after thinking a little it looks pretty simple but… #1 it must not be reset xform #2 it must not be deformed now we know that a “cylinder…
In the scene you can see the cylinders looks. All of them have multiple sides(more than 10), and all of them have two caps. All cylinders have non zer…