Example Code

Convert STL from BINARY to ASCII format using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
This VI demonstrate the simple STL conversion tool is presented that allows the user to convert from binary to ASCII STL without ever leaving LabVIEW.

 
Description
Here is a brief description of the example:

This VI opens an STL file saved in binary STL format and converts it to ASCII STL format. An example binary STL file "cube.stl" is provided. The output ASCII file has been tested using Solidworks(R) 2015. The code has also been tested with other geometries and was successful. Curved objects with a large number of triangles will take longer to generate.

Additional information on the STL file format can be found on Wikipedia and on the block diagram in the example.

 

Requirements

  1. LabVIEW 2014 (or compatible)


Steps to Implement or Execute Code

  1. Download "stl_converter.vi" and "cube.stl"
  2. Open "stl_converter.vi"
  3. Browse to the location of "cube.stl" using the "BINARY STL file in" control
  4. Run the VI
  5. The new ASCII STL file "cube_ASCII.stl" is saved to the same folder as "cube.stl"

 

Additional Information or References

VI Snippet

STL Converter 2014 NIVerified.png 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
pblase
Active Participant
Active Participant
on

Worked the first time!