#include <RWStepRepr_RWAssemblyComponentUsage.ixx>
+#include <StepRepr_ProductDefinitionShape.hxx>
+
//=======================================================================
//function : RWStepRepr_RWAssemblyComponentUsage
//purpose :
Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatingProductDefinition;
data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatingProductDefinition);
+ if (aProductDefinitionRelationship_RelatingProductDefinition.IsNull())
+ {
+ Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape;
+ data->ReadEntity (num, 4, "product_definition_relationship.relating_product_definition_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProductDefinitionShape);
+ if (!aProductDefinitionShape.IsNull())
+ {
+ aProductDefinitionRelationship_RelatingProductDefinition = aProductDefinitionShape->Definition().ProductDefinition();
+ }
+ }
Handle(StepBasic_ProductDefinition) aProductDefinitionRelationship_RelatedProductDefinition;
data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aProductDefinitionRelationship_RelatedProductDefinition);
+ if (aProductDefinitionRelationship_RelatedProductDefinition.IsNull())
+ {
+ Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape;
+ data->ReadEntity (num, 5, "product_definition_relationship.related_product_definition_shape", ach, STANDARD_TYPE(StepRepr_ProductDefinitionShape), aProductDefinitionShape);
+ if (!aProductDefinitionShape.IsNull())
+ {
+ aProductDefinitionRelationship_RelatedProductDefinition = aProductDefinitionShape->Definition().ProductDefinition();
+ }
+ }
// Own fields of AssemblyComponentUsage
static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
Handle(TColStd_HSequenceOfTransient)& listSDR,
+ Handle(TColStd_HSequenceOfTransient)& listNAUO,
Handle(TColStd_HSequenceOfTransient)& listSDRAspect,
const Handle(Transfer_TransientProcess)& TP)
{
getListSDR(sa,listSDRAspect,TP);
continue;
}
+
+ // NAUO is used to find sub-assemblies
+ Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO =
+ Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(subs4.Value());
+ if ( ! NAUO.IsNull() ) {
+ if ( PDS->Definition().ProductDefinition() == NAUO->RelatingProductDefinition() )
+ listNAUO->Append(NAUO);
+ continue;
+ }
}
}
Handle(StepRepr_ProductDefinitionShape) PDS =
Handle(StepRepr_ProductDefinitionShape)::DownCast(subs3.Value());
if ( ! PDS.IsNull() ) {
- getSDR(PDS,listSDR,listSDRAspect,TP);
+ getSDR(PDS,listSDR,listNAUO,listSDRAspect,TP);
continue;
}
// NAUO is used to find sub-assemblies