Stl exporter requires interactive context ?

EugeneZ's picture

Hello Everyone,
I have really interesting question for my side.

When I use StlAPI_Writer to export shape to STL format, it works only if I call for shape the function:
myAISContext->Display( aisShape, Standard_True );

Without displaying shape under interactive context, fails for shape.

What could be wrong? I need Export shapes to STL in silent mode withoud showing it on screen.

Thank you, in advance.

abv's picture

Use BRepMesh_IncrementalMesh

Hello,

STL converter requires the shape to be tessellated, as it exports triangulation. Tessellation is performed automatically when you display the shape in 3D viewer, that is why it works after display. Instead, use class BRepMesh_IncrementalMesh to generate tessellation before export.

Andrey

EugeneZ's picture

Thank you Andrey, that

Thank you Andrey, that works.
With respects, Eugene.

www.opencascade.com

Copyright 2011-2019
OPEN CASCADE SAS
Contact us