09-09-2011 01:52 PM
I have a device hooked up to my computer that shows its orientation in x, y, and z. It is an attitude heading reference system. I can get from it the angle it is sitting in each plane. I want to model it with a 3d object. I have loaded up the model as an STL, and can now show one direction at a time, but I want to show all three angles in all three axis. I want to be able to rotate in x, and y and z all at the same time. As I said, it currently is just one. Any help is appreciated.
thanks,
Brian
09-12-2011 04:30 PM
Hi bjstaff,
Here is a knowledge based article that discusses 3D modeling with STL files. There is some example code attached. Let me know if this is useful for your application.
http://digital.ni.com/public.nsf/allkb/CCE3C1DC149C3A35862574B800734FB4?OpenDocument
Regards,
Josh Brown
09-13-2011 03:36 PM
I hadn't seen that, but did see the way to display the 3d model with the 3d picture control. What I want is to be able to receive an angle in, and cause the object to move according to the angle, in x, y, and z. I found that I could use the SceneObject Transformation.SetRotation to set an absolute angle, but only in one direction at a time. I need all three, x, y, and z. I did find that the SceneObject Transformation.Rotate allows all three direction. I just needed to do some math that allows for the relative angle. I think it might work now. I also want to draw the x, y, and z axis on the 3D picture control. Is there a way to do that? Is there a way to use the rotation nodes for x, y and z of the model, instead of the model space? So many questions, so little time.
thanks,
Brian
09-14-2011 07:36 PM
Hi bjstaff,
Have you see the Transformation VIs in the LabVIEW help?
http://zone.ni.com/reference/en-XX/help/371361H-01/lvpict/transformationsvis/
Let me know if this is useful.
Regards,
Josh Brown
09-15-2011 08:22 AM
I didn't use the transformation VIs, just the SceneObject Nodes. I initially wanted to use the SetRotation, which is the absolute angle, but that didn't work for all three axis. Only one at a time. Is this the expected behavior? I ended up using Rotate, which is a relative angle, and did some math to get to where I want to be. I was able to use all three axis with this node. I was hoping the SetRotation would work this way. You might want your design engineers to look into that. I am still wondering how I can display the axis lines for the x, y, and z.
thanks,
Brian