Extract underlying surface from Brep

Hello,
Can anyone please help me properly extract the underlying trimmed surface from Brep?


Hello, @leopoldomonzani,
It is easy to do with the Grasshopper’s native components… I want it inside my GH C# protect using VS. Also, the image I provided is just for sample, the curves tend to be more than 2 (see pic).
anyway, thank you so much. :pray:

Hi @Bakuri_Gogua,

Can you post a .GH file that doesn’t work the way you want? Also please provide a .3DM file that contains both the result you are looking for?

Thanks,

– Dale

Hi @dale, I have it in my C# Visual Studio project, so I can’t technically provide that component, but upload the files:

  1. the code behind
  2. image

rhino.3dm (41.7 KB)
gh.gh (2.9 KB)

Hi @Bakuri_Gogua,

See the attached.

TestBakuri.gh (6.1 KB)

– Dale

@dale, my apologies; I could not clearly explain what I want. I want the result of the Rhinocommon method Brep.CreatePlanarBreps() as Surface inside my project (VS C#), to manipulate on it. ( CreatePlanarBreps() returns the trimmed surface but is as a Brep array).

Hi @Bakuri_Gogua,

In your case, the results of Brep.CreatePlanarBreps cannot be represented as a surface because it has “holes”. Thus, it must be represented as a Brep.

If the Brep has a single face and that face is geometrically the same as the underlying surface (i.e., the face has trivial trimming), then it could be represented by a Surface.

– Dale

Hello @dale,
I got it, thanks :pray:.
Just a quick question, does this mean that the GH native component “Boundary Surfaces” uses a different method? because it returns the results as Surface.
Is it possible to extrude the resulted trimmed surface(Brep) using Rhinocommon? What is the best way?

If you pass in a single curve and that curve is a polyline curve, then the Boundary Surfaces component uses Brep.CreateFromCornerPoints to create the Brep. If the resulting Brep has a single face and that face is geometrically the same as the underlying surface, then GH will report it as an untrimmed surface.

– Dale

1 Like

:pray: :pray: :pray: