Filter Curves by Orientation

Simple question that I cannot find a simple solution for. How can I filter only the horizontal or vertical curve from a revit view? Im using a detail view, so none of the lines have Z values. Just need to determine what is horizontal and what is vertical.


get the curves using element.geometry
make a virtual (dynamo) point at the midpoint of those curves (Point at parameter node set to 0.5)
use the normal from that point (perpendicular)
see where it points to left/right or bottom/up
or similar logic
its explained here to make perpendicular sections of elements, just tweak it a bit

1 Like

The alternative would be to make a line using the start point and end point, getting the direction of that line (or just make a vector by the two points), normalize the vector, and check which is greater, x or y.

1 Like