Use Base::toRadians() instead of manually converting

This commit is contained in:
Benjamin Nauck
2025-04-09 09:14:54 +02:00
parent 1f8c8043fc
commit 21fbf8e539
43 changed files with 129 additions and 106 deletions

View File

@@ -71,6 +71,7 @@
#include <Base/Converter.h>
#include <Base/Exception.h>
#include <Base/Parameter.h>
#include <Base/Tools.h>
#include "Cosmetic.h"
#include "CenterLine.h"
@@ -1105,7 +1106,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(Base::convertTo<gp_Pnt>(basePoint), unrotated.Direction());
double angleRad = Rotation.getValue() * std::numbers::pi / 180.0;
double angleRad = Base::toRadians(Rotation.getValue());
gp_Ax2 rotated = unrotated.Rotated(rotationAxis, -angleRad);
return rotated;
}