From 604088221d73ad314900703afc7179c3dbe2444b Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 11 Jan 2012 21:05:23 +0000 Subject: [PATCH] 0000439: Improve STEP import to find colors attached to sub-shapes git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5399 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/Import/Gui/AppImportGuiPy.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 5da7a7dfa..c47dd6b45 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -142,7 +142,10 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, TopLoc_Location part_loc = loc; Handle(XCAFDoc_Location) hLoc; if (label.FindAttribute(XCAFDoc_Location::GetID(), hLoc)) { - part_loc = hLoc->Get(); + if (isRef) + part_loc = part_loc * hLoc->Get(); + else + part_loc = hLoc->Get(); } #ifdef FC_DEBUG @@ -206,7 +209,7 @@ void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& { Part::Feature* part = static_cast(doc->addObject("Part::Feature")); if (!loc.IsIdentity()) - part->Shape.setValue(aShape.Located(loc)); + part->Shape.setValue(aShape.Moved(loc)); else part->Shape.setValue(aShape); part->Label.setValue(name);