Use Base::toDegrees() instead of manually converting
This commit is contained in:
@@ -987,7 +987,7 @@ double DrawViewPart::getSizeAlongVector(Base::Vector3d alignmentVector)
|
||||
if (getEdgeCompound().IsNull()) {
|
||||
return 1.0;
|
||||
}
|
||||
TopoDS_Shape rotatedShape = ShapeUtils::rotateShape(getEdgeCompound(), OXYZ, alignmentAngle * 180.0 / std::numbers::pi);
|
||||
TopoDS_Shape rotatedShape = ShapeUtils::rotateShape(getEdgeCompound(), OXYZ, Base::toDegrees(alignmentAngle));
|
||||
Bnd_Box shapeBox;
|
||||
shapeBox.SetGap(0.0);
|
||||
BRepBndLib::AddOptimal(rotatedShape, shapeBox);
|
||||
|
||||
@@ -532,8 +532,8 @@ void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
|
||||
double bx = e.X() - p.X();
|
||||
double by = e.Y() - p.Y();
|
||||
|
||||
double start_angle = atan2(ay, ax) * 180 / std::numbers::pi;
|
||||
double end_angle = atan2(by, bx) * 180 / std::numbers::pi;
|
||||
double start_angle = Base::toDegrees(atan2(ay, ax));
|
||||
double end_angle = Base::toDegrees(atan2(by, bx));
|
||||
|
||||
if (a > 0) {
|
||||
double temp = start_angle;
|
||||
|
||||
Reference in New Issue
Block a user