Do you know ways of extracting aligned edges loops from mesh?


mesh sample.stl (167.9 KB)
In a mesh like this ^ we can see some parts being some generic triangulation, but some others being from obvious solid boolean operation from a revolved shape.

Edges there have a more coherent structure, if we “pair up” edges around every vector we might able to retrieve “U” and “V” isocurves/polylines of the original revolved shape.

Do you know any tool or logic to go in this direction?

(A first step would be to quadrangulate the mesh, probably… but maybe not, I might want to avoid the risk of deleting useful edges…)

Edit: I need to extract every edge-chain loops.

Hi @maje90,

I’m mobile and can’t check right now but does selchain work on mesh edges?

There’s also selU which selects in the U direction but I think that’s points only if I remember right.

1 Like

Hi Michael.

I didn’t know selchain command, pretty useful.
(I usually go CTRL+SHIFT + double click, but selchain is more powerful indeed)

Thanks!

But I made a mistake, I should have said that this is for a coded context, no manual input.
I need all and every loops.
Best would be to have this inside c# , rhinocommon… but if it’s a plugin it’s ok…

Hi Riccardo,

i’ve tried something which might be a first step for further refinement:

The script loops over topology edges and finds the 2 connected triangles. It then finds the point on each triangle which is not on the edge. This is the origin to measure the angle of each triangle which should be close to 90 degree. If both triangle corner angles are within tolerance (i used 1.55 degree) it compares the difference between both face normals (0.02 degree) and selects the faces if it stays below normal tolerance.

In a second step you could extract the faces, filter mesh parts eg. if they have only 2 faces. Then from the rest duplicate the borders and split the polylines at the sharp angles which are all close to 90 degree…

MeshRectDetect.py (2.9 KB)

it might not be super fast on larger meshes. What is it btw. ?
_
c.

2 Likes

wow, thank you clement!

I’ll study this! Nice!

Yes, that chunk is about 1/100 of the total… but it’s no problem, I’ll try to convert your script into c# and multithread it there.

I’d rather not say in specific, but as said, the task is to re-retrieve the plane/axis of each revolved detail in a mesh…


Thank you again!
Have a nice weekend!

You could unweld the mesh and fit circles through the vertices of joined segments.

It would be easier if the inner upper edge of the conical hole wasn’t filleted.

unweld_mesh_edge_02_c.gh (29.9 KB)

2 Likes

That’s interesting… but I need “all” the edge-loops, with the unweld I can reach only some edges, not all.

Anyway thanks, that’s another idea to put in the mixer.

1 Like