Rotate adaptiv family around inclined z-axis at point on polyline

Hi,
i work with Revit 2019 and Dynamo 1.3.
i try to placed adaptiv families on a 3d polyline.
The family has two parameters with which I can rotate the family around the x axis and the z axis.

The rotation around the x-axis works, but the rotation around the inclined z axis is inaccurate or wrong.


I think its because i try to calculate the angle between the corrdinatesystem (y) in the family with the declined coordinatesystem (y).

Any idea how i can solve this problem?

coords.xls (90.5 KB)
box_adaptiv.rfa (776 KB)
adaptiv_component_forum_2.dyn (68.7 KB)

i get a better results if i pull the vector onto the xy-plane and calculate the angle, bute there is still a inaccuracy

Well…i think i found my mistake:
After i calculated the angle i subtract 360° with the angle…
Without the subtraction i get a good placement of the family.


Or is this result just coincidence? If you try to rotate families more the 5hours…things get mixed up in your head;)

Ok…this wasen’t the final solution.
With new axis data I get clearly wrong results.
The strange thing is that the elements are placed worse with increasing distance from the beginning.
Start:
image
End:
image


The greater the difference between the project coordinate system and the positioning coordinate system, the greater the error.
The best results are obtained by pulling the vector of the Y-axis onto the placement plane:

new axis data:
coords_2.xls (90.5 KB)
box_adaptiv.rfa (776 KB)
Rotation_forum_2.dyn (43.9 KB)

Any help would be great…

@ Vikram_Subbaiah
You could answer some questions in the forum on this topic. Do you have any idea how I could solve this problem?

Hi @Fiesta
Did you find a Solution? I have exactly the same problem.

@Cagatay ,

can you use a adaptive Family with two points ?


so the direction will be embeded ?

KR

Andreas

Shure, you can build a adaptive family with 2 Points.
Create one an place a reference line on these 2 points.
Now place a circle on the end of the reference line.
Create now an extrution (reference line and circle combined)