Determine Wall Joint by Geometry

Hi everyone :wink:
I am trying to determine how the ends of each wall interact with the surrounding walls. The results can be “No Intersection” / “T-Intersection” / “Corner”. Additionaly I wish to add a parameter witch show the intersecting wall.

For this reason I setup a script which looks at the end points and seeks for an intersection with another wall location line. In the first step I just tested if there is any intersection with another wall.

My script looks like this and works fine:

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

points = IN[0]
curves = IN[1]
intersect = IN[2]

outIntersectionType =
outIntersectionCurves =

counter = 0
for p,c,intersectionList in zip(points,curves,intersect):
intersectionCounter = 0
foundIntersection = False
intersectionCurves =
for i in intersectionList[0]:
if i == True and intersectionCounter != counter: #
#outIntersectionType.append(“FOUND!”)
foundIntersection = True
intersectionCurves.append(curves[intersectionCounter])
intersectionCounter += 1

outIntersectionCurves.append(intersectionCurves)

if foundIntersection == True:
outIntersectionType.append(“Intersection”)
else:
outIntersectionType.append("-")
counter +=1

OUT = outIntersectionType,outIntersectionCurves

But now I ran into the problem, that the wall location line does not end on the wall location line of another wall. For this reason, there is no intersection and my script makes no sense anymore.
image

Is there an API method that is able to figure out such a wall connection or does anyone have an idea for a better solution to reach my goal?

Thanks and kind regards,
Jannis

ARC_Wall_Ends.dyn (29.0 KB)

This might help: https://www.revitapidocs.com/2020/3a1b0e1e-e7f2-cb08-9983-c36137cac754.htm

Hi Jacob,
thanks for the hint. Actually I can retrieve which walls are “connected” to my wall, but in some cases the edges are not “recognized”. For this reason I cannot use it.

It is my new idea to get the “outline” of the wall and search for interesections. With the middle point of the closing curves.

Is there a way to get a “clean” outline" of a wall without door openings etc…?

I guess my thought was ‘for wall joined to target wall’, pull the location lines and compare the two.

  1. If wall location line is parallel to the target wall line, parallel join (perhaps no intersection, but furring walls are funny in terms of how people think of them).
  2. If the distance from the wall location line from the end points of the target wall, then corner join.
  3. If the distance from the wall location line to the target wall is less than half the width of the target wall, then T join.
  4. Any wall not selected by the list of joined walls are no intersection.