# Problem with Closed BREP

**URL:** <https://discourse.mcneel.com/t/problem-with-closed-brep/51876>\
**Category:** Grasshopper\
**Created:** [December 20, 2017, 7:39pm UTC](https://discourse.mcneel.com/t/problem-with-closed-brep/51876 "2017-12-20T19:39:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yigit](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/yigit/32/473016_2.png) [@yigit](https://discourse.mcneel.com/u/yigit)\
**Post date:** [December 20, 2017, 7:39pm UTC](https://discourse.mcneel.com/t/problem-with-closed-brep/51876/1 "2017-12-20T19:39:28Z")

</div>

Hi,

I need a closed BREP for calculating Volume and some other details.

I have tried MERGE to join BREPs (in red circles) as shown on PNG… than, CAP this joined BREPs… But NO success…

What is wrong with my algorithm??

Please help…

[Volume\_Analysis.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/c/3/c37ef19c06451f6620f3f463a60b8c308326e5e7.gh) (16.3 KB)  
[Volume\_Analysis.3dm](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/5/855e3e936bdfe741d8c2bb28552b10fc78558120.3dm) (276.2 KB)

 ![Volume_Analysis](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/6/7/6773b41b7f82908d40a2aa79c97a040b555881d3.png)

---

<div class="post-metadata">

**Author:** ![mattgaydon](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mattgaydon/32/558287_2.png) [@mattgaydon](https://discourse.mcneel.com/u/mattgaydon)\
**Post date:** [December 20, 2017, 9:28pm UTC](https://discourse.mcneel.com/t/problem-with-closed-brep/51876/2 "2017-12-20T21:28:12Z")

</div>

Though there is issues with the GH code it seems from analysis of your input Geometry in the Rhino file using ShowEdges command that if you joined the half of the hull it would leave naked interior edges on the bow. (See Pink line where cursor is in image below) I fixed this by manually joining those edges first then the rest of the hull before putting it into Grasshopper

 ![image](https://global.discourse-cdn.com/mcneel/original/3X/b/a/bace953e14647feec9575a028cd93645e3033f84.jpg)

Also the Hull in the Rhino geometry did not have a stern piece modelled. So cap would not work as there was no planar loops to close.

With a stern piece and not naked edges on the first half of the hull in Rhino, Then all the code you need is this.

 ![image](https://global.discourse-cdn.com/mcneel/original/3X/3/8/38fa431a83df49ae4d2ae8cb82818bd6384179d4.jpg)

---

<div class="post-metadata">

**Author:** ![yigit](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/yigit/32/473016_2.png) [@yigit](https://discourse.mcneel.com/u/yigit)\
**Post date:** [December 21, 2017, 10:13am UTC](https://discourse.mcneel.com/t/problem-with-closed-brep/51876/3 "2017-12-21T10:13:08Z")

</div>

Thank you Matt… Problem solved
