From: gka Date: Tue, 6 Dec 2016 07:57:55 +0000 (+0300) Subject: 0028192: Translation assembly from STEP file is incorrect if file contains error... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=99bf2b94cb4cb3028378c406813b2e4d57d29475;p=occt-copy.git 0028192: Translation assembly from STEP file is incorrect if file contains error in the entity "REPRESENTATION_RELATIONSHIP". For case when order of representations in the entity "REPRESENTATION_RELATIONSHIP" is invalid all transformations from representations are checked. --- diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 42b2ca0fd3..636185e7d7 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -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; }