From 38581280d00c854dcc91e8d8284aeae08a289142 Mon Sep 17 00:00:00 2001 From: ika Date: Thu, 21 Sep 2023 14:01:59 +0100 Subject: [PATCH] 0033486: Data Exchange - Mistake in processing of the oriented dimensions Remove using the array member's number instead of array member. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index d9c48b2693..e9e6ac69c2 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -3940,14 +3940,15 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, //for Oriented Dimensional Location Handle(TColStd_HArray1OfReal) aDirArr = anAP->RefDirection()->DirectionRatios(); gp_Dir aDir; + Standard_Integer aDirLower = aDirArr->Lower(); if (!aDirArr.IsNull() && aDirArr->Length() > 2) { - aDir.SetCoord(aDirArr->Lower(), aDirArr->Lower() + 1, aDirArr->Lower() + 2); + aDir.SetCoord(aDirArr->Value(aDirLower), aDirArr->Value(aDirLower + 1), aDirArr->Value(aDirLower + 2)); aDimObj->SetDirection(aDir); } else if (aDirArr->Length() > 1) { - aDir.SetCoord(aDirArr->Lower(), aDirArr->Lower() + 1, 0); + aDir.SetCoord(aDirArr->Value(aDirLower), aDirArr->Value(aDirLower + 1), 0); aDimObj->SetDirection(aDir); } }