I am trying to join overlapping curves into one continuous curve without and overlapping line segments.
I am offsetting base edge curves of these masses, taking the highlighted curves from all the masses and trying to join them to form one continuous curve. The curve needs to have no repeating segments so i can assign a wall to it. Does anyone have an idea how to achieve this?
I recommend building the spaces directly adjacent instead of fighting offsets. Still works with offsets if the spacing is consistent though.
- Pull the lower face of the mass.
- Pull the perimeter curves using
Surface.PerimeterCurves
and union into a polycurve using PolyCurve.ByJoinedCurves
. The surfaces should be directly adjacent to each other, with an overlapping curve between adjacent surfaces.
- Convert the offset curves into surfaces with a Surface.ByPatch node, and merge that into a single PolySurface with a PolySurface.ByJoinedSurfaces node.
- Use a
Topology.Edges
node to pull the curves from the PolySurface.
- Assuming everything packs perfectly and you don’t have one sided walls on the interior, you likely want to split the interior and exterior walls. If so wire the edges into the list input of a
List.FilterByBoolMask
node. Wire the edges into a Edge.AdjacentFaces
node and then into a List.Count
node set to list level @L2 and finally into a ==
node to check if the count of each sublist is 2. That wires into the mask inout if the List.FilterByBoolMask
node.
- For the ‘in’ list you want interior walls - wire it into
Edge.CurveGeometry
and then into a string of nodes to create the interior walls.
- For the
out
list you want exterior walls - wire it into a Edge.CurveGeometry
node and then into a string of nodes to create the exterior walls.
The problem is that users are putting these masses at a distance of 8" to account for wall thickness. So that they can draw the wall manually in the center of the distance.
Keeping the distance in the middle of the boxes in mind, I have done till step 3 but do you think this approach will work?
It works - I have used it on several times.
However you patched the original curves not the offset ones.
The 8” thickness wouldn’t be an issue if you just add 8” to the width and length of the space. Users not actually abutting the geometry will result in failure though. If you have families for this you can offset the perimeter curves in the family and have users use those for layout alignment, or you can let them use things as they are or extract the offset curves directly.