Use Base::toRadians() instead of manually converting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user