#include <vellipticalarc.h>
Public Member Functions | |
| VEllipticalArc () | |
| VEllipticalArc default constructor. More... | |
| VEllipticalArc (const VPointF ¢er, qreal radius1, qreal radius2, const QString &formulaRadius1, const QString &formulaRadius2, qreal f1, const QString &formulaF1, qreal f2, const QString &formulaF2, qreal rotationAngle, const QString &formulaRotationAngle, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VEllipticalArc constructor. More... | |
| VEllipticalArc (const VPointF ¢er, qreal radius1, qreal radius2, qreal f1, qreal f2, qreal rotationAngle) | |
| VEllipticalArc (qreal length, const QString &formulaLength, const VPointF ¢er, qreal radius1, qreal radius2, const QString &formulaRadius1, const QString &formulaRadius2, qreal f1, const QString &formulaF1, qreal rotationAngle, const QString &formulaRotationAngle, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VEllipticalArc (qreal length, const VPointF ¢er, qreal radius1, qreal radius2, qreal f1, qreal rotationAngle) | |
| VEllipticalArc (const VEllipticalArc &arc) | |
| VEllipticalArc copy constructor. More... | |
| VEllipticalArc | Rotate (QPointF originPoint, qreal degrees, const QString &prefix=QString()) const |
| VEllipticalArc | Flip (const QLineF &axis, const QString &prefix=QString()) const |
| VEllipticalArc | Move (qreal length, qreal angle, const QString &prefix=QString()) const |
| virtual | ~VEllipticalArc () Q_DECL_OVERRIDE |
| VEllipticalArc & | operator= (const VEllipticalArc &arc) |
| operator = assignment operator More... | |
| void | Swap (VEllipticalArc &arc) Q_DECL_NOTHROW |
| QString | GetFormulaRotationAngle () const |
| GetFormulaRotationAngle return formula for rotation angle. More... | |
| void | SetFormulaRotationAngle (const QString &formula, qreal value) |
| qreal | GetRotationAngle () const |
| GetRotationAngle return rotation angle. More... | |
| QString | GetFormulaRadius1 () const |
| GetFormulaRadius1 return formula for major radius. More... | |
| void | SetFormulaRadius1 (const QString &formula, qreal value) |
| qreal | GetRadius1 () const |
| GetRadius1 return elliptical arc major radius. More... | |
| QString | GetFormulaRadius2 () const |
| GetFormulaRadius2 return formula for minor radius. More... | |
| void | SetFormulaRadius2 (const QString &formula, qreal value) |
| qreal | GetRadius2 () const |
| GetRadius2 return elliptical arc minor radius. More... | |
| virtual qreal | GetLength () const Q_DECL_OVERRIDE |
| GetLength return arc length. More... | |
| QPointF | GetP1 () const |
| GetP1 return point associated with start angle. More... | |
| QPointF | GetP2 () const |
| GetP2 return point associated with end angle. More... | |
| QTransform | getTransform () const |
| void | setTransform (const QTransform &matrix, bool combine=false) |
| virtual VPointF | GetCenter () const Q_DECL_OVERRIDE |
| virtual QVector< QPointF > | getPoints () const Q_DECL_OVERRIDE |
| GetPoints return list of points needed for drawing arc. More... | |
| virtual qreal | GetStartAngle () const Q_DECL_OVERRIDE |
| virtual qreal | GetEndAngle () const Q_DECL_OVERRIDE |
| QPointF | CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const |
| CutArc cut arc into two arcs. More... | |
| QPointF | CutArc (const qreal &length) const |
Public Member Functions inherited from VAbstractArc | |
| VAbstractArc (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, const QString &formulaF1, qreal f2, const QString &formulaF2, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, qreal f2, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VAbstractArc (const GOType &type, const QString &formulaLength, const VPointF ¢er, qreal f1, const QString &formulaF1, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VAbstractArc (const GOType &type, const VPointF ¢er, qreal f1, quint32 idObject=0, Draw mode=Draw::Calculation) | |
| VAbstractArc (const VAbstractArc &arc) | |
| virtual | ~VAbstractArc () |
| VAbstractArc & | operator= (const VAbstractArc &arc) |
| void | Swap (VAbstractArc &arc) Q_DECL_NOTHROW |
| QString | GetFormulaF1 () const |
| void | SetFormulaF1 (const QString &formula, qreal value) |
| QString | GetFormulaF2 () const |
| void | SetFormulaF2 (const QString &formula, qreal value) |
| void | SetCenter (const VPointF &point) |
| QString | GetFormulaLength () const |
| void | SetFormulaLength (const QString &formula, qreal value) |
| virtual void | setId (const quint32 &id) Q_DECL_OVERRIDE |
| setId set id object. More... | |
| virtual QString | NameForHistory (const QString &toolName) const Q_DECL_OVERRIDE |
| bool | IsFlipped () const |
| qreal | AngleArc () const |
Public Member Functions inherited from VAbstractCurve | |
| VAbstractCurve (const GOType &type, const quint32 &idObject=null_id, const Draw &mode=Draw::Calculation) | |
| VAbstractCurve (const VAbstractCurve &curve) | |
| virtual | ~VAbstractCurve () Q_DECL_OVERRIDE |
| VAbstractCurve & | operator= (const VAbstractCurve &curve) |
| void | Swap (VAbstractCurve &curve) Q_DECL_NOTHROW |
| QVector< QPointF > | GetSegmentPoints (const QPointF &begin, const QPointF &end, bool reverse=false) const |
| virtual QPainterPath | GetPath () const |
| qreal | GetLengthByPoint (const QPointF &point) const |
| virtual QVector< QPointF > | IntersectLine (const QLineF &line) const |
| IntersectLine return list of points for real intersection with line. More... | |
| virtual bool | IsIntersectLine (const QLineF &line) const |
| bool | isPointOnCurve (const QPointF &p) const |
| quint32 | GetDuplicate () const |
| void | SetDuplicate (quint32 number) |
| QString | getLineColor () const |
| void | setLineColor (const QString &color) |
| QString | GetPenStyle () const |
| void | SetPenStyle (const QString &penStyle) |
| QString | getLineWeight () const |
| getLineWeight return weight of the lines More... | |
| void | setLineWeight (const QString &lineWeight) |
| setLineWeight set weight of the lines More... | |
| QPointF | getFirstPoint () |
| QPointF | getLastPoint () |
| virtual QVector< DirectionArrow > | DirectionArrows () const |
Public Member Functions inherited from VGObject | |
| VGObject () | |
| VGObject default constructor. More... | |
| VGObject (const GOType &type, const quint32 &idObject=0, const Draw &mode=Draw::Calculation) | |
| VGObject constructor. More... | |
| VGObject (const VGObject &obj) | |
| VGObject copy constructor. More... | |
| virtual | ~VGObject () |
| VGObject & | operator= (const VGObject &obj) |
| operator = assignment operator. More... | |
| void | Swap (VGObject &obj) Q_DECL_NOTHROW |
| quint32 | getIdObject () const |
| getIdObject return parent id. More... | |
| void | setIdObject (const quint32 &value) |
| setIdObject set parent id. More... | |
| virtual QString | name () const |
| name return name graphical object. More... | |
| void | setName (const QString &name) |
| setName set name graphical object. More... | |
| Draw | getMode () const |
| getMode return mode creation. More... | |
| void | setMode (const Draw &value) |
| setMode set mode creation. More... | |
| GOType | getType () const |
| getType return object type. More... | |
| void | setType (const GOType &type) |
| quint32 | id () const |
| id return id object. More... | |
| quint32 | getIdTool () const |
Static Public Member Functions | |
| static qreal | normalizeAngle (qreal angle) |
Static Public Member Functions inherited from VAbstractCurve | |
| static QVector< QPointF > | GetSegmentPoints (const QVector< QPointF > &points, const QPointF &begin, const QPointF &end, bool reverse=false) |
| static bool | isPointOnCurve (const QVector< QPointF > &points, const QPointF &p) |
| static qreal | PathLength (const QVector< QPointF > &path) |
| static QVector< QPointF > | CurveIntersectLine (const QVector< QPointF > &points, const QLineF &line) |
| static QPainterPath | ShowDirection (const QVector< DirectionArrow > &arrows, qreal width) |
Static Public Member Functions inherited from VGObject | |
| static QLineF | BuildLine (const QPointF &p1, const qreal &length, const qreal &angle) |
| static QPointF | BuildRay (const QPointF &firstPoint, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p, const qreal &angle, const QRectF &scRect) |
| static QLineF | BuildAxis (const QPointF &p1, const QPointF &p2, const QRectF &scRect) |
| static int | ContactPoints (const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2) |
| static QPointF | LineIntersectRect (const QRectF &rec, const QLineF &line) |
| LineIntersectRect find point intersection line and rect. More... | |
| static int | IntersectionCircles (const QPointF &c1, double r1, const QPointF &c2, double r2, QPointF &p1, QPointF &p2) |
| static qint32 | LineIntersectCircle (const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) |
| LineIntersectCircle find point intersection line and circle. More... | |
| static QPointF | ClosestPoint (const QLineF &line, const QPointF &point) |
| ClosestPoint find point projection of point onto line. More... | |
| static QPointF | addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) |
| static void | LineCoefficients (const QLineF &line, qreal *a, qreal *b, qreal *c) |
| LineCoefficients coefficient for equation of segment. Segment equestion ax+by+c=0. More... | |
| static bool | IsPointOnLineSegment (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineSegment Check if the point is on the line segment. More... | |
| static bool | IsPointOnLineviaPDP (const QPointF &t, const QPointF &p1, const QPointF &p2) |
| IsPointOnLineviaPDP use the perp dot product (PDP) way. More... | |
| template<typename T > | |
| static QVector< T > | GetReversePoints (const QVector< T > &points) |
| GetReversePoint return revers container of points. More... | |
| static int | GetLengthContour (const QVector< QPointF > &contour, const QVector< QPointF > &newPoints) |
| GetLengthContour return length of contour. More... | |
Protected Member Functions | |
| virtual void | CreateName () Q_DECL_OVERRIDE |
| virtual void | FindF2 (qreal length) Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractArc | |
| void | SetFlipped (bool value) |
| void | SetFormulaLength (const QString &formula) |
Private Member Functions | |
| qreal | MaxLength () const |
| QPointF | getPoint (qreal angle) const |
| GetPoint return point associated with angle. More... | |
| qreal | getRealEndAngle () const |
Private Attributes | |
| QSharedDataPointer< VEllipticalArcData > | d |
Additional Inherited Members | |
Static Public Attributes inherited from VAbstractCurve | |
| static const qreal | lengthCurveDirectionArrow = 14 |
Static Public Attributes inherited from VGObject | |
| static const double | accuracyPointOnLine = (0.1555 / 25.4) * 96.0 |
Static Protected Member Functions inherited from VGObject | |
| static QTransform | flipTransform (const QLineF &axis) |
Definition at line 47 of file vellipticalarc.h.
| VEllipticalArc::VEllipticalArc | ( | ) |
VEllipticalArc default constructor.
Definition at line 54 of file vellipticalarc.cpp.
References EllipticalArc.
Referenced by CutArc().
| VEllipticalArc::VEllipticalArc | ( | const VPointF & | center, |
| qreal | radius1, | ||
| qreal | radius2, | ||
| const QString & | formulaRadius1, | ||
| const QString & | formulaRadius2, | ||
| qreal | f1, | ||
| const QString & | formulaF1, | ||
| qreal | f2, | ||
| const QString & | formulaF2, | ||
| qreal | rotationAngle, | ||
| const QString & | formulaRotationAngle, | ||
| quint32 | idObject = 0, |
||
| Draw | mode = Draw::Calculation |
||
| ) |
VEllipticalArc constructor.
| center | center point. |
| radius1 | arc major radius. |
| radius2 | arc minor radius. |
| f1 | start angle (degree). |
| f2 | end angle (degree). |
Definition at line 67 of file vellipticalarc.cpp.
References CreateName(), and EllipticalArc.
| VEllipticalArc::VEllipticalArc | ( | const VPointF & | center, |
| qreal | radius1, | ||
| qreal | radius2, | ||
| qreal | f1, | ||
| qreal | f2, | ||
| qreal | rotationAngle | ||
| ) |
Definition at line 78 of file vellipticalarc.cpp.
References Calculation, CreateName(), and EllipticalArc.
| VEllipticalArc::VEllipticalArc | ( | qreal | length, |
| const QString & | formulaLength, | ||
| const VPointF & | center, | ||
| qreal | radius1, | ||
| qreal | radius2, | ||
| const QString & | formulaRadius1, | ||
| const QString & | formulaRadius2, | ||
| qreal | f1, | ||
| const QString & | formulaF1, | ||
| qreal | rotationAngle, | ||
| const QString & | formulaRotationAngle, | ||
| quint32 | idObject = 0, |
||
| Draw | mode = Draw::Calculation |
||
| ) |
Definition at line 87 of file vellipticalarc.cpp.
References CreateName(), EllipticalArc, and FindF2().
| VEllipticalArc::VEllipticalArc | ( | qreal | length, |
| const VPointF & | center, | ||
| qreal | radius1, | ||
| qreal | radius2, | ||
| qreal | f1, | ||
| qreal | rotationAngle | ||
| ) |
Definition at line 99 of file vellipticalarc.cpp.
References Calculation, CreateName(), EllipticalArc, and FindF2().
| VEllipticalArc::VEllipticalArc | ( | const VEllipticalArc & | arc | ) |
VEllipticalArc copy constructor.
| arc | arc |
Definition at line 113 of file vellipticalarc.cpp.
|
virtual |
Definition at line 193 of file vellipticalarc.cpp.
|
protectedvirtual |
Implements VAbstractCurve.
Definition at line 407 of file vellipticalarc.cpp.
References ELARC_, GetCenter(), VAbstractCurve::GetDuplicate(), VGObject::id(), VGObject::name(), NULL_ID, and VGObject::setName().
Referenced by VEllipticalArc().
| QPointF VEllipticalArc::CutArc | ( | const qreal & | length | ) | const |
Definition at line 399 of file vellipticalarc.cpp.
References CutArc().
| QPointF VEllipticalArc::CutArc | ( | const qreal & | length, |
| VEllipticalArc & | arc1, | ||
| VEllipticalArc & | arc2 | ||
| ) | const |
CutArc cut arc into two arcs.
| length | length first arc. |
| arc1 | first arc. |
| arc2 | second arc. |
Definition at line 356 of file vellipticalarc.cpp.
References d, GetCenter(), GetEndAngle(), VAbstractArc::GetFormulaF1(), VAbstractArc::GetFormulaF2(), GetFormulaRotationAngle(), VGObject::getIdObject(), GetLength(), VGObject::getMode(), GetP1(), GetStartAngle(), Mm, ToPixel(), and VEllipticalArc().
Referenced by CutArc().
|
protectedvirtual |
Implements VAbstractArc.
Definition at line 425 of file vellipticalarc.cpp.
References d, GetCenter(), GetLength(), GetStartAngle(), MaxLength(), Mm, qApp, VAbstractArc::SetFlipped(), VAbstractArc::SetFormulaF2(), VAbstractArc::SetFormulaLength(), and ToPixel().
Referenced by VEllipticalArc().
| VEllipticalArc VEllipticalArc::Flip | ( | const QLineF & | axis, |
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 156 of file vellipticalarc.cpp.
References d, VGObject::flipTransform(), VAbstractArc::GetCenter(), VAbstractArc::GetEndAngle(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VAbstractCurve::GetPenStyle(), GetRadius1(), GetRadius2(), GetRotationAngle(), VAbstractArc::GetStartAngle(), VAbstractArc::IsFlipped(), VGObject::name(), VAbstractArc::SetFlipped(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), VAbstractCurve::SetPenStyle(), and setTransform().
|
virtual |
Reimplemented from VAbstractArc.
Definition at line 246 of file vellipticalarc.cpp.
References d, VAbstractArc::GetCenter(), VPointF::setX(), VPointF::setY(), and VPointF::toQPointF().
Referenced by CreateName(), CutArc(), FindF2(), GetEndAngle(), getPoint(), GetStartAngle(), and DialogEllipticalArc::pointNameChanged().
|
virtual |
Reimplemented from VAbstractArc.
Definition at line 343 of file vellipticalarc.cpp.
References GetCenter(), GetP2(), and GetRotationAngle().
Referenced by CutArc().
| QString VEllipticalArc::GetFormulaRadius1 | ( | ) | const |
GetFormulaRadius1 return formula for major radius.
Definition at line 489 of file vellipticalarc.cpp.
References d.
| QString VEllipticalArc::GetFormulaRadius2 | ( | ) | const |
GetFormulaRadius2 return formula for minor radius.
Definition at line 499 of file vellipticalarc.cpp.
References d.
| QString VEllipticalArc::GetFormulaRotationAngle | ( | ) | const |
GetFormulaRotationAngle return formula for rotation angle.
Definition at line 509 of file vellipticalarc.cpp.
References d.
Referenced by CutArc().
|
virtual |
GetLength return arc length.
Implements VAbstractCurve.
Definition at line 201 of file vellipticalarc.cpp.
References getPoints(), VAbstractArc::IsFlipped(), and VAbstractCurve::PathLength().
| QPointF VEllipticalArc::GetP1 | ( | ) | const |
GetP1 return point associated with start angle.
Definition at line 218 of file vellipticalarc.cpp.
References getPoint(), VAbstractArc::GetStartAngle(), and getTransform().
Referenced by CutArc(), getPoints(), and GetStartAngle().
| QPointF VEllipticalArc::GetP2 | ( | ) | const |
GetP2 return point associated with end angle.
Definition at line 228 of file vellipticalarc.cpp.
References VAbstractArc::GetEndAngle(), getPoint(), and getTransform().
Referenced by GetEndAngle(), and getPoints().
|
private |
GetPoint return point associated with angle.
Definition at line 262 of file vellipticalarc.cpp.
References VAbstractArc::GetCenter(), GetCenter(), GetRadius1(), GetRadius2(), GetRotationAngle(), SCASSERT, VPointF::toQPointF(), and VFuzzyComparePossibleNulls().
|
virtual |
GetPoints return list of points needed for drawing arc.
Implements VAbstractCurve.
Definition at line 293 of file vellipticalarc.cpp.
References d, VAbstractArc::GetCenter(), GetP1(), GetP2(), getRealEndAngle(), GetRotationAngle(), VAbstractArc::GetStartAngle(), VPointF::toQPointF(), and VFuzzyComparePoints().
Referenced by GetLength().
| qreal VEllipticalArc::GetRadius1 | ( | ) | const |
GetRadius1 return elliptical arc major radius.
Definition at line 540 of file vellipticalarc.cpp.
References d.
Referenced by Flip(), getPoint(), Move(), Rotate(), and VArcRadius::VArcRadius().
| qreal VEllipticalArc::GetRadius2 | ( | ) | const |
GetRadius2 return elliptical arc minor radius.
Definition at line 550 of file vellipticalarc.cpp.
References d.
Referenced by Flip(), getPoint(), Move(), Rotate(), and VArcRadius::VArcRadius().
|
private |
Definition at line 566 of file vellipticalarc.cpp.
References d, VAbstractArc::GetEndAngle(), normalizeAngle(), and VFuzzyComparePossibleNulls().
Referenced by getPoints().
| qreal VEllipticalArc::GetRotationAngle | ( | ) | const |
GetRotationAngle return rotation angle.
Definition at line 560 of file vellipticalarc.cpp.
References d.
Referenced by Flip(), GetEndAngle(), getPoint(), getPoints(), GetStartAngle(), Move(), and Rotate().
|
virtual |
Reimplemented from VAbstractArc.
Definition at line 337 of file vellipticalarc.cpp.
References GetCenter(), GetP1(), and GetRotationAngle().
| QTransform VEllipticalArc::getTransform | ( | ) | const |
Definition at line 234 of file vellipticalarc.cpp.
References d.
|
private |
| VEllipticalArc VEllipticalArc::Move | ( | qreal | length, |
| qreal | angle, | ||
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 170 of file vellipticalarc.cpp.
References d, VAbstractArc::GetCenter(), VAbstractArc::GetEndAngle(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VAbstractCurve::GetPenStyle(), GetRadius1(), GetRadius2(), GetRotationAngle(), VAbstractArc::GetStartAngle(), VAbstractArc::IsFlipped(), VPointF::Move(), VGObject::name(), VAbstractArc::SetFlipped(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), VAbstractCurve::SetPenStyle(), setTransform(), and VPointF::toQPointF().
|
inlinestatic |
Definition at line 128 of file vellipticalarc.h.
Referenced by getRealEndAngle().
| VEllipticalArc & VEllipticalArc::operator= | ( | const VEllipticalArc & | arc | ) |
operator = assignment operator
| arc | arc |
Definition at line 123 of file vellipticalarc.cpp.
References d, and VAbstractArc::operator=().
| VEllipticalArc VEllipticalArc::Rotate | ( | QPointF | originPoint, |
| qreal | degrees, | ||
| const QString & | prefix = QString() |
||
| ) | const |
Definition at line 135 of file vellipticalarc.cpp.
References d, VAbstractArc::GetCenter(), VAbstractArc::GetEndAngle(), VAbstractCurve::getLineColor(), VAbstractCurve::getLineWeight(), VAbstractCurve::GetPenStyle(), GetRadius1(), GetRadius2(), GetRotationAngle(), VAbstractArc::GetStartAngle(), VAbstractArc::IsFlipped(), VGObject::name(), VAbstractArc::SetFlipped(), VAbstractCurve::setLineColor(), VAbstractCurve::setLineWeight(), VGObject::setName(), VAbstractCurve::SetPenStyle(), and setTransform().
| void VEllipticalArc::SetFormulaRadius1 | ( | const QString & | formula, |
| qreal | value | ||
| ) |
Definition at line 515 of file vellipticalarc.cpp.
References d.
| void VEllipticalArc::SetFormulaRadius2 | ( | const QString & | formula, |
| qreal | value | ||
| ) |
Definition at line 522 of file vellipticalarc.cpp.
References d.
| void VEllipticalArc::SetFormulaRotationAngle | ( | const QString & | formula, |
| qreal | value | ||
| ) |
Definition at line 529 of file vellipticalarc.cpp.
References d.
| void VEllipticalArc::setTransform | ( | const QTransform & | matrix, |
| bool | combine = false |
||
| ) |
| void VEllipticalArc::Swap | ( | VEllipticalArc & | arc | ) |
Definition at line 47 of file vellipticalarc.cpp.
References VAbstractArc::Swap().
|
private |
Definition at line 118 of file vellipticalarc.h.
Referenced by CutArc(), FindF2(), Flip(), GetCenter(), GetFormulaRadius1(), GetFormulaRadius2(), GetFormulaRotationAngle(), getPoints(), GetRadius1(), GetRadius2(), getRealEndAngle(), GetRotationAngle(), getTransform(), MaxLength(), Move(), operator=(), Rotate(), SetFormulaRadius1(), SetFormulaRadius2(), SetFormulaRotationAngle(), and setTransform().