[TechDraw] Use templates instead of duplicate code: toGp

This commit is contained in:
Benjamin Bræstrup Sayoc
2024-10-08 00:35:25 +02:00
parent e8d466ea98
commit 9f8f6b1f56
13 changed files with 63 additions and 76 deletions

View File

@@ -1099,7 +1099,7 @@ gp_Ax2 DrawViewPart::getRotatedCS(const Base::Vector3d basePoint) const
{
// Base::Console().Message("DVP::getRotatedCS() - %s - %s\n", getNameInDocument(), Label.getValue());
gp_Ax2 unrotated = getProjectionCS(basePoint);
gp_Ax1 rotationAxis(DU::togp_Pnt(basePoint), unrotated.Direction());
gp_Ax1 rotationAxis(DU::to<gp_Pnt>(basePoint), unrotated.Direction());
double angleRad = Rotation.getValue() * M_PI / 180.0;
gp_Ax2 rotated = unrotated.Rotated(rotationAxis, -angleRad);
return rotated;