Sketcher: Fixed radian/degree mix-up for Angle constraint.
This commit is contained in:
parent
75240e0058
commit
171fce7b19
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <Base/Writer.h>
|
||||
#include <Base/Reader.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "Constraint.h"
|
||||
|
@ -145,6 +146,7 @@ double Constraint::getPresentationValue() const
|
|||
else
|
||||
return Value;
|
||||
case Angle:
|
||||
return Base::toDegrees<double>(Value);
|
||||
case SnellsLaw:
|
||||
return Value;
|
||||
default:
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
name = QString::fromLatin1("%1 (%2)").arg(name).arg(Base::Quantity(constraint->getPresentationValue(),Base::Unit::Length).getUserString());
|
||||
break;
|
||||
case Sketcher::Angle:
|
||||
name = QString::fromLatin1("%1 (%2)").arg(name).arg(Base::Quantity(Base::toDegrees<double>(constraint->getPresentationValue()),Base::Unit::Angle).getUserString());
|
||||
name = QString::fromLatin1("%1 (%2)").arg(name).arg(Base::Quantity(constraint->getPresentationValue(),Base::Unit::Angle).getUserString());
|
||||
break;
|
||||
case Sketcher::SnellsLaw: {
|
||||
double v = constraint->getPresentationValue();
|
||||
|
|
|
@ -3825,7 +3825,7 @@ Restart:
|
|||
break;
|
||||
|
||||
SoDatumLabel *asciiText = dynamic_cast<SoDatumLabel *>(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_MATERIAL_OR_DATUMLABEL));
|
||||
asciiText->string = SbString(Base::Quantity(Base::toDegrees<double>(Constr->getPresentationValue()),Base::Unit::Angle).getUserString().toUtf8().constData());
|
||||
asciiText->string = SbString(Base::Quantity(Constr->getPresentationValue(),Base::Unit::Angle).getUserString().toUtf8().constData());
|
||||
asciiText->datumtype = SoDatumLabel::ANGLE;
|
||||
asciiText->param1 = Constr->LabelDistance;
|
||||
asciiText->param2 = startangle;
|
||||
|
|
Loading…
Reference in New Issue
Block a user