Example Code

Change Color and Properties of Imported STL File - 3D Picture Control 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

Overview

This VI demonstrates how to use the Set Mesh Parameters Invoke Node to modify the color of an imported STL file.

 
Description

With 3D primitives, you can set the color as you create the object, so may not be obvious that this method is required for imported model files.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Browse the STL file through the path control, choose a color with the Front Panel color picker.
  2. Run the VI.

Additional Information or References
VI Snippet

005.png

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

Fred Visser -- SystemLink R&D -- National Instruments

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

Comments
Fred_V
Member
Member
on

To specify an alpha channel value for the color, you'll also need to specify the scene blending mode (as below).

Change STL Color - 3D Picture Control.png

Fred Visser -- SystemLink R&D -- National Instruments