# Remove inside opening curves

**URL:** <https://forum.dynamobim.com/t/remove-inside-opening-curves/54339>\
**Category:** Uncategorized\
**Created:** [August 22, 2020, 12:24am UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339 "2020-08-22T00:24:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [August 22, 2020, 12:24am UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/1 "2020-08-22T00:24:32Z")

</div>

Hi, does anyone have a good method for removing inside opening curves of a perimeter curve. Such as window opening curves. I’ve been trying to extract the curve lines from a list when there’s 8 or 12 but no luck. Also trying to group curves in sub lists to try get surface areas and remove lowest but no luck.

Not bounding box

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [August 22, 2020, 1:43am UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/2 "2020-08-22T01:43:49Z")

</div>

Without seeing the dataset, I would suggest trying this one?

> [@Grouping Curves with Design Script](https://forum.dynamobim.com/t/grouping-curves-with-design-script/15122):
>
> Design script definition that groups a list of shuffled curves into loops… On the package manager search for tstngwtrs-GroupCurves However the node doesn’t need to be downloaded, paste the below code in a code block and call grpCrvs(crv) def grpCrvs(crv:var[]..[]) { dis1 = (crv.StartPoint)\<1\>.DistanceTo(crv\<2\>)==0 ||(crv.EndPoint)\<1\>.DistanceTo(crv\<2\>)==0; ind1 = List.AllIndicesOf(dis1\<1\>,true); bln1 = true; ind2 = [Imperative] { …

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [August 22, 2020, 5:10am UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/3 "2020-08-22T05:10:11Z")

</div>

pretty cool, although struggling on the repatch

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/4/646cd4d519a667077dd698984ab1e006891b995e.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 22, 2020, 12:57pm UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/4 "2020-08-22T12:57:03Z")

</div>

What is the error on the Polycurve.ByJoinedCurves node?

The GroupCurves node in Archilab May be a better route for this as there appears to be an issue with your custom node. The input has 9 curves in the first sub list and your output has at least 12 curves in it.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [August 22, 2020, 1:22pm UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/5 "2020-08-22T13:22:33Z")

</div>

> [@vanman](#):
>
> struggling on the repatch

If there aren’t intersecting/overlapping curves you could try extracting the longest PolyCurve from each sublist

 ![wallsWithoutOpenings_2020-08-22_06-49-49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/f/cfbdcb6fef9fb1e2b12087ed2f731c8426f9b21d.png)  
[wallsWithoutOpenings.dyn](https://forum.dynamobim.com/uploads/short-url/hfGN8agcW5NNtn0j1VUW9k5XFmG.dyn) (20.7 KB)

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [August 22, 2020, 10:37pm UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/7 "2020-08-22T22:37:15Z")

</div>

Thanks @jacob.small I get the error “Warning: PolyCurve.ByJoinedCurves operation failed.  
Curve join produced more than one WIRE in PolyCurve”. So I read somewhere rounding the curve length up may help but Line.Direction gives me the error “Warning: PolyCurve.ByJoinedCurves operation failed. Curve join produced more than one WIRE in PolyCurve”. Testing extending curve is not the answer which Im guessing you probably knew 🙂

I tried Archilab group curves with all sorts of lacing but its not handling the curves in a sub list.

Thanks @Vikram_Subbaiah thats a good idea. Works awesome. I’m just loosing some surface patches. I think its due to the above issue with some PolyCurve.ByJoinedCurves.

Warning: PolyCurve.ByJoinedCurves operation failed.  
Curve join produced more than one WIRE in PolyCurve

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 23, 2020, 4:06pm UTC](https://forum.dynamobim.com/t/remove-inside-opening-curves/54339/8 "2020-08-23T16:06:33Z")

</div>

Can you post an rvt with one such surface in it?
