For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Is it possible to export a MeshVS_Mesh to STL

Timo Roth's picture

For importing STL files, we use the code mentioned at the end of .

It creates a MeshVS_Mesh from the STL file.
MeshVS_Mesh is a subclass of AIS_InteractiveObject and therefore can be transformed via its SetTransformation method.

Is it possible to export such a transformed MeshVS_Mesh to STL?

RWStl::WriteAscii (const Handle &aMesh, const OSD_Path &aPath );
can be used to write StlMesh_Mesh objects.
Is it possible to get an StlMesh_Mesh from a MeshVS_Mesh?


Hugues Delorme's picture

To my knowledge OpenCascade doesn't have a direct facility to do this.

The gmio C library provides a tool to export a MeshVS_DataSource to STL(see doc).
Just transform each facet before actual writting, for that redefine gmio_stl_mesh::func_get_triangle().