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!

2 Likes

Hi, I don’t believe this subject was ever fully resolved.
I have been testing a workflow and I have built a graph around Mostafa’s solution above. I can report that I get inconsistent results.
When i draw a spline or arc in the Y direction things works well. However if I draw a similar curve in the X direction the rotations do not work.

The first 3 images show the solution for a spline drawing in the Y direction. (Up and Down in plan) The beam rotations work well. For the purposes of the example I have included a geometry translate to allow placement of beams in the relevant direction to indicate the rotations. The final 3 images included show the same script but for the other direction where the angles of rotations are so small that revit does not rotate the beams. The curve is drawn at roughly the same size for each direction. I’m not sure why I’m getting different results. Any ideas? (The .dyn file is also attached)







Set beam rotations tan to curve_DYNAMO forum.dyn (68.0 KB)


hi,

profiles are not attaching to top of the floor…the angle and orientation are changing

1