1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0033486: Data Exchange - Mistake in processing of the oriented dimensions

Remove using the array member's number instead of array member.
This commit is contained in:
ika 2023-09-21 14:01:59 +01:00 committed by jokwajeb
parent 4ce99d9697
commit 38581280d0

View File

@ -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);
}
}