Hey everyone!! I am trying to creating a roof using the node Roof.ByOutlineTypeAndLevel and unfortunately I can not manage it . Can you help me to understand the mistake/error?
the python script which I am using is: (I used it to create floor and wall and it worked fine)
from Autodesk.DesignScript.Geometry import *
Import DocumentManager and TransactionManager
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
from System.Collections.Generic import *
Import ToDSType(bool) extension method
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
inputCurves = IN
#join/group curves function
ignore_distance = 0.1 # Assume points this close or closer to each other are touching
Queue = set()
Queue.add(Line_List.pop()) # Move a line from the Line_List to our queue
Current_Line = Queue.pop()
for Potential_Match in Line_List:
Points = (Potential_Match.StartPoint, Potential_Match.EndPoint)
for P1 in Points:
for P2 in (Current_Line.StartPoint, Current_Line.EndPoint):
distance = P1.DistanceTo(P2)
if distance <= ignore_distance:
Line_List = [item for item in Line_List if item not in Queue]
OUT = groupCurves(inputCurves)
No python required. The node expects a list of curves, not a single polycurve.
Remember, there are no polycurves in Revit so you can’t use them to make sketches.
Skip the python node and try this way:
There are two nodes, one with PolyCurve and one with Curves, but if you use model lines they both work.
@lucamanzoni i tried your way and still can not manage; i am starting to think there is a problem with the node itself Roof.Byoutlinetypeandlevel
Sorry I used the Floor node, but it works also with Roof node:
Which kind of curves are you using? Can you show the previews?
Where is node Roof Types from? Try to use a OOTB package like RoofType.ByName
the roof types node is from Rythm package
@lucamanzoni it worked with the node RoofType.ByName, the problem was with the Rythm node
Thank you very much