miauu
@miauu
New Member
Joined: Feb 14, 2024
Topics: 122 / Replies: 1116
Reply
RE: How to find if the object is cylinder?

This detects much more objects as cylinders, even objects that are not cylinders. You can download this file: The objects with green wirecolor are …

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

My first code, posted here also works: ( function FindCenterOfCircle p1 p2 p3 = ( fn barycentricToWorld p1 p2 p3 u v w = (u*p1 + v*p…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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.

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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 …

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

I have this so far. ( o = snapshotAsMesh $ meshop.autoSmooth o #{1..o.numfaces} 89.9 smoothGroups = #() for i=1 to o.numfaces do …

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

If this have to return if the object is cylinder or not: case of ( ((abs (elem1_total_radius – elem2_total_radius)) < 0.001) : t…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

Serejah: just an idea maybe we can use smoothgroups to determine if mesh has two caps? ( obj = snapshotAsMesh $ meshop.autoSmooth obj…

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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.

7 years ago
Forum
Reply
RE: How to find if the object is cylinder?

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…

7 years ago
Forum
Reply
RE: How to find if the object is 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…

7 years ago
Forum
Topic
Forum
Replies: 42
Views: 105
Page 31 / 83