Is Trimmed

How do I find is a surface is trimmed in rhino common?

I have a brep selection, which I filter out the surfaces, but now I want to further separate out the trimmed and untrimmed srfs:;

If obj.IsSurface() Then
Dim srf As Rhino.Geometry.Surface = obj.Faces(0)
if srf.isTrimmed()Then

Do this
do that
end if
end if

Kinda thing


Hey tom

First of all: brep.IsSurface returns true if the brep is a single surface and is untrimmed.

Generally speaking, a brep is a surface if it only contains a single face, and a polysurface if it contains multiple. So you can use the length of obj.Faces to determine that part.

For trimming: If it’s a single surface, brep.IsSurface returns true if it’s untrimmed. If it’s a polysurface on the other hand you will have to iterate over all faces and check that each one of them is untrimmed (face.IsSurface).

Hope that helps

1 Like