//aShape = aTransformation.Shape();
TopLoc_Location aLocOrig = anOriginal.Location();
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
- TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+ //TopLoc_Location aLocRes (aTrsf * aTrsfOrig); // gp_Trsf::Multiply() has a bug
+ aTrsfOrig.PreMultiply(aTrsf);
+ TopLoc_Location aLocRes (aTrsfOrig);
aShape = anOriginal.Located(aLocRes);
}
else if (aType == ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
//aShape = aTransformation.Shape();
TopLoc_Location aLocOrig = anOriginal.Location();
gp_Trsf aTrsfOrig = aLocOrig.Transformation();
- TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+ //TopLoc_Location aLocRes (aTrsf * aTrsfOrig); // gp_Trsf::Multiply() has a bug
+ aTrsfOrig.PreMultiply(aTrsf);
+ TopLoc_Location aLocRes (aTrsfOrig);
aShape = anOriginal.Located(aLocRes);
}
else if (aType == ROTATE_1D) {
}
else {
aTrsf.SetRotation(AX1, i*angle*PI180);
- TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+ //TopLoc_Location aLocRes (aTrsf * aTrsfOrig); // gp_Trsf::Multiply() has a bug
+ gp_Trsf aTrsfNew (aTrsfOrig);
+ aTrsfNew.PreMultiply(aTrsf);
+ TopLoc_Location aLocRes (aTrsfNew);
B.Add(aCompound, anOriginal.Located(aLocRes));
}
//NPAL18620: performance problem: multiple locations are accumulated
}
else {
aTrsf2.SetRotation(AX1, j*ang*PI180);
- TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig);
+ //TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig); // gp_Trsf::Multiply() has a bug
+ gp_Trsf aTrsfNew (aTrsfOrig);
+ aTrsfNew.PreMultiply(aTrsf1);
+ aTrsfNew.PreMultiply(aTrsf2);
+ TopLoc_Location aLocRes (aTrsfNew);
B.Add(aCompound, anOriginal.Located(aLocRes));
}
//NPAL18620: performance problem: multiple locations are accumulated