From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Dynamic Measurements to .STL Model in Labview

Hello Everyone, 

Beforehand I appreciate taking the time to read this post, it is a problem I have been struggling around for a bit (some weeks).  In summary, what I'm trying to do is to import a STL (Solidworks, Inventor, etc.) model into labview, and with the 3D Picture Control Library add Text Labels to it.  The user may rotate the model, and the labels should display readings for each part of the model. 

The problem is, that the STL model is usually complex, and there are many labels to include. As the user rotates the object, the labels show themselves "mirrored", or get lost behind pieces of the STL model.  Is there any solution of this problem?

I have though of:

1. Maybe it isn't possible to relocate the text labels when the model rotates and covers them. But, could it be possible to fix the "mirrorizing" problem with 3D Picture Control?

2. Is there some other way to manipulate 3D Objects, that I'm not aware of?
3. Is there maybe a more adaptable conversion than STL to manage in Labview? (I design my objects in Solidworks, but there might be a conversion to another format somewhere).

4. It might be necessary to code my models into C, or another programming language and then add them to Labview. The question is, how?


I have included a test VI of a LEGO, you only have to change the path of the STL model. As it can be seen, the labels mirror themselves or are partially/fully covered by the STL object. 

Download All
Message 1 of 5
(3,340 Views)

Those are some issues I also have had lots of problems with, and haven´t managed to find proper solutions; if someone has some knowledge about it, it would be greatly appreciated.

 

Thanks in advance : )

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

Hi Walterbpx, 

I tried to open your vi but the Texto3D.vi subVI is missing. Would you be able to attach that so that I can see exactly what you're having trouble with?

 

It sounds like you're on the right track with the 3D Picture Control Library. Incase you haven't already seen it, there is an example on LabVIEW called "Rotating and using Text.vi" that demonstrates how to display text in a 3D Picture. That might be a helpful resource. 

Also, take a look at this: http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/3d_pic_control/

It mentions a Create Text VI which might be relevant for your application

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 3 of 5
(3,259 Views)

Thank you very much! That was exactly what I was looking for, a text that always faces the screen. By the way, I was looking at the "3D Model of a Solar System" Example. I have noticed that when the camera controller is changed to an enum value of Flying, or Spheric; the model of the solar system does not reset. I have been struggling with a large model because if I rotate it using the spehrical camera control, and then want to drag it across the screen, using the flying camera control, it resets to its initial position (the first location after I click run in the vi.). Do you know how they are avaible to accomplish that the 3D object does not autorelocate to its initial position after I change the camera control options? 


Thanks!

0 Kudos
Message 4 of 5
(3,098 Views)

You're welcome!

Regarding the 3D Model of a Solar System example: I would recommend looking at the block diagram and checking out the case structure inside the while loop that the camera controller connects to. You should be able to find your answer if you compare your block diagram with that of the example vi. 

Shalini M.
Partner Development Engineer
Alliance Partner Network
National Instruments
0 Kudos
Message 5 of 5
(3,080 Views)