Elevation by Curve Room Finish Issues

Elevation by Curve Jeremy Graham Module 11

This is a dynamo file created by Jeremy Graham in his website

I need few changes in this script
In my project file I have curved walls and Walls with profile causing issues with running this script.
its getting arc’s as a room finish boundary stops running the script.

It would be great if anyone could modify the python script or filter the list to get views

You can download the file and check it here http://learndynamo.com/download/678/
Also check his post http://learndynamo.com/mod11/

Thanks in Advance.

Can you attach a picture of the error message / visual error you get when trying to run the graph?

1 Like

Sorry for the late reply
The above script creates elevation in front of all the walls of rooms. The python script doesn’t consider the arc shaped walls. So i had to filter out all the arc walls from the list. still I am getting this error after the input. Anyone please help me to the next step.

This is python script used on that node
import clr
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
curveLists = IN[0]

output = []

def checkCurves(curve1, curve2):
v1 = curve1.Direction.Normalized()
v2 = curve2.Direction.Normalized()
if Vector.IsAlmostEqualTo(v1,v2):
newLine = Line.ByStartPointEndPoint(curve2.StartPoint, curve1.EndPoint)
return newLine
return curve1

for list in curveLists:
count = 0
newCurves = []
for curve in list:
if count == 0:
newCurve = checkCurves(curve, newCurves[len(newCurves)-1])
if newCurve == curve:
newCurves[len(newCurves)-1] = newCurve
count += 1

if Vector.IsAlmostEqualTo(newCurves[0].Direction.Normalized(),newCurves[len(newCurves)-1].Direction.Normalized()):
	newCurve = Line.ByStartPointEndPoint(newCurves[len(newCurves)-1].StartPoint, newCurves[0].EndPoint)
	newCurves[0] = newCurve	

#Assign your output to the OUT variable.
OUT = output

What was wrong with the solution you got here?

1 Like

I used that solution but I am still getting python script error “index out of range”

Not sure if it will solve your problem, but try putting a code block with «seq[0]» between your flatten node and your python script. Does it help? What difference does it make?

Can you post your current script and a Revit model that duplicates your error?