|
QCAD
Open Source 2D CAD
|
Go to the documentation of this file.
23 #include "../core_global.h"
48 double startParam,
double endParam,
68 virtual void setZ(
double z);
81 virtual QList<RVector>
getPointCloud(
double segmentLength)
const;
84 bool limited =
true,
double strictRange =
RMAXDOUBLE)
const;
86 void moveStartPoint(
const RVector& pos,
bool changeAngleOnly=
false);
87 void moveEndPoint(
const RVector& pos,
bool changeAngleOnly=
false);
89 QList<RVector> getFoci()
const;
92 void setCenter(
const RVector& vector);
95 void setMajorPoint(
const RVector& vector);
96 void setMinorPoint(
const RVector &p);
97 bool switchMajorMinor();
98 double getRatio()
const;
99 void setRatio(
double radius);
101 double getStartParam()
const;
102 void setStartParam(
double startParam);
104 double getEndParam()
const;
105 void setEndParam(
double endParam);
107 double getStartAngle()
const;
108 void setStartAngle(
double a);
110 double angleToParam(
double a)
const;
112 double getEndAngle()
const;
113 void setEndAngle(
double a);
115 double getAngleLength(
bool allowForZeroLength =
false)
const;
118 if (isFullEllipse()) {
124 if (isFullEllipse()) {
130 bool isReversed()
const;
131 void setReversed(
bool reversed);
140 double getMajorRadius()
const;
141 double getMinorRadius()
const;
142 double getAngle()
const;
143 void setAngle(
double a);
144 bool isFullEllipse()
const;
145 bool isCircular()
const;
147 double getSimpsonLength(
double f1,
double f2)
const;
149 bool contains(
const RVector& p)
const;
154 double getParamTo(
const RVector& pos)
const;
155 double getRadiusAt(
double param)
const;
156 RVector getPointAt(
double param)
const;
166 virtual QSharedPointer<RShape>
getTransformed(
const QTransform& transform)
const;
178 void correctMajorMinor();
179 double getSweep()
const;
181 QList<RVector> getBoxCorners();
183 QList<RLine> getTangents(
const RVector& point)
const;
185 QList<RSpline> approximateWithSplines()
const;
186 RPolyline approximateWithArcs(
int segments)
const;
189 virtual QList<QSharedPointer<RShape> >
splitAt(
const QList<RVector>& points)
const;
192 return ellipseProxy!=NULL;
199 if (ellipseProxy!=NULL) {
213 virtual void print(QDebug dbg)
const;
@ Ellipse
Definition: RShape.h:80
virtual QList< QSharedPointer< RShape > > splitAt(const QList< RVector > &points) const
Definition: RShape.cpp:2114
virtual RShape::Type getShapeType() const
Definition: REllipse.h:54
virtual QSharedPointer< RShape > getTransformed(const QTransform &transform) const =0
virtual bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition: RShape.h:322
double endParam
Getter function for this property: getEndParam Setter function for this property: setEndParam
Definition: REllipse.h:240
Proxy for advanced ellipse functionality.
Definition: REllipseProxy.h:38
virtual double getLength() const =0
virtual bool trimStartPoint(double trimDist)
Definition: REllipse.h:171
RVector majorPoint
Getter function for this property: getMajorPoint Setter function for this property: setMajorPoint
Definition: REllipse.h:225
virtual bool move(const RVector &offset)=0
virtual QList< RVector > getMiddlePoints() const =0
Side
Side used for side of a point relative to an entity (right hand or left hand side)
Definition: RS.h:205
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
virtual double getAngleAtPoint(const RVector &pos) const
Definition: RShape.h:249
Ending
Entity ending.
Definition: RS.h:215
@ FromStart
Definition: RS.h:264
virtual QList< RVector > getVectorProperties() const
Definition: RShape.h:165
static REllipseProxy * ellipseProxy
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: REllipse.h:248
virtual QList< RVector > getCenterPoints() const =0
bool reversed
Getter function for this property: isReversed Setter function for this property: setReversed
Definition: REllipse.h:245
virtual bool isDirected() const
Definition: REllipse.h:62
RVector center
Getter function for this property: getCenter Setter function for this property: setCenter
Definition: REllipse.h:220
Low-level mathematical representation of a line.
Definition: RLine.h:41
virtual RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition: RShape.h:339
double startParam
Getter function for this property: getStartParam Setter function for this property: setStartParam
Definition: REllipse.h:235
Type
Definition: RShape.h:74
static REllipseProxy * getEllipseProxy()
Definition: REllipse.h:208
virtual bool scale(double scaleFactor, const RVector ¢er=RVector())
Definition: RShape.cpp:1755
Interface for geometrical shape classes.
Definition: RShape.h:72
virtual bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition: RShape.h:303
#define RDEFAULT_RVECTOR
Definition: RVector.h:37
virtual RVector getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const =0
Q_DECLARE_METATYPE(RMath *)
virtual REllipse * clone() const
Definition: REllipse.h:58
virtual double getDirection1() const
Definition: RShape.h:271
static void setEllipseProxy(REllipseProxy *p)
Definition: REllipse.h:198
virtual QList< double > getDoubleProperties() const
Definition: RShape.h:167
virtual QList< bool > getBoolProperties() const
Definition: RShape.h:168
virtual QList< RVector > getPointCloud(double segmentLength) const =0
virtual RBox getBoundingBox() const =0
virtual RS::Side getSideOfPoint(const RVector &point) const
Definition: RShape.h:278
virtual QList< RVector > getEndPoints() const =0
#define RMAXDOUBLE
Definition: RMath.h:63
virtual RVector getStartPoint() const
Definition: RShape.h:283
virtual bool mirror(const RLine &axis)=0
Low-level mathematical representation of an ellipse or ellipse arc.
Definition: REllipse.h:42
virtual QList< RVector > getPointsWithDistanceToEnd(double distance, int from=RS::FromAny) const =0
double ratio
Getter function for this property: getRatio Setter function for this property: setRatio
Definition: REllipse.h:230
virtual void setZ(double z)=0
@ FromAny
Start or end.
Definition: RS.h:266
virtual double getDirection2() const
Definition: RShape.h:274
virtual void print(QDebug dbg) const
Definition: RShape.cpp:1759
bool isParamWithinArc(double a) const
Definition: REllipse.h:123
virtual RVector getMiddlePoint() const
Definition: RShape.h:289
bool isAngleWithinArc(double a) const
Definition: REllipse.h:117
static bool isAngleBetween(double a, double a1, double a2, bool reversed)
Tests if angle a is between a1 and a2.
Definition: RMath.cpp:599
virtual bool reverse()
Definition: RShape.h:293
Represents a box e.g.
Definition: RBox.h:43
static const RVector invalid
invalid vector
Definition: RVector.h:322
From
End used to specify from which end of a shape to measure a distance.
Definition: RS.h:263
virtual double getAngleAt(double distance, RS::From from=RS::FromStart) const
Definition: RShape.h:244
virtual QList< QSharedPointer< RShape > > getOffsetShapes(double distance, int number, RS::Side side, const RVector &position=RVector::invalid)
Definition: RShape.cpp:1941
virtual RVector getEndPoint() const
Definition: RShape.h:286
virtual bool trimEndPoint(double trimDist)
Definition: REllipse.h:174
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition: RPolyline.h:49
static bool hasProxy()
Definition: REllipse.h:191
#define QCADCORE_EXPORT
Definition: core_global.h:10
virtual bool rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR)=0