Union for solid model

Hi guys,
Attached is the model I tried to use the api:

bool rc = RhinoBooleanUnion(breps_all, tol, &bResult, final_Breps);

The api works fine for regular shapes, e.g. if the vertical part is straight or the fillet solid is 90 degree. However, it has problems once I use all different shapes to test it, it gives me error sometimes. The attached model has 3 solid, the API will not return a single solid, it return two solid. I try to use rhino command to create a single solid, it fails also.

Now my question, can I use some tools to repair the model before I call this API?

Thank you.
Regards
John

bend test ERR.3dm (161.4 KB)

in Rhino


those 2 polysurfaces are open, they miss a surface at the connection to the bow.

1st workflow

_cap
_booleanUnion

2nd workflow

or / alternative:
delete the end-surfaces of the curved part
→ sub-select
_delete
_join

API / Rhinocommon

cap
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/capplanarholes

join
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/joinbreps

API / C++

… I don t know …

1 Like