LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d picture control

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

0 Kudos
Message 1 of 5
(2,369 Views)

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 

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,336 Views)

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

0 Kudos
Message 3 of 5
(2,319 Views)

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 

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(2,300 Views)

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

0 Kudos
Message 5 of 5
(2,289 Views)