0031472: Exception raised during translation of the STEP entity Constructive Geometry... IR-2020-04-10
authorgka <gka@opencascade.com>
Mon, 30 Mar 2020 13:11:31 +0000 (16:11 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 10 Apr 2020 14:43:52 +0000 (17:43 +0300)
Modification number of the representation items are considered for STEP entity "Constructive Geometry Representation"

src/STEPControl/STEPControl_ActorRead.cxx
tests/bugs/step/bug31472 [new file with mode: 0644]

index ebebfd2..78e4d05 100644 (file)
@@ -1153,7 +1153,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
     Standard_Integer j =1;
     Handle(StepGeom_Axis2Placement3d) anAxis1;
     Handle(StepGeom_Axis2Placement3d) anAxis2;
-    for( ; j <= 2; j++ )
+    for( ; j <= aCRepr->NbItems(); j++ )
     {
       Handle(StepRepr_RepresentationItem) anItem = aCRepr->ItemsValue(j);
       Handle(StepGeom_Axis2Placement3d) aStepAxis =
diff --git a/tests/bugs/step/bug31472 b/tests/bugs/step/bug31472
new file mode 100644 (file)
index 0000000..5eea091
--- /dev/null
@@ -0,0 +1,13 @@
+puts "===================================="
+puts "0031472: Translation of the STEP entity Constructive Geometry Representation containing one representation"
+puts "===================================="
+
+puts "Read STEP file containing GEOMETRIC_REPRESENTATION_CONTEXT and check"
+puts "that it has been translated"
+
+dall
+param read.step.constructivegeom.relationship 1
+stepread [locate_data_file 98508_2.stp] a *
+
+checknbshapes a_1 -face 68 -wire 72 -compound 3
+checkshape a_1 f