Beginner Tutorial assimp 3D 3D Printing stl

Example 1: 3D Printing in MeVisLab

Introduction

This example uses the assimp library to load a 3D file and save the file as *.stl for 3D printing.

Steps to do

Develop your network

Add the modules SoSceneLoader, SoBackground and SoExaminerViewer to your workspace and connect them as seen below.

Example Network

Example Network

Open the 3D file

Select the file vtkCow.obj from MeVisLab demo data directory. Open SoExaminerViewer and inspect the scene. You will see a 3D cow.

Cow in SoExaminerViewer

Cow in SoExaminerViewer

Add a SoSphere to the workspace and connect it to your viewer. Define the Radius of your sphere to 2 and inspect your viewer.

Cow and Sphere in SoExaminerViewer

Cow and Sphere in SoExaminerViewer

You can also define a material for your sphere but what we wanted to show is: You can use the loaded 3D files in MeVisLab Open Inventor Scenes.

Cow and red Sphere in SoExaminerViewer

Cow and red Sphere in SoExaminerViewer

Save your scene as *.stl file for 3D Printing

Add a SoSceneWriter module to your workspace. The SoExaminerViewer has a hidden output which can be shown on pressing SPACE . Connect the SoSceneWriter to the output.

Name your output *.stl file and select Stl Ascii as output format so that we can inspect the result afterwards.

SoSceneWriter

SoSceneWriter

Write your Scene and open the resulting file in your preferred editor. As an alternative, you can also open the file in an *.stl file reader like Microsoft 3D-Viewer.

Microsoft 3D-Viewer

Microsoft 3D-Viewer

Load the file again

For loading your *.stl file, you can use a SoSceneLoader and a SoExaminerViewer.

SoSceneLoader

SoSceneLoader

Summary

  • MeVisLab is able to load and write many different 3D file formats including *.stl format for 3D Printing.
  • Inventor Scenes can be saved by using a SoExaminerViewer together with a SoSceneWriter