55 #include <QGraphicsLineItem>
58 #include <QSharedPointer>
62 #include "../../tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.h"
63 #include "../ifc/ifcdef.h"
64 #include "../vgeometry/vpointf.h"
65 #include "../vpatterndb/vcontainer.h"
66 #include "../visualization.h"
71 :
VisLine(data, parent), point2Id(
NULL_ID), axisPointId(
NULL_ID), angle(-1), point(nullptr), lineP1(nullptr),
72 lineP2(nullptr), basePoint(nullptr), baseLine(nullptr), axisLine(nullptr), line_intersection(nullptr)
103 const QLineF base_line(
static_cast<QPointF
>(*first),
static_cast<QPointF
>(*second));
116 axis =
Axis(
static_cast<QPointF
>(*third),
angle);
122 QLineF axis_line(
static_cast<QPointF
>(*third), p);
129 "Hold <b>SHIFT</b> to constrain angle, "
130 "Press <b>ENTER</b> to finish tool creation")
131 .arg(this->line().
angle());
140 return QString(
"%1").arg(this->line().
angle());
165 QLineF::IntersectType intersect = axis_line.intersects(base_line, &p);
166 if (intersect == QLineF::UnboundedIntersection)
171 else if (intersect == QLineF::BoundedIntersection || intersect == QLineF::NoIntersection)
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)
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)