Can't work out how to cap holes in this simple brep

The attached isolated example produces a brep which is open on the top and front sides. I need to cap these holes (pretty much like the icon for Cap Holes Ex). Neither Cap Holes or Cap Holes Ex get the job done, and all my (newbie) attempts in C#/RhinoCommon have failed. I’m sure I’m missing something simple. I’d like to know how to do this both using components and using C#, as this will help me to learn.


Problem1.gh (9.3 KB)

Hi @Tom_Glastonbury,

When this form is baked to Rhino and attempted to be capped it says there are no closed planar loops, which leads us to the issue of these “open” corners.

I added a little logic to give you a “side face”, merge the results, and then cap that result.

Perhaps you could update your code to include the top face or side face generation and then that will make for an easier capping process?

Another user may have a more proper or elegant solution but I hope this helps you for now.

Cheers!

Model Space:

Graph Space:

20240412_Problem1_Response_01a.gh (21.6 KB)

1 Like

missing
missing2

R8? Yep. Pretty easy to see the problem. How you fix it is up to you. Seems to me that the C# failed?

R8, latest update. The C# works (ie, executes without error and produces a non-null result) for me. In your last screenshot, are you suggesting that the different coloured lines indicate a problem? Please could you explain, as it’s not obvious to me.

Why didn’t the C# create a closed brep? It left two adjacent edges open, which is not a “hole” that can be capped automagically.


Problem1_2024Apr12a.gh (17.5 KB)

Join Curves creates the perimeter curve for one missing face, which Brep Join adds to the ‘Open Brep’ from C#, leaving only one planar hole for Cap Holes to close.

1 Like

Hi @Tom_Glastonbury,

If you bake your Brep and then run Rhino’s Cap command, you’ll see this message:

Unable to cap one object. The openings did not have closed, planar loops of edges.

Basically, the Brep doesn’t have any holes to to cap.

– Dale