0020750: EDF 1296 GEOM: Naming during STEP import

Small fix.
This commit is contained in:
ana 2012-03-12 09:04:32 +00:00
parent db7d2b88d3
commit 8afd587dc9

View File

@ -41,6 +41,7 @@
#include <XSControl_TransferReader.hxx> #include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx> #include <XSControl_WorkSession.hxx>
#include <StepShape_TopologicalRepresentationItem.hxx> #include <StepShape_TopologicalRepresentationItem.hxx>
#include <StepGeom_GeometricRepresentationItem.hxx>
#include <Transfer_Binder.hxx> #include <Transfer_Binder.hxx>
#include <TNaming_Builder.hxx> #include <TNaming_Builder.hxx>
@ -177,12 +178,13 @@ extern "C"
Handle(Transfer_TransientProcess) TP = TR->TransientProcess(); Handle(Transfer_TransientProcess) TP = TR->TransientProcess();
Handle(Standard_Type) tPD = STANDARD_TYPE(StepBasic_ProductDefinition); Handle(Standard_Type) tPD = STANDARD_TYPE(StepBasic_ProductDefinition);
Handle(Standard_Type) tShape = STANDARD_TYPE(StepShape_TopologicalRepresentationItem); Handle(Standard_Type) tShape = STANDARD_TYPE(StepShape_TopologicalRepresentationItem);
Handle(Standard_Type) tGeom = STANDARD_TYPE(StepGeom_GeometricRepresentationItem);
Standard_Integer nb = Model->NbEntities(); Standard_Integer nb = Model->NbEntities();
for (Standard_Integer ie = 1; ie <= nb; ie++) { for (Standard_Integer ie = 1; ie <= nb; ie++) {
Handle(Standard_Transient) enti = Model->Value(ie); Handle(Standard_Transient) enti = Model->Value(ie);
Handle(TCollection_HAsciiString) aName; Handle(TCollection_HAsciiString) aName;
if ( enti->IsKind( tShape )) if ( enti->IsKind( tShape ) || enti->IsKind(tGeom))
{ {
aName = Handle(StepRepr_RepresentationItem)::DownCast(enti)->Name(); aName = Handle(StepRepr_RepresentationItem)::DownCast(enti)->Name();
} }