Hi
I got a surface with some cutouts, but I just need the outline. The surface was extracted from Room → Element.Geometry → Bottom Face and has no intelligence.
Everything I get with Surface.PerimeterCurves is a list of all curves, but I just need the outline, without any inserts.
Is there a way to extract the outline from a rooms bottom face with inserts?
The “normal” Room.Boundaries does not work, because the Model ist Linked and got a linked facade inside that model. Even with attaching the facade model etc… Room.Boundaries spits out incorrect results.
Hey I solved it myself by “sorting” the curve groups together. This was a bit annoying
This is my final code for an input of a list of list with curves.
# Phython-Unterstützung aktivieren und DesignScript-Bibliothek laden
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
data = IN[0]
log = []
outCurves = []
for roomCurves in data:
currentCurve = roomCurves[0]
i = roomCurves.index(currentCurve)
del roomCurves[i]
outList = []
run = 0
list = []
list.append(currentCurve.StartPoint)
while len(roomCurves)>0:
run+= 1
end = currentCurve.EndPoint
found = False
for y in roomCurves:
start = y.StartPoint
dist = start.DistanceTo(end)
# outList.append(dist)
if dist == 0:
list.append(start)
currentCurve = y
ind = roomCurves.index(y)
del roomCurves[ind]
found = True
break
if found == False:
outList.append(list)
currentCurve = roomCurves[0]
del roomCurves[0]
list = []
list.append(currentCurve.StartPoint)
outList.append(list)
outCurves.append(outList)
OUT = outCurves