Rotate Model elements to be Normal to Curve

Two questions: 1. How to orient a component or a beam to z to be tangent to a curve? I have a definition that places points on a curve and then places either adaptive components or structural beams based on the point placement. I have tried several options using planes and normals but have not been able to get the component or beam to orient to the curve normal instead of being straight up and down. 2. How to get Dynamo to see multiple Revit curves as one? I am not able to select multiple curves in revit using the Select Model Elements node. When I use the Select Model Element node and join the curves it still sees two. Any advice is greatly appreciated.

Hey Marla , try this:

For your second question, maybe you can join your curves into a polycurve or place Points on your curves and create a new Curve.ByPoints

Hi Mostafa,

Thanks for the answer. I tried it and it worked…almost. The normals/planes/coordinate systems along the curve flip and cause the orientation of the components to flip. I solved this by not using an adaptive component or structural beam but by extruding a curve as a solid using a distance and direction. (I tried the solid loft node but it broke citing orientation issues).

Is there a way to unify the normals? Why are they flipping?

I’ve attached the definition and image of the resulting revit file…the brown is the structural framing and the yellow is the adaptive component you can see where the flip happens.

The background of the definition shows the coordinate systems…flipping.

I’ve also attached the workaround of extruding a curve as a solid.

Here is a couple of videos that might be helpful in explaination:

Hey Marla, the reason your normals flip is due to the curve going from concave to convex. normal unified

But it’s not enough to solve the issue! the problem seems to have also a lot to do with the fact that angle.between returns angles that don’t follow a given direction. Here’s a workaround that seems to be doing the job correctly, using a dot ptoduct to get the correct sign for the angles : (i only have 0.7.5 at work and for some reason the values have to be converted to radians before they’re fed into revit, even though my project is in degrees… ) normal revit Hope it helps!

1 Like