Offset intersecting ends of wall location lines

Hey All,

I’m trying to offset the intersecting ends of wall location lines (as part of a graph for a generative design study) and while I seem to have had some success, there are some intersections that seem like they aren’t being detected. As a bit of a Dynamo noob it is perfectly possible that I’m attacking this from completely the wrong way …

Taking a flattened list of curves I am finding all intersections using the BIMorph node, I’m then comparing that list with a list of Startpoints and EndPoints from the same flattened list. I perform a List.Contains action on both of these and feed them into 2 FilterByBoolMasks along with the original list of curves. What I am then trying to do is offset the start and end of the respective curves, and join the lists back together with a bit of python.

It’s quite a big graph so hopefully this snippet is readable …

Unfortunately it only partially works and some wall lines are still joined …

The code in the two python nodes is:
inputList1 = IN[0]
inputList2 = IN[1]
boolMask = IN[2]

# Place your code below this line
newList = []
i=0

while i < len(boolMask):
	if boolMask[i]:
		newList.append(inputList1[0])
		inputList1.pop(0)
	else:
		newList.append(inputList2[0])
		inputList2.pop(0)
	i += 1

# Assign your output to the OUT variable.
OUT = newList

This is the output

as you can (hopefully) see some of the intersections are still joined while others are as I want them … :thinking:

Hi @n.moore3,

I think the problem is that you have lines which intersect with other lines at point which are not their start- or endpoints, but somewhere in between. Maybe you could split each line by those points first.

Thanks - yeah you could be right … I thought that the BIMorph Curve.IntersectAll node was taking care of flagging intersection points but maybe not?

I’ll have a go at anonymizing the revit file later and upload that and the graph - that might be easier for you dynamo wizards than trying to understand my ramblings :wink:

FYI - I am repeating this process 3 times. Once for the internal walls, once for the party walls and then on the combined output from those two operations and this is what I get. As you might be able to see, even though some walls that are intersecting with the middle of some lines they are being found and offset - but for no apparent rhyme or reason others are not ?? The long wall line down the middle is one single wall btw.

I just feel that my approach is probably naive due to my noobness :wink: