Allow equal angles for elliptical arc.
--HG-- branch : develop
This commit is contained in:
parent
b25f971758
commit
55e0ef6549
|
@ -268,14 +268,10 @@ void VToolEllipticalArc::SetFormulaF1(const VFormula &value)
|
||||||
{
|
{
|
||||||
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(m_id);
|
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(m_id);
|
||||||
QSharedPointer<VEllipticalArc> elArc = qSharedPointerDynamicCast<VEllipticalArc>(obj);
|
QSharedPointer<VEllipticalArc> elArc = qSharedPointerDynamicCast<VEllipticalArc>(obj);
|
||||||
|
|
||||||
if (not VFuzzyComparePossibleNulls(value.getDoubleValue(), elArc->GetEndAngle()))// Angles can't be equal
|
|
||||||
{
|
|
||||||
elArc->SetFormulaF1(value.GetFormula(FormulaType::FromUser), value.getDoubleValue());
|
elArc->SetFormulaF1(value.GetFormula(FormulaType::FromUser), value.getDoubleValue());
|
||||||
SaveOption(obj);
|
SaveOption(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VFormula VToolEllipticalArc::GetFormulaF2() const
|
VFormula VToolEllipticalArc::GetFormulaF2() const
|
||||||
|
@ -297,13 +293,10 @@ void VToolEllipticalArc::SetFormulaF2(const VFormula &value)
|
||||||
{
|
{
|
||||||
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(m_id);
|
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(m_id);
|
||||||
QSharedPointer<VEllipticalArc> elArc = qSharedPointerDynamicCast<VEllipticalArc>(obj);
|
QSharedPointer<VEllipticalArc> elArc = qSharedPointerDynamicCast<VEllipticalArc>(obj);
|
||||||
if (not VFuzzyComparePossibleNulls(value.getDoubleValue(), elArc->GetStartAngle()))// Angles can't be equal
|
|
||||||
{
|
|
||||||
elArc->SetFormulaF2(value.GetFormula(FormulaType::FromUser), value.getDoubleValue());
|
elArc->SetFormulaF2(value.GetFormula(FormulaType::FromUser), value.getDoubleValue());
|
||||||
SaveOption(obj);
|
SaveOption(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VFormula VToolEllipticalArc::GetFormulaRotationAngle() const
|
VFormula VToolEllipticalArc::GetFormulaRotationAngle() const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user