84 virtual QSharedPointer<RObject>
clone()
const {
85 return QSharedPointer<RObject>(
new RLineEntity(*
this));
89 return QSharedPointer<RLineEntity>(
new RLineEntity(*
this));
94 virtual QPair<QVariant, RPropertyAttributes>
getProperty(
96 bool humanReadable =
false,
bool noAttributes =
false,
bool showOnRequest =
false);
108 void setShape(
const RLine& l);
111 data.setStartPoint(p);
115 return data.getStartPoint();
123 return data.getEndPoint();
127 return getData().getMiddlePoint();
131 return data.getAngle();
135 return data.getAngleAt(distance, from);
139 return data.getDirection1();
143 return data.getDirection2();
147 return data.reverse();
151 return data.getSideOfPoint(point);
155 return data.getTrimEnd(trimPoint, clickPoint);
159 return data.trimStartPoint(trimPoint, clickPoint, extend);
162 return data.trimEndPoint(trimPoint, clickPoint, extend);
166 return data.getLength();
170 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
Base class for all entity classes.
Definition REntity.h:63
virtual REntityData & getData()=0
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition REntity.cpp:236
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
Stores and manages all data that defines the geometry and appearance of a line entity.
Definition RLineData.h:42
Line entity.
Definition RLineEntity.h:38
static RPropertyTypeId PropertyLayer
Definition RLineEntity.h:47
static RPropertyTypeId PropertyMiddlePointY
Definition RLineEntity.h:59
virtual const RLineData & getData() const
Definition RLineEntity.h:104
static RPropertyTypeId PropertyDrawOrder
Definition RLineEntity.h:53
static RPropertyTypeId PropertyHandle
Definition RLineEntity.h:42
static RPropertyTypeId PropertyStartPointY
Definition RLineEntity.h:56
void setEndPoint(const RVector &p)
Definition RLineEntity.h:118
static RPropertyTypeId PropertyLinetypeScale
Definition RLineEntity.h:49
bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RLineEntity.h:158
static RPropertyTypeId PropertyTotalLength
Definition RLineEntity.h:67
static RPropertyTypeId PropertyBlock
Definition RLineEntity.h:46
bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RLineEntity.h:161
RVector getMiddlePoint() const
Definition RLineEntity.h:126
static RPropertyTypeId PropertyWorkingSet
Definition RLineEntity.h:44
double getDirection1() const
Definition RLineEntity.h:138
static RPropertyTypeId PropertyEndPointX
Definition RLineEntity.h:61
QSharedPointer< RLineEntity > cloneToLineEntity() const
Definition RLineEntity.h:88
static RPropertyTypeId PropertyCustom
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLineEntity.h:41
static RPropertyTypeId PropertyMiddlePointX
Definition RLineEntity.h:58
static RPropertyTypeId PropertyMiddlePointZ
Definition RLineEntity.h:60
virtual QSharedPointer< RObject > clone() const
Definition RLineEntity.h:84
double getDirection2() const
Definition RLineEntity.h:142
static RPropertyTypeId PropertyLinetype
Definition RLineEntity.h:48
static RPropertyTypeId PropertyLength
Definition RLineEntity.h:66
static RPropertyTypeId PropertyEndPointY
Definition RLineEntity.h:62
static RPropertyTypeId PropertyStartPointX
Definition RLineEntity.h:55
static RPropertyTypeId PropertyProtected
Definition RLineEntity.h:43
void setStartPoint(const RVector &p)
Definition RLineEntity.h:110
static RPropertyTypeId PropertyEndPointZ
Definition RLineEntity.h:63
RLineData data
Definition RLineEntity.h:173
RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition RLineEntity.h:154
RS::Side getSideOfPoint(const RVector &point) const
Definition RLineEntity.h:150
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
Definition RLineEntity.h:80
double getAngleAt(double distance, RS::From from) const
Definition RLineEntity.h:134
bool reverse()
Definition RLineEntity.h:146
RVector getStartPoint() const
Definition RLineEntity.h:114
static RS::EntityType getRtti()
Definition RLineEntity.h:76
virtual RLineData & getData()
Definition RLineEntity.h:100
static RPropertyTypeId PropertyColor
Definition RLineEntity.h:51
double getAngle() const
Definition RLineEntity.h:130
static RPropertyTypeId PropertyAngle
Definition RLineEntity.h:65
RVector getEndPoint() const
Definition RLineEntity.h:122
static RPropertyTypeId PropertyStartPointZ
Definition RLineEntity.h:57
static RPropertyTypeId PropertyType
Definition RLineEntity.h:45
double getLength() const
Definition RLineEntity.h:165
static RPropertyTypeId PropertyDisplayedColor
Definition RLineEntity.h:52
static RPropertyTypeId PropertyLineweight
Definition RLineEntity.h:50
Low-level mathematical representation of a line.
Definition RLine.h:41
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
@ EntityLine
Line.
Definition RS.h:249
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