mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0030380: Exception while reading Step-file
Incorrect initialization of array (when upper bound is less than lower bound) has been avoided in some places.
This commit is contained in:
parent
a2fb712bea
commit
0df4bbd689
@ -127,7 +127,7 @@ void RWStepFEA_RWCurve3dElementRepresentation::WriteStep (StepData_StepWriter& S
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -166,7 +166,7 @@ void RWStepFEA_RWCurve3dElementRepresentation::Share (const Handle(StepFEA_Curve
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWDummyNode::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWDummyNode::Share (const Handle(StepFEA_DummyNode) &ent,
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ void RWStepFEA_RWElementRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -134,7 +134,7 @@ void RWStepFEA_RWElementRepresentation::Share (const Handle(StepFEA_ElementRepre
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void RWStepFEA_RWFeaModel::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -153,7 +153,7 @@ void RWStepFEA_RWFeaModel::Share (const Handle(StepFEA_FeaModel) &ent,
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void RWStepFEA_RWFeaModel3d::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -153,7 +153,7 @@ void RWStepFEA_RWFeaModel3d::Share (const Handle(StepFEA_FeaModel3d) &ent,
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWGeometricNode::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWGeometricNode::Share (const Handle(StepFEA_GeometricNode) &ent,
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWNode::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWNode::Share (const Handle(StepFEA_Node) &ent,
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWNodeRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWNodeRepresentation::Share (const Handle(StepFEA_NodeRepresentat
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWNodeWithSolutionCoordinateSystem::WriteStep (StepData_StepWrite
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWNodeWithSolutionCoordinateSystem::Share (const Handle(StepFEA_N
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ void RWStepFEA_RWNodeWithVector::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -118,7 +118,7 @@ void RWStepFEA_RWNodeWithVector::Share (const Handle(StepFEA_NodeWithVector) &en
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ void RWStepFEA_RWSurface3dElementRepresentation::WriteStep (StepData_StepWriter&
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -166,7 +166,7 @@ void RWStepFEA_RWSurface3dElementRepresentation::Share (const Handle(StepFEA_Sur
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void RWStepFEA_RWVolume3dElementRepresentation::WriteStep (StepData_StepWriter&
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -159,7 +159,7 @@ void RWStepFEA_RWVolume3dElementRepresentation::Share (const Handle(StepFEA_Volu
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWCompoundShapeRepresentation::WriteStep (StepData_StepWriter&
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWCompoundShapeRepresentation::Share (const Handle(StepShape_Co
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWConnectedFaceShapeRepresentation::WriteStep (StepData_StepWri
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWConnectedFaceShapeRepresentation::Share (const Handle(StepSha
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWEdgeBasedWireframeShapeRepresentation::WriteStep (StepData_St
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWEdgeBasedWireframeShapeRepresentation::Share (const Handle(St
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWNonManifoldSurfaceShapeRepresentation::WriteStep (StepData_St
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWNonManifoldSurfaceShapeRepresentation::Share (const Handle(St
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWPointRepresentation::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWPointRepresentation::Share (const Handle(StepShape_PointRepre
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void RWStepShape_RWShapeDimensionRepresentation::WriteStep (StepData_StepWriter&
|
||||
|
||||
SW.OpenSub();
|
||||
if (ent->ItemsAP242().IsNull()) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -135,7 +135,7 @@ void RWStepShape_RWShapeDimensionRepresentation::Share (const Handle(StepShape_S
|
||||
// Inherited fields of Representation
|
||||
|
||||
if (ent->ItemsAP242().IsNull()) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepShape_RWShapeRepresentationWithParameters::WriteStep (StepData_StepWr
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepShape_RWShapeRepresentationWithParameters::Share (const Handle(StepSh
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ void RWStepVisual_RWDraughtingModel::WriteStep (StepData_StepWriter& SW,
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void RWStepVisual_RWDraughtingModel::Share (const Handle(StepVisual_DraughtingMo
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ Standard_Boolean STEPConstruct_Styles::GetColors (const Handle(StepVisual_Styled
|
||||
// parse on styles
|
||||
for(Standard_Integer j=1; j<=style->NbStyles(); j++ ) {
|
||||
Handle(StepVisual_PresentationStyleAssignment) PSA = style->StylesValue ( j );
|
||||
if(PSA.IsNull()) continue;
|
||||
if(PSA.IsNull() || PSA->Styles().IsNull()) continue;
|
||||
IsComponent = Standard_True;
|
||||
|
||||
for(Standard_Integer k=1; k<=PSA->NbStyles(); k++ ) {
|
||||
|
@ -456,7 +456,10 @@ Standard_Boolean StepData_StepReaderData::ReadSubList(const Standard_Integer num
|
||||
const Standard_Integer /* lenmax */) const
|
||||
{
|
||||
numsub = SubListNumber(num, nump, Standard_False);
|
||||
if (numsub > 0) return Standard_True;
|
||||
if (numsub > 0)
|
||||
{
|
||||
return (NbParams(numsub) > 0);
|
||||
}
|
||||
// Si optionel indefini, on passe l eponge
|
||||
numsub = 0;
|
||||
Standard_Boolean isvoid = (Param(num, nump).ParamType() == Interface_ParamVoid);
|
||||
|
@ -70,5 +70,5 @@ StepVisual_LayeredItem StepVisual_PresentationLayerAssignment::AssignedItemsValu
|
||||
|
||||
Standard_Integer StepVisual_PresentationLayerAssignment::NbAssignedItems () const
|
||||
{
|
||||
return assignedItems->Length();
|
||||
return assignedItems.IsNull()? 0 : assignedItems->Length();
|
||||
}
|
||||
|
13
tests/bugs/step/bug30380
Normal file
13
tests/bugs/step/bug30380
Normal file
@ -0,0 +1,13 @@
|
||||
puts "=========="
|
||||
puts "0030380: Ex-ception while reading Step-file"
|
||||
puts "=========="
|
||||
puts ""
|
||||
|
||||
ReadStep D_First [locate_data_file bug29633_nist_ctc_05_asme1_ap242-1.stp]
|
||||
XGetOneShape result D_First
|
||||
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -solid 1 -shell 1 -face 156 -wire 201
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user