I’m trying to turn a curve that are chosen from Revit that is already are a rectangle but not connected. Because I need the center point of the rectangle so that the wall that I chose will offset to the midpoint of the rectangle.
As seen in the pictures the node boudingbox centerpoint was used to make the rectangle close so the midpoint would be found.
And as seen in Revit, all the walls don’t offset into the middle and the midpoint are divided into 4 points and not 1.
But I guess that is not the node to be used. Is there another node that can make these lines to a close rectangle?
Is this what you want ?
Note1 : this works with non orthogonal/random walls too.
Note2 : you’ll have to change the script a little to make it run with lists and sublists, or to have more complex rooms computed, but the intersectionPoint function remains the same.
from Autodesk.DesignScript.Geometry import *
from Autodesk.Revit.DB import *
for d in data:
OUT = result