How do I get proper rotation?

adaptivecomponent
#1

Hi guys/gals!

EDIT:
GO TO FOURTH REPLY; IGNORE EVERYTHING ELSE.
FIRST POST WAS TOO CONFUSING/INCORRECT.

#2

it isn’t clear (to me at least) what you want to achieve
But I think the answer is that you need the geometry of the family to rely upon the adaptive reference points.
It would help if you included the Dynamo graph & family

#3

Hi Andrew, thank you for a reply.

Here is my family and graph

I have everything figured out except for rotation angle (I know how to rotate it). I just want to place my adaptive family so that smooth/flat part of the unistrut is on the triangle plane. Afterwards, I want the opposite side or the lip portion to face perpendicular to the plane. Something like this

.

But when I place my family the orientation is not correct. It comes out looking like this.

#4

I still can’t figure this out guys. Any help will be appreciated. I added my files so you guys can tinker with it. You can ignore everything else above as that is quite confusing now that I think about it. Anyways, I just need help with getting the proper rotation.

Here is an overview of what I want to do:
I want my outcome to be this (notice unistrut facing direction)

But I keep getting this (unistrut direction is off)

I am using adaptive points so I am not sure if that is the issue or what. If I can get the normal of the adaptive family then I can find the proper angle and rotate them but so far I can only get the normal of the curve and plane, not adaptive family.

I also tried messing around with these settings but they didn’t do much for me.
Revit_dv0SmIncLp

Here are the files.
Polygons.rvt (3.6 MB)
Unistrut Adaptive.rfa (360 KB)
Triangle.dyn (173.2 KB)

#5

So I manged to get the proper rotation by using these nodes. The way I got the angle was to get the normal vector of the triangle and get the vector of the facing orientation of the family then using node AngleWithVector to calculate the angle between the two vectors.

Here are some more pictures to help someone understand my situation a little more.
I created axis to help with visualization. This pictures shows what my vector is from the Dynamo node ‘FacingOrientation’.

Here are the vectors that I want it to show.

So as you can see, I always have to add 90 degrees to get the vectors to be the way I want them to be.

However, I am now having a problem. Sometimes the FaceOrientation node puts out an empty list on first run and I have to run it a second time for it to work correctly. Here is an example of what I am talking about.


Is there anyway to avoid having it run twice for it to work properly?

Also another solutions for getting the vectors correctly would be appreciated. The FacingOrientation node is wrong for some reason. Maybe it has to do with my family or something but I am not too familiar with how adaptive components works.