]> OCCT Git - occt-copy.git/commitdiff
Fix reading name of shape from subtype of PRODUCT_DEFINITION STEP entity
authornds <nds@opencascade.com>
Thu, 27 Sep 2018 14:41:16 +0000 (17:41 +0300)
committernds <nds@opencascade.com>
Wed, 7 Nov 2018 15:58:14 +0000 (18:58 +0300)
(cherry picked from commit 87fc89a8b83565eba0616eebba1f6ce655777461)

src/STEPCAFControl/STEPCAFControl_Reader.cxx

index 5d19346fd563d6c098f55dd16b150cfb91c1d8bd..b23f72ab2ae20a900639f633d4d477d6b76d162d 100644 (file)
@@ -39,6 +39,7 @@
 #include <StepBasic_ProductDefinition.hxx>
 #include <StepBasic_ProductDefinitionFormation.hxx>
 #include <StepBasic_ProductDefinitionRelationship.hxx>
+#include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx>
 #include <StepBasic_SiUnit.hxx>
 #include <StepBasic_SiUnitAndLengthUnit.hxx>
 #include <StepBasic_Unit.hxx>
@@ -1131,6 +1132,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames (const Handle(XSControl_WorkSe
   Standard_Integer nb = Model->NbEntities();
   Handle(Standard_Type) tNAUO = STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence);
   Handle(Standard_Type) tPD  = STANDARD_TYPE(StepBasic_ProductDefinition);
+  Handle(Standard_Type) tPDWAD = STANDARD_TYPE(StepBasic_ProductDefinitionWithAssociatedDocuments);
   Handle(TCollection_HAsciiString) name;
   TDF_Label L;
   for (Standard_Integer i = 1; i <= nb; i++) {
@@ -1163,7 +1165,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames (const Handle(XSControl_WorkSe
     }
 
     // for PD get name of associated product
-    if ( enti->DynamicType() == tPD ) {
+    if (enti->DynamicType() == tPD || enti->DynamicType() == tPDWAD) {
       L.Nullify();
       Handle(StepBasic_ProductDefinition) PD = 
         Handle(StepBasic_ProductDefinition)::DownCast(enti);