0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
[occt.git] / src / RWMesh / RWMesh_CafReader.cxx
index f998d3b..64c9b6e 100644 (file)
@@ -402,6 +402,12 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools,
         hasProductName = true;
         setShapeName (aNewRefLabel, aShapeType, aShapeAttribs.Name, theLabel, theParentName);
       }
+      else if (aShapeAttribs.Name.IsEmpty()
+           && !aRefShapeAttribs.Name.IsEmpty())
+      {
+        // copy name from Product
+        setShapeName (aNewLabel, aShapeType, aRefShapeAttribs.Name, theLabel, theParentName);
+      }
     }
     else
     {