54 #include <QGraphicsLineItem>
55 #include <QGraphicsPathItem>
57 #include <QPainterPath>
58 #include <QSharedPointer>
62 #include "../../tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.h"
63 #include "../ifc/ifcdef.h"
64 #include "../vgeometry/vabstractcurve.h"
65 #include "../vgeometry/varc.h"
66 #include "../vgeometry/vgobject.h"
67 #include "../vgeometry/vpointf.h"
68 #include "../vpatterndb/vcontainer.h"
69 #include "../visualization.h"
75 point(nullptr), tangent(nullptr), arcPath(nullptr), tangentLine2(nullptr)
77 arcPath = InitItem<VCurvePathItem>(Qt::darkGreen,
this);
94 DrawPath(
arcPath, arc->GetPath(), arc->DirectionArrows(), Qt::darkGreen, Qt::SolidLine,
97 FindRays(
static_cast<QPointF
>(*tan), arc.data());
122 const QPointF center =
static_cast<QPointF
>(arc->
GetCenter());
126 QLineF r1Arc(center, p1);
127 r1Arc.setLength(radius+10);
129 QLineF r2Arc(center, p2);
130 r2Arc.setLength(radius+10);
159 this->setVisible(
false);
173 this->setVisible(
false);
virtual VPointF GetCenter() const
virtual bool IsIntersectLine(const QLineF &line) const
VArc class for anticlockwise arc.
qreal GetRadius() const
GetRadius return formula for radius.
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
static int ContactPoints(const QPointF &p, const QPointF ¢er, qreal radius, QPointF &p1, QPointF &p2)
The VPointF class keep data of point.
void DrawRay(VScaledLine *lineItem, const QPointF &p, const QPointF &pTangent, const QColor &color, Qt::PenStyle style)
void DrawPoint(QGraphicsEllipseItem *point, const QPointF &pos, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
void DrawPath(VCurvePathItem *pathItem, const QPainterPath &path, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap)
VScaledEllipse * InitPoint(const QColor &color, QGraphicsItem *parent, qreal z=0) const