]> OCCT Git - occt.git/commitdiff
0033371: USD - Implementation of import and export USD files using the USD SDK. 1...
authorika <ika@opencascade.com>
Thu, 28 Mar 2024 11:27:01 +0000 (11:27 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Wed, 17 Apr 2024 22:19:49 +0000 (23:19 +0100)
Do auxiliary improvement in OCCT.

src/RWMesh/RWMesh_CafReader.cxx
src/RWMesh/RWMesh_CafReader.hxx

index d1086ff15bba680185cacab6e9c8c442842b4add..aa2f2f9128e73da0c97fc75d637661b902598f5a 100644 (file)
@@ -383,6 +383,16 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools,
     return Standard_False;
   }
 
+  if (toMakeAssembly)
+  {
+    TDF_Label aRefLabel;
+    theTools.ShapeTool->GetReferredShape(aNewLabel, aRefLabel);
+    if (!aRefLabel.IsNull())
+    {
+      theTools.OriginalShapeMap.Bind(theShape, aRefLabel);
+    }
+  }
+
   // if new label is a reference get referred shape
   TDF_Label aNewRefLabel = aNewLabel;
   theTools.ShapeTool->GetReferredShape (aNewLabel, aNewRefLabel);
index 5e93d60b3e6bbd43c4ac7f07e99a5f1978c745c5..f1bc35edcbf516dc88d9ce73a003dfc5b7aaf491 100644 (file)
@@ -57,6 +57,7 @@ public:
     Handle(XCAFDoc_ColorTool)       ColorTool;
     Handle(XCAFDoc_VisMaterialTool) VisMaterialTool;
     NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> ComponentMap;
+    NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> OriginalShapeMap;
   };
 
 public: