54 #include <QGraphicsEllipseItem>
55 #include <QGraphicsPathItem>
56 #include <QPainterPath>
58 #include <QSharedPointer>
62 #include "../ifc/ifcdef.h"
63 #include "../vgeometry/vabstractcubicbezier.h"
64 #include "../vgeometry/vabstractcurve.h"
65 #include "../vgeometry/vpointf.h"
66 #include "../vgeometry/vspline.h"
67 #include "../vpatterndb/vcontainer.h"
68 #include "../visualization.h"
70 #include "../vwidgets/scalesceneitems.h"
74 :
VisPath(data, parent), point(nullptr), spl1(nullptr), spl2(nullptr), length(0)
76 spl1 = InitItem<VCurvePathItem>(Qt::darkGreen,
this);
77 spl1->setFlag(QGraphicsItem::ItemStacksBehindParent,
false);
78 spl2 = InitItem<VCurvePathItem>(Qt::darkRed,
this);
79 spl2->setFlag(QGraphicsItem::ItemStacksBehindParent,
false);
83 point->setFlag(QGraphicsItem::ItemStacksBehindParent,
false);
94 if (not qFuzzyIsNull(
length))
100 const QPointF p = spl->CutSpline (
length, spl1p2, spl1p3, spl2p2, spl2p3 );
virtual QVector< DirectionArrow > DirectionArrows() const
virtual QPainterPath GetPath() const
The VContainer class container of all variables.
const QSharedPointer< T > GeometricObject(const quint32 &id) const
The VPointF class keep data of point.
VSpline class that implements the spline.
void DrawPoint(QGraphicsEllipseItem *point, const QPointF &pos, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
static qreal FindLength(const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)
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