From: nds Date: Thu, 27 Sep 2018 14:41:16 +0000 (+0300) Subject: Fix reading name of shape from subtype of PRODUCT_DEFINITION STEP entity X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=503d5141aa1a05b793bc480a76a55f5e63830ff3;p=occt-copy.git Fix reading name of shape from subtype of PRODUCT_DEFINITION STEP entity (cherry picked from commit 87fc89a8b83565eba0616eebba1f6ce655777461) (cherry picked from commit 7526e6c9e4be37c35236888d7df496ad0ac28c2e) # Conflicts: # src/STEPCAFControl/STEPCAFControl_Reader.cxx (cherry picked from commit f4608bc37035abbcbe5233fbcafc79bf4ad02b94) --- diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 71b1857eb7..3aa10e222a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1146,6 +1147,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSes 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++) { @@ -1179,7 +1181,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSes } // 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);