Hi all. I am trying to create a script where finishing layers are modeled in all rooms that are a general area. To define the area’s im using a parameter called “Algemene ruimte”. When this parameter is true, finishing layers are modeled in this room. Actually my script is working perfectly exept the walls are not joining with the existing walls.
For the joining part i am using a python script which i’ve found on the internet. The two parts of the script are working when they run seperatly but when i combine them the walls wont get joined. Anyone out there who can help me?
This is the python script:
Blockquoteimport clr
clr.AddReference(“RevitAPI”)
from Autodesk.Revit.DB import *
def overlap1D(a1, a2, b1, b2):
if a2>=b1 and b2>=a1:
return True
return False
def bbIntersect(bbA, bbB):
return overlap1D(bbA.Min.X,bbA.Max.X,bbB.Min.X,bbB.Max.X) and overlap1D(bbA.Min.Y,bbA.Max.Y,bbB.Min.Y,bbB.Max.Y) and overlap1D(bbA.Min.Z,bbA.Max.Z,bbB.Min.Z,bbB.Max.Z)
#The inputs to this node will be stored as a list in the IN variables.
listA = UnwrapElement(IN[0])
listB = UnwrapElement(IN[1])
output =
for a in listA:
bbA = a.get_BoundingBox(None)
if not bbA is None:
for b in listB:
bbB = b.get_BoundingBox(None)
if not bbB is None:
if bbIntersect(bbA,bbB):
output.append([a,b])
#Assign your output to the OUT variable.
OUT = output
Blockquote
Create finishing layers on walls.dyn (93.1 KB)