Get brep Interior curves

Hello guys.
I’m developping a grasshopper component using c#.
I’m I have this brep that has naked edges and interior edges. I can easily get naked edges. but cannot get interior edges.
can anybody help me with this problem ? it’s driving me crazy.

!
thanks
Youssef.

The way is to check Valence.

If Valence is 1 - it is naked (edge has one face)
If Valence is 2 - it is interior (edge shares 2 faces)
If Valence is more - it is non-manifold (edge shares more than 2 faces)

For naked you can use https://developer.rhino3d.com/5/api/RhinoCommon/html/M_Rhino_Geometry_Brep_DuplicateNakedEdgeCurves.htm

but since you want interior also you might as well get naked from the Valence checking.

1 Like

It worked Like magic. thank you so much

Here is the code :
var allEdges = brep.Edges;
int l = 0;
foreach (BrepEdge brepEdge in allEdges)
{

            if (brepEdge.Valence == EdgeAdjacency.Interior)
                interiorEdges.Add(allCurvesEdges[l]);

                l++;
        }
2 Likes