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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

output point cloud data in stl format

I'm scanning a surface with a laser line and capturing images with a VGA camera. On each image I determine the center of the laser line and save the coordinates as a 2D array. Doing this for multiple images gives me a 3D array, also termed a 'point cloud'. LabVIEW gives me some 3D representation options but what I really want is is to output the data in .stl format. (.ply, .obj or .3ds formats would also be acceptable.)

 

Has anyone done this? Any suggestions?

 

J

0 Kudos
Message 1 of 6
(5,808 Views)

Allow me to elaborate on my problem. I want to take the LabVIEW array and convert it into a triangular mesh. This will entail a conversion into the .OBJ (Alias Wavefront) mesh format. Once into .OBJ I can get the fil einto .stl or many other formats.

 

So here's the question; has anyone ever converted an array into a triangular mesh?

0 Kudos
Message 2 of 6
(5,792 Views)

Hi,

 

There is no native function in LabVIEW that can save your array in the format that you want.  I believe that you would like to create an .stl file that you would be able to open up in CAD functions.  LabVIEW does have the ability to open files in this format but not save them, but there is a way to do this, albeit tedious. 

 

What you should try is to save your array as .txt file, in ASCII format.  Open up another stl file in some kind of text editor.  Then you will have to go through and fix the formatting of your.txt file so that it matches the .stl file format. 

 

While this is going to be a tedious task, it should work.  I didn't see any body else posting on the forums that had done this before, but it might not hurt to look a little more. 

 

Cheers, 

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 3 of 6
(5,783 Views)

Hi!

We have developed a VI that does exactly that for our own 3D cameras. Depending on your input data, we may have to modify that slightly.

 

We can discuss offline.

 

Best,
Markus Tarin

 

 

0 Kudos
Message 4 of 6
(5,770 Views)

I have it done in PLY file. 

 

You can use MESHLAB  to EXPORT to any file format you want.... 

See attached example. 

0 Kudos
Message 5 of 6
(3,211 Views)

Here a better example exporting ply colors.  

0 Kudos
Message 6 of 6
(3,075 Views)