3D Printing

<< Click to Display Table of Contents >>

Navigation:  XStream® HDVR® SDK > Advanced Functionality > 3D Polygon Meshes >

3D Printing

Previous pageReturn to chapter overviewNext page

C++ C++ Java Java .NET .NET

Summary

 

The XStream® HDVR® SDK provides functionality to extract, optimize and clean polygon meshes so they will be compatible with 3D printers and other additive manufacturing processes. The first step, mesh extraction, is discussed in the Volume Extraction section. The second step, mesh optimization, is discussed in the Mesh Optimization section. The final step is to clean the mesh so that any geometric incompatibilities with 3D printers are cleaned and removed.

 

3D_Print2

 

Mesh Cleanup

 

For a polygon mesh to be compatible with a 3D printer it must meet specific geometric requirements. A mesh that meets these requirements is said to be 'manifold'. To be manifold, the mesh must be a watertight solid, with  a continuous distinct inside and outside surface with interior volume and no holes. If you fill it with water, it will not leak. The mesh must have no boundary edges, every triangle edge must be shared with another triangle. The triangles making up the outside surface of the mesh must all have outward facing orientation, with triangle vertices specified in counter-clockwise order. No triangles may intersect one another, and there can be no interior structures.

 

To ensure a mesh is manifold, and therefore compatible with 3D printers, it can be processed with the IVertexCallListContext::CleanMesh() function. This function takes two parameters, the first is a boolean value that tells the function whether or not the mesh should be cleaned. The second parameter is the address of a MESH_PROPS structure that is filled in with data on any flaws present in the mesh that would make it incompatible with 3D printers. If a value of 'true' is passed in as the first parameter, the MESH_PROPS structure will contain the results of the cleaning operation. If the mesh has been successfully cleaned, all MESH_PROPS fields will be 0. If a value of 'false' is passed in as the first parameter the mesh will be analyzed only, without modification. The results of the analysis will be returned in the MESH_PROPS structure. Once cleaned, the mesh may be saved as an STL, OBJ, or PLY file to be passed to a 3D printer. The saving of mesh files is discussed in the Mesh File Export section.

 

// Declare a MESH_PROPS structure.

MESH_PROPS meshProps;

 

// Perform a cleaning pass. Results are returned in the meshProps variable.

pVertexCallList->CleanMesh(true, &meshProps);

 

To ensure a mesh is manifold, and therefore compatible with 3D printers, it can be processed with the hdrcVertexCallListContext::cleanMesh() function. This function takes a boolean input parameter that tells the function whether or not the mesh should be cleaned. The function returns a MESH_PROPS structure that is filled in with data on any flaws present in the mesh that would make it incompatible with 3D printers. If a value of 'true' is passed in as the input parameter, the MESH_PROPS structure will contain the results of the cleaning operation. If the mesh has been successfully cleaned, all MESH_PROPS fields will be 0. If a value of 'false' is passed in as the input parameter the mesh will be analyzed only, without modification. The results of the analysis will be returned in the MESH_PROPS structure. Once cleaned, the mesh may be saved as an STL, OBJ, or PLY file to be passed to a 3D printer. The saving of mesh files is discussed in the Mesh File Export section.

 

// Declare a MESH_PROPS structure.

MESH_PROPS meshProps;

 

// Perform a cleaning pass. Results are returned to the meshProps reference.

meshProps = vertexCallList.cleanMesh(true);