From bc6b1013d4f5882779ec00e84281656bffd2be82 Mon Sep 17 00:00:00 2001 From: ika Date: Mon, 19 Jun 2017 16:09:36 +0300 Subject: [PATCH] Fix reading name of shape from subtype of PRODUCT_DEFINITION STEP entity --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index e3b8c9997b..f0e2524a7c 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1158,6 +1159,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++) { @@ -1190,7 +1192,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); -- 2.39.5