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.
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.
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.
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.