How to untrim one of trim edges while keep inner loops in C#?

Hey, everyone! Is there a way to remove one of trim edge while keep inner loops in C#?

UntrimSpecialEdge.gh (1.2 KB)

do you need this in a more complex scenario or for planar Surfaces only ?

in complex surface not planar, it’s easy to untrim the outer loops in Rhino, but i dont konw how to untrim in C#

my guess you have to rebuild the brep.
As far as i searched, there is no “delete Edge, delete 2d Curve, delete loop” or similar functionality exposed to Rhinocommon

less code and hazzle

  • get the inner loops from the surface as 3d Curves
  • get the underlaying surface and create a “isSurface” Brep
  • Split it with the curves
  • search the part, that has all 4 corner points / u-v-Domain min, max

more code, more hazzle, maybe more precision

my recommendation:
follow the first approach and only if there are any problems go the second way.

if nothing works comment with an "AT"Dale - so he might chime in.

kind regards - tom

Hi @朱钟鸿,

There are no functions, in the Rhino SDK, to untrim Breps. I’ve logged the wish.

– Dale

Thanks bro, extract and resplit is a way, but not efficient because split operation is too slow. Dale said that there are no functions in the Rhino SDK, This is my solution:

1.reconstruct the planar holes surface(easy and quickly)

2. remap it back to the complex surface Brep.CopyTrimCurves.

And SampleCsFaceWithHole.cs seems to work on complex planes as well*?*

This is my solution:

1.reconstruct the planar holes surface(easy and quickly)

2. remap it back to the complex surface Brep.CopyTrimCurves.

And SampleCsFaceWithHole.cs seems to work on complex planes as well?There is another unbelievable solution:

I extracted the outer loop of underlaying surface and inner loops of complex surface, then used them to create face with hole, it works unbelievable!!!

RebuildTrimmedSurface.gh (132.0 KB) it works but i dont konw why

RebuildTrimmedSurface.gh (132.0 KB) it works but i dont know why