49 double startParam,
double endParam,
60 virtual QSharedPointer<RShape>
clone()
const {
61 return QSharedPointer<RShape>(
new REllipse(*
this));
65 return QSharedPointer<REllipse>(
new REllipse(*
this));
74 virtual void setZ(
double z);
87 virtual QList<RVector>
getPointCloud(
double segmentLength)
const;
90 bool limited =
true,
double strictRange =
RMAXDOUBLE)
const;
92 void moveStartPoint(
const RVector& pos,
bool changeAngleOnly=
false);
93 void moveEndPoint(
const RVector& pos,
bool changeAngleOnly=
false);
95 QList<RVector> getFoci()
const;
98 void setCenter(
const RVector& vector);
101 void setMajorPoint(
const RVector& vector);
102 void setMinorPoint(
const RVector &p);
103 bool switchMajorMinor();
104 double getRatio()
const;
105 void setRatio(
double radius);
107 double getStartParam()
const;
108 void setStartParam(
double startParam);
110 double getEndParam()
const;
111 void setEndParam(
double endParam);
113 double getStartAngle()
const;
114 void setStartAngle(
double a);
116 double angleToParam(
double a)
const;
118 double getEndAngle()
const;
119 void setEndAngle(
double a);
121 double getAngleLength(
bool allowForZeroLength =
false)
const;
124 if (isFullEllipse()) {
130 if (isFullEllipse()) {
136 bool isReversed()
const;
137 void setReversed(
bool reversed);
146 double getMajorRadius()
const;
147 double getMinorRadius()
const;
148 double getAngle()
const;
149 void setAngle(
double a);
150 bool isFullEllipse()
const;
151 bool isCircular()
const;
153 double getSimpsonLength(
double f1,
double f2)
const;
155 bool contains(
const RVector& p)
const;
160 double getParamTo(
const RVector& pos)
const;
161 double getRadiusAt(
double param)
const;
162 RVector getPointAt(
double param)
const;
174 virtual QSharedPointer<RShape>
getTransformed(
const QTransform& transform)
const;
186 void correctMajorMinor();
187 double getSweep()
const;
189 QList<RVector> getBoxCorners();
191 QList<RLine> getTangents(
const RVector& point)
const;
194 QList<RSpline> approximateWithSplines()
const;
195 RPolyline approximateWithArcs(
int segments)
const;
198 virtual QList<QSharedPointer<RShape> >
splitAt(
const QList<RVector>& points)
const;
201 return ellipseProxy!=
NULL;
208 if (ellipseProxy!=
NULL) {
221#if QT_VERSION >= 0x060000
232 virtual void print(QDebug dbg)
const;
Q_DECLARE_METATYPE(RMath *)
#define RMAXDOUBLE
Definition RMath.h:66
#define RDEFAULT_RVECTOR
Definition RVector.h:38
Represents a box e.g.
Definition RBox.h:46
Low-level mathematical representation of an ellipse or ellipse arc.
Definition REllipse.h:43
double startParam
Getter function for this property: getStartParam Setter function for this property: setStartParam
Definition REllipse.h:254
double ratio
Getter function for this property: getRatio Setter function for this property: setRatio
Definition REllipse.h:249
virtual RShape::Type getShapeType() const
Definition REllipse.h:56
RVector majorPoint
Getter function for this property: getMajorPoint Setter function for this property: setMajorPoint
Definition REllipse.h:244
RVector center
Getter function for this property: getCenter Setter function for this property: setCenter
Definition REllipse.h:239
double endParam
Getter function for this property: getEndParam Setter function for this property: setEndParam
Definition REllipse.h:259
bool reversed
Getter function for this property: isReversed Setter function for this property: setReversed
Definition REllipse.h:264
virtual bool isDirected() const
Definition REllipse.h:68
static void setEllipseProxy(REllipseProxy *p)
Definition REllipse.h:207
virtual QSharedPointer< RShape > clone() const
Definition REllipse.h:60
virtual bool trimStartPoint(double trimDist)
Definition REllipse.h:179
static REllipseProxy * getEllipseProxy()
Definition REllipse.h:217
QSharedPointer< REllipse > cloneToEllipse() const
Definition REllipse.h:64
static bool hasProxy()
Definition REllipse.h:200
static REllipseProxy * ellipseProxy
Copyright (c) 2011-2018 by Andrew Mustun.
Definition REllipse.h:267
virtual bool trimEndPoint(double trimDist)
Definition REllipse.h:182
bool isAngleWithinArc(double a) const
Definition REllipse.h:123
bool isParamWithinArc(double a) const
Definition REllipse.h:129
Proxy for advanced ellipse functionality.
Definition REllipseProxy.h:40
Low-level mathematical representation of a line.
Definition RLine.h:41
static bool isAngleBetween(double a, double a1, double a2, bool reversed)
Tests if angle a is between a1 and a2.
Definition RMath.cpp:683
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition RPolyline.h:50
From
End used to specify from which end of a shape to measure a distance.
Definition RS.h:371
@ FromStart
Definition RS.h:372
@ FromAny
Start or end.
Definition RS.h:374
Side
Side used for side of a point relative to an entity (right hand or left hand side)
Definition RS.h:313
Ending
Entity ending.
Definition RS.h:323
Interface for geometrical shape classes.
Definition RShape.h:72
virtual QList< QSharedPointer< RShape > > getOffsetShapes(double distance, int number, RS::Side side, const RVector &position=RVector::invalid)
Definition RShape.cpp:2061
virtual bool isValid() const
Definition RShape.h:92
virtual RVector getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const =0
virtual QList< RVector > getPointCloud(double segmentLength) const =0
virtual bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RShape.h:309
virtual RVector getStartPoint() const
Definition RShape.h:289
virtual QList< RVector > getPointsWithDistanceToEnd(double distance, int from=RS::FromAny) const =0
virtual RVector getEndPoint() const
Definition RShape.h:292
virtual bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RShape.h:328
Type
Definition RShape.h:74
@ Ellipse
Definition RShape.h:80
virtual QList< RVector > getCenterPoints() const =0
virtual bool move(const RVector &offset)=0
virtual QList< double > getDoubleProperties() const
Definition RShape.h:172
virtual double getAngleAt(double distance, RS::From from=RS::FromStart) const
Definition RShape.h:249
virtual bool rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR)=0
virtual void print(QDebug dbg) const
Definition RShape.cpp:1760
virtual QList< QSharedPointer< RShape > > splitAt(const QList< RVector > &points) const
Definition RShape.cpp:2234
virtual bool mirror(const RLine &axis)=0
virtual double getDirection1() const
Definition RShape.h:277
virtual QList< RVector > getEndPoints() const =0
virtual RVector getMiddlePoint() const
Definition RShape.h:295
virtual double getAngleAtPoint(const RVector &pos) const
Definition RShape.h:254
virtual double getDirection2() const
Definition RShape.h:280
virtual RS::Side getSideOfPoint(const RVector &point) const
Definition RShape.h:284
virtual QList< RVector > getVectorProperties() const
Definition RShape.h:170
virtual QList< RVector > getMiddlePoints() const =0
virtual RVector getPointOnShape() const
Definition RShape.cpp:174
virtual bool reverse()
Definition RShape.h:299
virtual void setZ(double z)=0
virtual QSharedPointer< RShape > getTransformed(const QTransform &transform) const =0
virtual RBox getBoundingBox() const =0
virtual RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition RShape.h:345
virtual bool scale(double scaleFactor, const RVector ¢er=RVector())
Definition RShape.cpp:1756
virtual QList< bool > getBoolProperties() const
Definition RShape.h:173
virtual double getLength() const =0
Represents a 3d vector (x/y/z).
Definition RVector.h:47
static const RVector invalid
invalid vector
Definition RVector.h:335
#define QCADCORE_EXPORT
Definition core_global.h:10
#define NULL
Definition opennurbs_system.h:256