STL export in world space coordinates

I’m trying to export a scene in STL format. The scene is built by extruding several shapes and then rotating and translating them into various positions.

When I open the STL file in Solidworks I get all the geometries overlapped as they were extruded and before rotation and translation like if the geometries of the single meshes are exported in their object space coordinates instead of in world space coordinates.

Can someone give advice, please?

If you try to export RIGHT after you apply those operations, the matrices of the objects might be stale, since they only get auto-updated during renderer.render ?

Could you try doing like… scene.updateMatrixWorld(true) before you export? This makes matrices update, and the “true” flag means recursive, so it will apply to the entire graph.

Thank you very much it worked like a charm

1 Like