From dce4086d64e1680aafe421987e7a973b5957b097 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 14 Sep 2018 18:15:48 +0200 Subject: [PATCH] fixes #0002908: stp file import name mismatch (due to some limitation into UTF-8 support & naming convention) --- src/Mod/Import/App/ImportOCAF.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Import/App/ImportOCAF.cpp b/src/Mod/Import/App/ImportOCAF.cpp index 0b84038729..b01413aa0e 100644 --- a/src/Mod/Import/App/ImportOCAF.cpp +++ b/src/Mod/Import/App/ImportOCAF.cpp @@ -254,6 +254,7 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, if (aShapeTool->IsAssembly(label)) { App::Part *pcPart = NULL; pcPart = static_cast(doc->addObject("App::Part",asm_name.c_str())); + pcPart->Label.setValue(asm_name); pcPart->addObjects(localValue); // STEP reader is now a hierarchical reader. Node and leaf must have @@ -388,6 +389,7 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, if (!localValue.empty() && !merge) { pcPart = static_cast(doc->addObject("App::Part",name.c_str())); + pcPart->Label.setValue(name); // localValue contain the objects that must added to the local Part // We must add the PartOrigin and the Part itself @@ -776,6 +778,7 @@ void ImportXCAF::createShape(const TopoDS_Shape& shape, bool perface, bool setna { Part::Feature* part; part = static_cast(doc->addObject("Part::Feature", default_name.c_str())); + part->Label.setValue(default_name); part->Shape.setValue(shape); std::map::const_iterator jt; jt = myColorMap.find(shape.HashCode(INT_MAX));