]> OCCT Git - occt-copy.git/commitdiff
Fix reading name of shape from subtype of PRODUCT_DEFINITION STEP entity
authorika <ika@opencascade.com>
Mon, 19 Jun 2017 13:09:36 +0000 (16:09 +0300)
committerema <elena.mozokhina@opencascade.com>
Tue, 12 Sep 2017 11:28:46 +0000 (14:28 +0300)
src/STEPCAFControl/STEPCAFControl_Reader.cxx

index b1fac42441e5731643f76f56aab01e76262c76a2..07ba7d3d93dcead8d5281f18ec66d70a7b1cb919 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>
@@ -1166,6 +1167,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++) {
@@ -1198,7 +1200,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);