BrepFace.DuplicateFace does not work on this Brep (Explode Brep)

In my code i pick 2 curves, rebuild them with degree “1” and 5 points (red). Then i create a Brep.CreateFromLoft (blue).

The resulting Brep has only 1 face (BrepObject.Faces.Count), 1 surface, and 4 edges.

In Rhino i have no problem exploding the polysurface into 4 surfaces.

In code i can not get the 4 surfaces by looping Brep.Faces → BrepFace.DuplicateFace because there seems to be only one face (surface).

What am i doing wrong?
Maybe because all 4 surfaces are the same? But how does the explode command in Rhino do it?
Can not find the ExplodeBrep Sample in mcneel/rhino-developer-samples

Thanks

Hi @seppeldue,

if CreaseSplitting is disabled, you’ll get a single surfaced brep from your loft using polylines. To change the brep into seperate faces use:

brep.Faces.SplitKinkyFaces()

_
c.

1 Like

@clement
Thank you very much! I still struggle to fully grasp the concept of “Brep”. Faces, surfaces, trim info… is there a good resource to read up on this?

Hi @seppeldue, below are two links which might be useful to understand the concept:

_
c.

2 Likes