From e01f0d25d5f3ef9ceb66aa087212121e9f2f2e8b Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 10 Apr 2021 18:37:56 +0200 Subject: [PATCH] Import: [skip ci] for glTF export set scale factor of 0.001 because lengths are measured in meters --- src/Mod/Import/Gui/AppImportGuiPy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index e081764279..6601973cc2 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -693,7 +693,8 @@ private: TColStd_IndexedDataMapOfStringString aMetadata; RWGltf_CafWriter aWriter (name8bit.c_str(), file.hasExtension("glb")); aWriter.SetTransformationFormat (RWGltf_WriterTrsfFormat_Compact); - //aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001); + // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001); aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup); Standard_Boolean ret = aWriter.Perform (hDoc, aMetadata, Message_ProgressRange()); if (!ret) {