# Union for solid model

**URL:** <https://discourse.mcneel.com/t/union-for-solid-model/193365>\
**Category:** Rhino Developer\
**Tags:** windows\
**Created:** [October 19, 2024, 1:56pm UTC](https://discourse.mcneel.com/t/union-for-solid-model/193365 "2024-10-19T13:56:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smartunfold](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/smartunfold/32/635352_2.png) [@smartunfold](https://discourse.mcneel.com/u/smartunfold)\
**Post date:** [October 19, 2024, 1:56pm UTC](https://discourse.mcneel.com/t/union-for-solid-model/193365/1 "2024-10-19T13:56:02Z")

</div>

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](https://discourse.mcneel.com/uploads/short-url/2oHcCSKABMisWhFdKXVpu7Yvl2D.3dm) (161.4 KB)

---

<div class="post-metadata">

**Author:** ![Tom\_P](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tom_p/32/766520_2.png) [@Tom\_P](https://discourse.mcneel.com/u/Tom_P)\
**Post date:** [October 19, 2024, 2:38pm UTC](https://discourse.mcneel.com/t/union-for-solid-model/193365/2 "2024-10-19T14:38:12Z")

</div>

## in Rhino

 ![Screenshot 2024-10-19 at 16.32.25](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/1/a/21a6c9f0246b5789e3ff32b223ed8e7ca92b356c.png)  
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](https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/capplanarholes)

join  
[https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/joinbreps](https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/joinbreps)

## API / C++

… I don t know …
