]> OCCT Git - occt-copy.git/commitdiff
0028192: Translation assembly from STEP file is incorrect if file contains error... CR28192
authorgka <gka@opencascade.com>
Tue, 6 Dec 2016 07:57:55 +0000 (10:57 +0300)
committergka <gka@opencascade.com>
Tue, 6 Dec 2016 07:59:52 +0000 (10:59 +0300)
For case when order of representations in the entity "REPRESENTATION_RELATIONSHIP" is invalid all transformations from representations are checked.

src/STEPControl/STEPControl_ActorRead.cxx

index 42b2ca0fd399409b8cf76cdcf85b7cffcee0e08e..636185e7d7f5326b78ba716ed8197fc13f6d4a42 100644 (file)
@@ -1637,11 +1637,11 @@ Standard_Boolean STEPControl_ActorRead::ComputeTransformation (const Handle(Step
   Handle(StepGeom_Axis2Placement3d) org = Origin;
   Handle(StepGeom_Axis2Placement3d) trg = Target;
   Standard_Integer code1=0, code2=0, i;
-  for ( i=1; code1 != 1 && i <= OrigContext->NbItems(); i++ ) {
+  for ( i=1; code1 != -1 && i <= OrigContext->NbItems(); i++ ) {
     if ( OrigContext->ItemsValue(i) == org ) code1 = 1;
     else if ( OrigContext->ItemsValue(i) == trg ) code1 = -1;
   }
-  for ( i=1; code2 != 1 && i <= TargContext->NbItems(); i++ ) {
+  for ( i=1; code2 != -1 && i <= TargContext->NbItems(); i++ ) {
     if ( TargContext->ItemsValue(i) == org ) code2 = -1;
     else if ( TargContext->ItemsValue(i) == trg ) code2 = 1;
   }