Split line problem

I use the Element.GetLocation node to get the wall line.
But I want to split this wall line into two separate rectangles.
Can someone help me?

rectangles or two polycurves?

two polycurves

image
Group them to two sets of curves.

Or you can use another method PolyCurve.ByPoints(). Feed points (startpoints, endpoints, intersections. Two lists of 4 points) to the method.

I failed.Can you help me?

I think it’s not so easy to automate. For example, what happens if you have one wall for multiple rooms, or if your room is not rectangular?
I guess the easiest and fastest way is to create Rooms in Revit, then select all of them in Dynamo and use Room.CenterBoundary or Room.FinishBoundary.

if u are looking for a batch process, as @lucamanzoni pointed out, room will be very handy.

Hi Sean,

As @lucamanzoni suggested, room and its Center Boundary will help you out.

1 Like