From 21d705ad4bfb09543658d622b73052fe42e91967 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 14 Mar 2023 21:46:49 +0100 Subject: [PATCH] Import/Part: [skip ci] restore some comments --- src/Mod/Import/App/AppImportPy.cpp | 2 ++ src/Mod/Import/App/ImportOCAF2.cpp | 5 ++++- src/Mod/Import/Gui/AppImportGuiPy.cpp | 2 ++ src/Mod/Part/App/TopoShape.cpp | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 9b7b5118c8..b18a995e63 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -341,6 +341,8 @@ private: Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); + // Don't set name because STEP doesn't support UTF-8 + // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); diff --git a/src/Mod/Import/App/ImportOCAF2.cpp b/src/Mod/Import/App/ImportOCAF2.cpp index fde27edcd2..61611b0107 100644 --- a/src/Mod/Import/App/ImportOCAF2.cpp +++ b/src/Mod/Import/App/ImportOCAF2.cpp @@ -1175,8 +1175,11 @@ void ExportOCAF2::exportObjects(std::vector &objs, const c setName(label,nullptr,name); } - if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) + if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { dumpLabels(pDoc->Main(),aShapeTool,aColorTool); + } + + // Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055 aShapeTool->UpdateAssemblies(); } diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 4d0e1c2f4f..b506b80a53 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -669,6 +669,8 @@ private: Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); + // Don't set name because STEP doesn't support UTF-8 + // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 92018770f1..8ee78793ce 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -952,8 +952,8 @@ void TopoShape::exportStep(const char *filename) const throw Base::FileException("Error in transferring STEP"); APIHeaderSection_MakeHeader makeHeader(aWriter.Model()); + // Don't set name because STEP doesn't support UTF-8 // https://forum.freecadweb.org/viewtopic.php?f=8&t=52967 - //makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str()))); makeHeader.SetAuthorValue (1, new TCollection_HAsciiString("FreeCAD")); makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString("FreeCAD")); makeHeader.SetOriginatingSystem(new TCollection_HAsciiString("FreeCAD"));