This one’s got me a bit stumped. I’m trying to split a series of surfaces using planes as the cutting tool. The code I’m using is below:
curves = IN heights = IN planes = IN vec = Vector.ByCoordinates(0,0,1) height_skipper = 0 # Place your code below this line def loop_walls(list_IN,cutter): output =  for looper in list_IN: output.append(looper.Split(cutter)) return DSCore.List.Flatten(output) def intersect_wall_SSL(curves,heights,planes): walls =  walls_intersected =  temp =  for c in range(len(curves)): if heights[c] != 0: walls.append(Curve.Extrude(curves[c],vec,heights[c])) for p in planes: try: temp = loop_walls(walls,p) walls = temp temp =  except: continue return walls OUT = intersect_wall_SSL(curves,heights,planes)
The code above does two things:
a. Extrudes curves to surfaces based on values in the [height] list.
b. Recursively splits the walls using the split tool.
This code works very well for small test models (such as the sample revit projects) but on complex examples it just keeps using CPU cycles and just hangs. Occasionally it will also cause Revit to crash.
Could someone let me know what’s going wrong here ?
Thanks in advance !