Combine Trimmed Surfaces that share the same untrimmed reference surface

Hi All,

I’m wondering if there is a way to obtain a single surface from multiple trimmed surfaces that all have the same untrimmed reference surface. To provide an example, I have 2 surfaces that are trimmed surfaces of the same untrimmed surface.

image

Currently, I manually extract the boundary curves, explode them, retain the outline of those parts, and then trim the reference surface.

Is it possible for a script that can produce the above result as an output?

image

For each BrepFace (that’s how it’s called a similar sheet like piece) in your collection get the Outer Loop (as Curve) then do a bool Union; If the yields more than one Crv (like in the image below) and you want the outmost … just Order’m by length (or by Containment: that’s the general case: many Faces etc etc).

Notify if you want a C# that does that against any collection of Faces (planar or not).

But IF you are not interested on Clustering (meaning what by Index is in contact to what etc etc) and for simple cases you can do that as well (Used Crvs that yield Faces but if you have Faces skip that):

From:

To:

These scripts will merge adjacent faces trimmed from the same NURBS surface if the faces haven’t later been _ShrinkTrimmedSrf, etc.

1 Like