20#ifndef RELLIPSEENTITY_H
21#define RELLIPSEENTITY_H
91 virtual QSharedPointer<RObject>
clone()
const {
103 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
105 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
120 return data.getCenter();
124 return data.getMajorPoint();
128 return data.getMajorRadius();
132 return data.getMinorRadius();
136 return data.getRatio();
140 return data.getAngle();
144 data.setRatio(ratio);
148 return data.getStartAngle();
152 return data.getStartParam();
156 data.setStartParam(param);
160 return data.getEndAngle();
164 return data.getEndParam();
168 data.setEndParam(param);
172 return data.getAngleLength();
176 return data.getAngleAt(distance, from);
180 return data.isReversed();
184 data.setReversed(reversed);
188 return data.getStartPoint();
192 return data.getEndPoint();
196 return data.isFullEllipse();
200 return data.getDirection1();
204 return data.getDirection2();
208 return data.reverse();
212 return data.getSideOfPoint(point);
216 return data.getParamTo(pos);
220 return data.getTrimEnd(trimPoint, clickPoint);
224 return data.trimStartPoint(trimPoint, clickPoint, extend);
228 return data.trimEndPoint(trimPoint, clickPoint, extend);
232 return data.getLength();
236 return data.getSweep();
240 return data.getPointAt(angle);
244 return data.approximateWithSplines();
248 return data.approximateWithArcs(segments);
252 virtual void print(QDebug dbg)
const;
Q_DECLARE_METATYPE(RMath *)
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Stores and manages all data that defines the geometry and appearance of an ellipse entity.
Definition REllipseData.h:43
Ellipse entity.
Definition REllipseEntity.h:38
double getDirection1() const
Definition REllipseEntity.h:199
double getMajorRadius() const
Definition REllipseEntity.h:127
RS::Side getSideOfPoint(const RVector &point) const
Definition REllipseEntity.h:211
static RPropertyTypeId PropertyHandle
Definition REllipseEntity.h:42
double getRatio() const
Definition REllipseEntity.h:135
static RPropertyTypeId PropertyCenterZ
Definition REllipseEntity.h:57
bool isReversed() const
Definition REllipseEntity.h:179
static RPropertyTypeId PropertyDrawOrder
Definition REllipseEntity.h:53
static RPropertyTypeId PropertyStartParam
Definition REllipseEntity.h:62
double getStartAngle() const
Definition REllipseEntity.h:147
static RPropertyTypeId PropertyLinetypeScale
Definition REllipseEntity.h:49
RVector getPointAt(double angle) const
Definition REllipseEntity.h:239
static RPropertyTypeId PropertyMajorPointY
Definition REllipseEntity.h:59
RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition REllipseEntity.h:219
static RPropertyTypeId PropertyLayer
Definition REllipseEntity.h:47
static RPropertyTypeId PropertyProtected
Definition REllipseEntity.h:43
double getStartParam() const
Definition REllipseEntity.h:151
static RPropertyTypeId PropertyStartPointY
Definition REllipseEntity.h:69
QSharedPointer< REllipseEntity > cloneToEllipseEntity() const
Definition REllipseEntity.h:95
RVector getCenter() const
Definition REllipseEntity.h:119
void setStartParam(double param)
Definition REllipseEntity.h:155
double getAngleAt(double distance, RS::From from) const
Definition REllipseEntity.h:175
bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition REllipseEntity.h:227
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition REllipseEntity.h:41
static RPropertyTypeId PropertyCenterX
Definition REllipseEntity.h:55
double getAngleLength() const
Definition REllipseEntity.h:171
virtual const REllipseData & getData() const
Definition REllipseEntity.h:115
virtual QSharedPointer< RObject > clone() const
Definition REllipseEntity.h:91
void setReversed(bool reversed)
Definition REllipseEntity.h:183
RVector getStartPoint() const
Definition REllipseEntity.h:187
double getParamTo(const RVector &pos)
Definition REllipseEntity.h:215
static RPropertyTypeId PropertyStartAngle
Definition REllipseEntity.h:64
static RS::EntityType getRtti()
Definition REllipseEntity.h:83
static RPropertyTypeId PropertyLineweight
Definition REllipseEntity.h:50
static RPropertyTypeId PropertyMajorPointZ
Definition REllipseEntity.h:60
static RPropertyTypeId PropertyType
Definition REllipseEntity.h:45
static RPropertyTypeId PropertyCircumference
Definition REllipseEntity.h:75
static RPropertyTypeId PropertyLinetype
Definition REllipseEntity.h:48
static RPropertyTypeId PropertyMajorPointX
Definition REllipseEntity.h:58
static RPropertyTypeId PropertyDisplayedColor
Definition REllipseEntity.h:52
static RPropertyTypeId PropertyReversed
Definition REllipseEntity.h:66
static RPropertyTypeId PropertyEndPointX
Definition REllipseEntity.h:71
bool isFullEllipse() const
Definition REllipseEntity.h:195
static RPropertyTypeId PropertyRatio
Definition REllipseEntity.h:61
double getDirection2() const
Definition REllipseEntity.h:203
double getSweep() const
Definition REllipseEntity.h:235
static RPropertyTypeId PropertyWorkingSet
Definition REllipseEntity.h:44
virtual REllipseData & getData()
Definition REllipseEntity.h:111
REllipseData data
Definition REllipseEntity.h:255
double getMinorRadius() const
Definition REllipseEntity.h:131
void setEndParam(double param)
Definition REllipseEntity.h:167
double getEndAngle() const
Definition REllipseEntity.h:159
static RPropertyTypeId PropertyBlock
Definition REllipseEntity.h:46
QList< RSpline > approximateWithSplines() const
Definition REllipseEntity.h:243
double getLength() const
Definition REllipseEntity.h:231
static RPropertyTypeId PropertyEndPointY
Definition REllipseEntity.h:72
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition REllipseEntity.h:87
static RPropertyTypeId PropertyEndAngle
Definition REllipseEntity.h:65
virtual bool reverse()
Definition REllipseEntity.h:207
RVector getMajorPoint() const
Definition REllipseEntity.h:123
bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition REllipseEntity.h:223
void setRatio(double ratio)
Definition REllipseEntity.h:143
static RPropertyTypeId PropertyCenterY
Definition REllipseEntity.h:56
RVector getEndPoint() const
Definition REllipseEntity.h:191
static RPropertyTypeId PropertyEndParam
Definition REllipseEntity.h:63
static RPropertyTypeId PropertyEndPointZ
Definition REllipseEntity.h:73
static RPropertyTypeId PropertyStartPointX
Definition REllipseEntity.h:68
double getEndParam() const
Definition REllipseEntity.h:163
static RPropertyTypeId PropertyStartPointZ
Definition REllipseEntity.h:70
static RPropertyTypeId PropertyColor
Definition REllipseEntity.h:51
RPolyline approximateWithArcs(int segments) const
Definition REllipseEntity.h:247
double getAngle() const
Definition REllipseEntity.h:139
Low-level mathematical representation of an ellipse or ellipse arc.
Definition REllipse.h:43
Base class for all entity classes.
Definition REntity.h:63
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition REntity.cpp:236
virtual QSharedPointer< REntity > scaleNonUniform(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)
Definition REntity.cpp:471
static void init()
Definition REntity.cpp:89
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition REntity.cpp:338
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0
Exports the entity to the given exporter.
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition REntity.cpp:487
Abstract base class for exporters.
Definition RExporter.h:78
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition RPolyline.h:50
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyTypeId.h:54
static QSet< RPropertyTypeId > getPropertyTypeIds(RS::EntityType type, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
Definition RPropertyTypeId.cpp:283
From
End used to specify from which end of a shape to measure a distance.
Definition RS.h:371
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityEllipse
Ellipse.
Definition RS.h:255
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
Transaction implementation.
Definition RTransaction.h:73
Represents a 3d vector (x/y/z).
Definition RVector.h:47
static const RVector invalid
invalid vector
Definition RVector.h:335
#define QCADENTITY_EXPORT
Definition entity_global.h:10
#define NULL
Definition opennurbs_system.h:256