QCAD
Open Source 2D CAD
RPolylineProxy.h
Go to the documentation of this file.
1 
20 #ifndef RPOLYLINEPROXY_H
21 #define RPOLYLINEPROXY_H
22 
23 #include "../core_global.h"
24 
25 #include <RS.h>
26 
27 class RArc;
28 class RExporter;
29 class RLine;
30 class RPainterPath;
31 class RPolyline;
32 class RVector;
33 
34 
42 public:
43  virtual ~RPolylineProxy() {}
44  virtual RS::Ending getTrimEnd(RPolyline& polyline, const RVector& trimPoint, const RVector& clickPoint) = 0;
45  virtual bool trimStartPoint(RPolyline& polyline, const RVector& trimPoint, const RVector& clickPoint, bool extend = false) = 0;
46  virtual bool trimEndPoint(RPolyline& polyline, const RVector& trimPoint, const RVector& clickPoint, bool extend = false) = 0;
47  virtual bool trimStartPoint(RPolyline& polyline, double trimDist) = 0;
48  virtual bool trimEndPoint(RPolyline& polyline, double trimDist) = 0;
49  virtual bool relocateStartPoint(RPolyline& polyline, const RVector& p) = 0;
50  virtual bool relocateStartPoint(RPolyline& polyline, double dist) = 0;
51  virtual int getSegmentAtDist(const RPolyline& polyline, double dist) = 0;
52 
53  virtual QList<RPolyline> renderThickPolyline(const RPolyline& polyline) = 0;
54  virtual QList<RVector> verifyTangency(const RPolyline& polyline, double toleranceMin = RS::AngleTolerance, double toleranceMax = M_PI_4) = 0;
55  virtual double getArea(const RPolyline& polyline, double segmentLength) = 0;
56  virtual RVector getPointInside(const RPolyline& polyline) = 0;
57 
58  virtual QList<RPolyline> splitAtDiscontinuities(const RPolyline& polyline, double tolerance) = 0;
59 };
60 
61 #endif
static const double AngleTolerance
Definition: RS.h:577
Ending
Entity ending.
Definition: RS.h:152
#define M_PI_4
Definition: RMath.h:43
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
virtual ~RPolylineProxy()
Definition: RPolylineProxy.h:43
Low-level mathematical representation of an arc.
Definition: RArc.h:40
#define QCADCORE_EXPORT
Definition: core_global.h:10
Extended painter path with a z-level and a pen.
Definition: RPainterPath.h:46
void trimEndPoint(void shape, void trimPoint, void clickPoint)
Definition: library.js:819
Low-level mathematical representation of a line.
Definition: RLine.h:41
void trimStartPoint(void shape, void trimPoint, void clickPoint)
Definition: library.js:147
Abstract base class for exporters.
Definition: RExporter.h:71
Proxy for advanced polyline functionality.
Definition: RPolylineProxy.h:41
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition: RPolyline.h:49