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