55 #include <QGraphicsLineItem>
56 #include <QGraphicsPathItem>
58 #include <QPainterPath>
60 #include <QSharedPointer>
64 #include "../../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.h"
65 #include "../ifc/ifcdef.h"
66 #include "../vgeometry/vabstractcurve.h"
67 #include "../vgeometry/vpointf.h"
68 #include "../vpatterndb/vcontainer.h"
69 #include "../visualization.h"
74 :
VisLine(data, parent), axisPointId(
NULL_ID), angle(-1), point(nullptr), basePoint(nullptr), baseLine(nullptr),
75 axisLine(nullptr), visCurve(nullptr)
79 visCurve = InitItem<VCurvePathItem>(Qt::darkGreen,
this);
105 axis =
Axis(
static_cast<QPointF
>(*first),
angle);
110 QPointF intersectPoint;
112 curve, &intersectPoint);
115 QLineF axis_line(
static_cast<QPointF
>(*first), intersectPoint);
121 "Hold <b>SHIFT</b> to constrain angle, "
122 "Press <b>ENTER</b> to finish tool creation ")
123 .arg(this->line().
angle());
131 return QString(
"%1").arg(this->line().
angle());
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
The VPointF class keep data of point.
QLineF Axis(const QPointF &p, const qreal &angle) const
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)
virtual void DrawLine(VScaledLine *lineItem, const QLineF &line, const QColor &color, const qreal &lineWeight, Qt::PenStyle style=Qt::SolidLine)
VScaledEllipse * InitPoint(const QColor &color, QGraphicsItem *parent, qreal z=0) const
static qreal FindVal(const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)
static Q_REQUIRED_RESULT bool VFuzzyComparePossibleNulls(double p1, double p2)