QCAD
Open Source 2D CAD
REntity.h
Go to the documentation of this file.
1 
20 #ifndef RENTITY_H
21 #define RENTITY_H
22 
23 #include "core_global.h"
24 
25 #include <QList>
26 #include <QStack>
27 
28 #include "RBox.h"
29 #include "RColor.h"
30 #include "RDebug.h"
31 #include "REntityData.h"
32 #include "RLayer.h"
33 #include "RLineweight.h"
34 #include "RMatrix.h"
35 #include "RObject.h"
36 #include "RPropertyAttributes.h"
37 #include "RPropertyTypeId.h"
38 #include "RVector.h"
39 #include "RExplodable.h"
40 
41 class RDocument;
42 class REntity;
44 class RExporter;
45 class RViewportData;
46 
47 #ifndef RDEFAULT_QSET_INT
48 #define RDEFAULT_QSET_INT QSet<int>()
49 #endif
50 
51 #ifndef RDEFAULT_TOLERANCE_1E_MIN4
52 #define RDEFAULT_TOLERANCE_1E_MIN4 1.0e-4
53 #endif
54 
66 
67  Q_DECLARE_TR_FUNCTIONS(REntity)
68 
69  friend class RStorage;
70 
71 public:
72  static RPropertyTypeId PropertyCustom;
73  static RPropertyTypeId PropertyHandle;
74  static RPropertyTypeId PropertyProtected;
75  static RPropertyTypeId PropertyWorkingSet;
76  static RPropertyTypeId PropertyType;
77  static RPropertyTypeId PropertyBlock;
78  static RPropertyTypeId PropertyLayer;
79  static RPropertyTypeId PropertyLinetype;
80  static RPropertyTypeId PropertyLinetypeScale;
81  static RPropertyTypeId PropertyLineweight;
82  static RPropertyTypeId PropertyColor;
83  static RPropertyTypeId PropertyDisplayedColor;
84  static RPropertyTypeId PropertyDrawOrder;
85 
86  static RPropertyTypeId PropertyMinX;
87  static RPropertyTypeId PropertyMinY;
88  static RPropertyTypeId PropertyMaxX;
89  static RPropertyTypeId PropertyMaxY;
90  static RPropertyTypeId PropertySizeX;
91  static RPropertyTypeId PropertySizeY;
92 
93 public:
94  REntity(RDocument* document);
95  REntity(const REntity& other);
96  virtual ~REntity();
97 
98  static void init();
99 
100  static QSet<RPropertyTypeId> getStaticPropertyTypeIds() {
102  }
103 
104  void setDocument(RDocument* document) {
105  RObject::setDocument(document);
106  getData().setDocument(document);
107  }
108 
109  virtual REntity* clone() const = 0;
110 
111  virtual RS::EntityType getType() const {
112  return getData().getType();
113  }
114 
115  virtual bool isPointType() const {
116  return getData().isPointType();
117  }
118 
119  static bool isComplex(const RS::EntityType type);
120  static bool isDimension(const RS::EntityType type);
121  static bool isTextBased(const RS::EntityType type);
122 
126  virtual REntityData& getData() = 0;
127 
131  virtual const REntityData& getData() const = 0;
132 
133  virtual bool isValid() const {
134  return getData().isValid();
135  }
136  virtual bool isSane() const {
137  return getData().isSane();
138  }
139 
145 // virtual bool isPartOfBlockReference(REntity::Id blockRefId) const {
146 // Q_UNUSED(blockRefId)
147 
148 // return false;
149 // }
150 
154 // virtual bool getAutoVisualize() const {
155 // return true;
156 // }
157 
161  virtual bool isSelected() const {
162  return getData().isSelected();
163  }
164 
165  virtual void setSelected(bool on);
166 
170  virtual bool isSelectedWorkingSet() const {
171  return getData().isSelectedWorkingSet();
172  }
173 
174  virtual void setSelectedWorkingSet(bool on) {
175  getData().setSelectedWorkingSet(on);
176  }
177 
178  virtual bool isUpdatesEnabled() const {
179  return getData().isUpdatesEnabled();
180  }
181 
182  void setUpdatesEnabled(bool on) {
183  getData().setUpdatesEnabled(on);
184  }
185 
186  virtual bool cloneOnChange() const {
187  return getData().cloneOnChange();
188  }
189 
193  void setDrawOrder(int drawOrder) {
194  getData().setDrawOrder(drawOrder);
195  }
196 
200  int getDrawOrder() const {
201  return getData().getDrawOrder();
202  }
203 
207  void setLayerId(RLayer::Id layerId) {
208  getData().setLayerId(layerId);
209  }
210 
214  void setLayerName(const QString& n) {
215  getData().setLayerName(n);
216  }
217 
222  return getData().getLayerId();
223  }
224 
228  QString getLayerName() const {
229  return getData().getLayerName();
230  }
231 
235  void setBlockId(RBlock::Id blockId) {
236  getData().setBlockId(blockId);
237  }
238 
243  return getData().getBlockId();
244  }
245 
249  QString getBlockName() const {
250  return getData().getBlockName();
251  }
252 
257  return getData().getParentId();
258  }
259 
263  void setLinetypeId(RLinetype::Id linetypeId) {
264  getData().setLinetypeId(linetypeId);
265  }
266 
270  void setLinetypePattern(const RLinetypePattern& linetypePattern) {
271  getData().setLinetypePattern(linetypePattern);
272  }
273 
278  return getData().getLinetypeId();
279  }
280 
281  RLinetype::Id getLinetypeId(bool resolve,
282  const QStack<REntity*>& blockRefStack) const;
283 
288  return getData().getLinetypePattern();
289  }
290 
294  void setLinetypeScale(double linetypeScale) {
295  getData().setLinetypeScale(linetypeScale);
296  }
297 
301  double getLinetypeScale() const {
302  return getData().getLinetypeScale();
303  }
304 
309  getData().setLineweight(lineweight);
310  }
311 
316  return getData().getLineweight();
317  }
318 
319  RLineweight::Lineweight getLineweight(bool resolve,
320  const QStack<REntity*>& blockRefStack) const;
321 
322  double getLineweightInUnits(const QStack<REntity*>& blockRefStack) const;
323 
327  void setColor(const RColor& color) {
328  getData().setColor(color);
329  }
330 
334  RColor getColor() const {
335  return getData().getColor();
336  }
337 
338  RColor getColor(const RColor& unresolvedColor, const QStack<REntity*>& blockRefStack);
339  RColor getColor(bool resolve, const QStack<REntity*>& blockRefStack);
340 
342  return getData().getDisplayColor();
343  }
344 
345  void copyAttributesFrom(const REntity* entity, bool copyBlockId=true);
346  void copyAttributesFrom(const REntityData& entityData, bool copyBlockId=true);
347 
351  virtual RBox getBoundingBox(bool ignoreEmpty=false) const {
352  return getData().getBoundingBox(ignoreEmpty);
353  }
354 
358  virtual void to2D() {
359  getData().to2D();
360  }
361 
365  virtual void setZ(double z) {
366  getData().setZ(z);
367  }
368 
372  virtual QList<RBox> getBoundingBoxes(bool ignoreEmpty=false) const {
373  return getData().getBoundingBoxes(ignoreEmpty);
374  }
375 
379  virtual RPolyline getHull(double offset) const {
380  return getData().getHull(offset);
381  }
382 
386 // virtual QList<QPair<REntity::Id, RBox> > getIdBoundingBoxes() const {
387 // return getData().getIdBoundingBoxes();
388 // }
389 
393  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false, bool segment = false) const {
394  return getData().getShapes(queryBox, ignoreComplex, segment);
395  }
396 
400  virtual QSharedPointer<RShape> getClosestShape(const RVector& pos, double range = RNANDOUBLE, bool ignoreComplex = false) const {
401  return getData().getClosestShape(pos, range, ignoreComplex);
402  }
403 
407  virtual QSharedPointer<RShape> getClosestSimpleShape(const RVector& pos, double range = RNANDOUBLE) const {
408  return getClosestShape(pos, range, true);
409  }
410 
414  virtual bool isInside(const RBox& box) const {
415  return getData().isInside(box);
416  }
417 
421  virtual bool isOnEntity(const RVector& point, bool limited=true, double tolerance = RDEFAULT_TOLERANCE_1E_MIN4) const {
422  return getData().isOnEntity(point, limited, tolerance);
423  }
424 
428  virtual bool intersectsWith(const RShape& shape) const {
429  return getData().intersectsWith(shape);
430  }
431 
435  virtual double getDistanceTo(const RVector& point, bool limited = true, double range = 0.0, bool draft = false, double strictRange = RMAXDOUBLE) const {
436  return getData().getDistanceTo(point, limited, range, draft, strictRange);
437  }
438 
442  virtual RVector getVectorTo(const RVector& point, bool limited = true, double strictRange = RMAXDOUBLE) const {
443  return getData().getVectorTo(point, limited, strictRange);
444  }
445 
450  return getData().getInternalReferencePoints(hint);
451  }
452 
456  virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const {
457  return getData().getReferencePoints(hint);
458  }
459 
463  virtual RVector getPointOnEntity() const {
464  return getData().getPointOnEntity();
465  }
466 
470  virtual QList<RVector> getEndPoints(const RBox& queryBox = RDEFAULT_RBOX) const {
471  return getData().getEndPoints(queryBox);
472  }
473 
477  virtual QList<RVector> getMiddlePoints(const RBox& queryBox = RDEFAULT_RBOX) const {
478  return getData().getMiddlePoints(queryBox);
479  }
480 
484  virtual QList<RVector> getCenterPoints(const RBox& queryBox = RDEFAULT_RBOX) const {
485  return getData().getCenterPoints(queryBox);
486  }
487 
492  double range=RNANDOUBLE, bool limited=true) const {
493 
494  return getData().getClosestPointOnEntity(point, range, limited);
495  }
496 
500  virtual QList<RVector> getPointsWithDistanceToEnd(
501  double distance,
502  int from = RS::FromAny,
503  const RBox& queryBox = RDEFAULT_RBOX) const {
504  return getData().getPointsWithDistanceToEnd(distance, from, queryBox);
505  }
506 
510  virtual QList<RVector> getIntersectionPoints(
511  const REntity& other, bool limited = true, const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = true) const;
512 
516  virtual QList<RVector> getIntersectionPoints(const RShape& shape, bool limited = true, const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = true) const;
517 
521  virtual QList<RVector> getIntersectionPointsWithShape(const RShape& shape, bool limited = true, const RBox& queryBox = RDEFAULT_RBOX) const {
522  return getIntersectionPoints(shape, limited, queryBox);
523  }
524 
528  virtual bool clickReferencePoint(const RVector& referencePoint) {
529  return getData().clickReferencePoint(referencePoint);
530  }
531 
535  virtual bool moveReferencePoint(const RVector& referencePoint, const RVector& targetPoint, Qt::KeyboardModifiers modifiers = Qt::NoModifier) {
536  return getData().moveReferencePoint(referencePoint, targetPoint, modifiers);
537  }
538 
542  virtual bool move(const RVector& offset) {
543  return getData().move(offset);
544  }
545 
549  virtual bool rotate(double rotation, const RVector& center = RDEFAULT_RVECTOR) {
550  return getData().rotate(rotation, center);
551  }
552 
556  virtual bool scale(const RVector& scaleFactors, const RVector& center = RDEFAULT_RVECTOR) {
557  return getData().scale(scaleFactors, center);
558  }
559 
563  virtual QSharedPointer<REntity> scaleNonUniform(const RVector& scaleFactors, const RVector& center = RDEFAULT_RVECTOR);
564 
568  virtual bool scale(double scaleFactor, const RVector& center = RDEFAULT_RVECTOR) {
569  return getData().scale(scaleFactor, center);
570  }
571 
572  virtual void scaleVisualProperties(double scaleFactor) {
573  getData().scaleVisualProperties(scaleFactor);
574  }
575 
576  virtual void setViewportContext(const RViewportData&) {
577  // MSVC does not compile this:
578  //Q_UNUSED(vp);
579  }
580 
584  virtual bool mirror(const RLine& axis) {
585  return getData().mirror(axis);
586  }
587 
591  virtual bool mirror(const RVector& axis1, const RVector& axis2) {
592  return getData().mirror(axis1, axis2);
593  }
594 
598  virtual bool flipHorizontal() {
599  return getData().flipHorizontal();
600  }
601 
605  virtual bool flipVertical() {
606  return getData().flipVertical();
607  }
608 
612  virtual bool stretch(const RPolyline& area, const RVector& offset) {
613  return getData().stretch(area, offset);
614  }
615 
619  void update() const {
620  getData().update();
621  }
622 
626  virtual RShape* castToShape() {
627  return getData().castToShape();
628  }
629 
633  virtual const RShape* castToConstShape() const {
634  return getData().castToConstShape();
635  }
636 
642  virtual void exportEntity(RExporter& e, bool preview = false, bool forceSelected=false) const = 0;
643 
644  virtual void setAutoUpdatesBlocked(bool on) {
645  getData().setAutoUpdatesBlocked(on);
646  }
647 
648  virtual QPair<QVariant, RPropertyAttributes> getProperty(
649  RPropertyTypeId& propertyTypeId,
650  bool humanReadable = false, bool noAttributes = false, bool showOnRequest = false);
651 
652  virtual bool setProperty(RPropertyTypeId propertyTypeId,
653  const QVariant& value, RTransaction* transaction=NULL);
654 
655  virtual bool isVisible(RBlock::Id blockId = RBlock::INVALID_ID) const;
656  virtual bool isEditable(bool allowInvisible = false) const;
657  virtual bool isInWorkingSet() const;
658 
659  virtual int getComplexity() const {
660  return 1;
661  }
662 
663 protected:
668  void setParentId(REntity::Id parentId) {
669  getData().setParentId(parentId);
670  }
671 
672  virtual void print(QDebug dbg) const;
673 };
674 
676 Q_DECLARE_METATYPE(QSharedPointer<REntity>)
677 Q_DECLARE_METATYPE(QSharedPointer<REntity>*)
678 Q_DECLARE_METATYPE(QStack<REntity*>)
679 Q_DECLARE_METATYPE(QStack<REntity*>*)
680 
681 #endif
RObject::setSelected
virtual void setSelected(bool on)
Definition: RObject.h:179
REntity::getClosestPointOnEntity
virtual RVector getClosestPointOnEntity(const RVector &point, double range=RNANDOUBLE, bool limited=true) const
Definition: REntity.h:491
REntity::isOnEntity
virtual bool isOnEntity(const RVector &point, bool limited=true, double tolerance=RDEFAULT_TOLERANCE_1E_MIN4) const
Definition: REntity.h:421
REntity::getBlockName
QString getBlockName() const
Definition: REntity.h:249
REntity::scaleVisualProperties
virtual void scaleVisualProperties(double scaleFactor)
Definition: REntity.h:572
REntity::scale
virtual bool scale(const RVector &scaleFactors, const RVector &center=RDEFAULT_RVECTOR)
Definition: REntity.h:556
RObject::INVALID_ID
static const Id INVALID_ID
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RObject.h:67
REntity::getBoundingBox
virtual RBox getBoundingBox(bool ignoreEmpty=false) const
Definition: REntity.h:351
REntity::castToConstShape
virtual const RShape * castToConstShape() const
Definition: REntity.h:633
REntity::getLayerId
RLayer::Id getLayerId() const
Definition: REntity.h:221
REntity::getLinetypeScale
double getLinetypeScale() const
Definition: REntity.h:301
RMatrix.h
REntity::setDocument
void setDocument(RDocument *document)
Definition: REntity.h:104
REntity::setBlockId
void setBlockId(RBlock::Id blockId)
Definition: REntity.h:235
REntity::clickReferencePoint
virtual bool clickReferencePoint(const RVector &referencePoint)
Called when user clicks a reference point.
Definition: REntity.h:528
RBox.h
RLineweight.h
REntity::setParentId
void setParentId(REntity::Id parentId)
Definition: REntity.h:668
REntity::rotate
virtual bool rotate(double rotation, const RVector &center=RDEFAULT_RVECTOR)
Definition: REntity.h:549
REntity::getReferencePoints
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: REntity.h:456
REntity::getLineweight
RLineweight::Lineweight getLineweight() const
Definition: REntity.h:315
RObject
Abstract base class for all objects.
Definition: RObject.h:61
RVector
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
REntity::getBoundingBoxes
virtual QList< RBox > getBoundingBoxes(bool ignoreEmpty=false) const
Definition: REntity.h:372
REntity::getColor
RColor getColor() const
Definition: REntity.h:334
RDebug.h
REntity::isUpdatesEnabled
virtual bool isUpdatesEnabled() const
Definition: REntity.h:178
RS::EntityType
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:125
REntity::setZ
virtual void setZ(double z)
Definition: REntity.h:365
REntity::getClosestSimpleShape
virtual QSharedPointer< RShape > getClosestSimpleShape(const RVector &pos, double range=RNANDOUBLE) const
Definition: REntity.h:407
RViewportData
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RViewportData.h:40
RObject::getProperty
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
Definition: RObject.cpp:106
REntity::getVectorTo
virtual RVector getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const
Definition: REntity.h:442
REntity::getCenterPoints
virtual QList< RVector > getCenterPoints(const RBox &queryBox=RDEFAULT_RBOX) const
Definition: REntity.h:484
REntity::getIntersectionPointsWithShape
virtual QList< RVector > getIntersectionPointsWithShape(const RShape &shape, bool limited=true, const RBox &queryBox=RDEFAULT_RBOX) const
Make getIntersectionPoints with shape parameter accessible for script wrappers.
Definition: REntity.h:521
REntity::exportEntity
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const =0
Exports the entity to the given exporter.
REntity::flipVertical
virtual bool flipVertical()
Definition: REntity.h:605
REntity::isPointType
virtual bool isPointType() const
Definition: REntity.h:115
REntity::getLayerName
QString getLayerName() const
Definition: REntity.h:228
REntity::isSelectedWorkingSet
virtual bool isSelectedWorkingSet() const
Definition: REntity.h:170
RLine
Low-level mathematical representation of a line.
Definition: RLine.h:41
RObject::setDocument
void setDocument(RDocument *document)
Definition: RObject.cpp:63
RShape
Interface for geometrical shape classes.
Definition: RShape.h:72
REntity::flipHorizontal
virtual bool flipHorizontal()
Definition: REntity.h:598
RDEFAULT_RVECTOR
#define RDEFAULT_RVECTOR
Definition: RVector.h:37
RObject::setProperty
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
Definition: RObject.cpp:151
REntity::isSelected
virtual bool isSelected() const
Reimplemented by entities that are part of a block reference but not stored as part of the block defi...
Definition: REntity.h:161
REntity
Base class for all entity classes.
Definition: REntity.h:65
REntity::getParentId
REntity::Id getParentId() const
Definition: REntity.h:256
REntity::moveReferencePoint
virtual bool moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
Moves the given reference point to the given target point or does nothing if this entity has no refer...
Definition: REntity.h:535
RVector.h
RObject::print
virtual void print(QDebug dbg) const
Stream operator for QDebug.
Definition: RObject.cpp:657
REntity::update
void update() const
Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
Definition: REntity.h:619
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RDEFAULT_TOLERANCE_1E_MIN4
#define RDEFAULT_TOLERANCE_1E_MIN4
Definition: RShape.h:43
REntity::getHull
virtual RPolyline getHull(double offset) const
Definition: REntity.h:379
REntity::setViewportContext
virtual void setViewportContext(const RViewportData &)
Definition: REntity.h:576
REntity::getInternalReferencePoints
virtual QList< RRefPoint > getInternalReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Can be overwritten to return internal, resolved reference points.
Definition: REntity.h:449
REntity::getEndPoints
virtual QList< RVector > getEndPoints(const RBox &queryBox=RDEFAULT_RBOX) const
Definition: REntity.h:470
REntity::stretch
virtual bool stretch(const RPolyline &area, const RVector &offset)
Stretches the end points of this entity that are inside area by offset.
Definition: REntity.h:612
REntity::setLayerName
void setLayerName(const QString &n)
Definition: REntity.h:214
REntity::isInside
virtual bool isInside(const RBox &box) const
Definition: REntity.h:414
RNANDOUBLE
#define RNANDOUBLE
Definition: RMath.h:71
REntity::getBlockId
RBlock::Id getBlockId() const
Definition: REntity.h:242
REntity::intersectsWith
virtual bool intersectsWith(const RShape &shape) const
Definition: REntity.h:428
REntityData
Base class for all entity data classes.
Definition: REntityData.h:67
RPropertyTypeId
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPropertyTypeId.h:59
REntity::setLinetypeId
void setLinetypeId(RLinetype::Id linetypeId)
Sets the linetype of this entity to the given linetype ID.
Definition: REntity.h:263
REntity::getDisplayColor
RColor getDisplayColor()
Definition: REntity.h:341
RPropertyAttributes.h
RObject::Id
int Id
Definition: RObject.h:66
REntity::setAutoUpdatesBlocked
virtual void setAutoUpdatesBlocked(bool on)
Definition: REntity.h:644
core_global.h
RExporter
Abstract base class for exporters.
Definition: RExporter.h:72
RLinetypePattern
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RLinetypePattern.h:45
RDocument
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
REntity::setLineweight
void setLineweight(RLineweight::Lineweight lineweight)
Definition: REntity.h:308
REntity::mirror
virtual bool mirror(const RVector &axis1, const RVector &axis2)
Definition: REntity.h:591
RMAXDOUBLE
#define RMAXDOUBLE
Definition: RMath.h:63
REntity::getData
virtual REntityData & getData()=0
REntity::to2D
virtual void to2D()
Definition: REntity.h:358
REntity::move
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: REntity.h:542
REntity::setDrawOrder
void setDrawOrder(int drawOrder)
Sets the draw order of this entity.
Definition: REntity.h:193
REntity::getClosestShape
virtual QSharedPointer< RShape > getClosestShape(const RVector &pos, double range=RNANDOUBLE, bool ignoreComplex=false) const
Definition: REntity.h:400
RColor.h
REntity::getDrawOrder
int getDrawOrder() const
Definition: REntity.h:200
REntity::setSelectedWorkingSet
virtual void setSelectedWorkingSet(bool on)
Definition: REntity.h:174
REntity::getShapes
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false) const
Definition: REntity.h:393
RLineweight::Lineweight
Lineweight
Definition: RLineweight.h:46
REntity::scale
virtual bool scale(double scaleFactor, const RVector &center=RDEFAULT_RVECTOR)
Definition: REntity.h:568
REntity::cloneOnChange
virtual bool cloneOnChange() const
Definition: REntity.h:186
REntity::getComplexity
virtual int getComplexity() const
Definition: REntity.h:659
getIntersectionPoints
void getIntersectionPoints(void e1, void e2, void limited)
Returns intersection points between the two given entities or shapes.
Definition: simple_info.js:12
REntity::castToShape
virtual RShape * castToShape()
Definition: REntity.h:626
REntity::isSane
virtual bool isSane() const
Definition: REntity.h:136
RStorage
This is the abstract base class for all storage implementations.
Definition: RStorage.h:64
RObject.h
RPropertyTypeId.h
REntity::setUpdatesEnabled
void setUpdatesEnabled(bool on)
Definition: REntity.h:182
RLayer.h
REntity::clone
virtual REntity * clone() const =0
REntity::setColor
void setColor(const RColor &color)
Definition: REntity.h:327
RS::FromAny
@ FromAny
Start or end.
Definition: RS.h:266
RS::ProjectionRenderingHint
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:185
RDEFAULT_RBOX
#define RDEFAULT_RBOX
Definition: RBox.h:32
init
void init(void basePath)
Definition: AddBlockInit.js:2
REntity::isValid
virtual bool isValid() const
Definition: REntity.h:133
RTransaction
Transaction implementation.
Definition: RTransaction.h:74
RPropertyTypeId::getPropertyTypeIds
static QSet< RPropertyTypeId > getPropertyTypeIds(const std::type_info &classInfo, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
Definition: RPropertyTypeId.cpp:273
REntity::getPointOnEntity
virtual RVector getPointOnEntity() const
Definition: REntity.h:463
REntity::getLinetypeId
RLinetype::Id getLinetypeId() const
Definition: REntity.h:277
REntity::setLinetypePattern
void setLinetypePattern(const RLinetypePattern &linetypePattern)
Definition: REntity.h:270
REntity::getData
virtual const REntityData & getData() const =0
REntity::setLayerId
void setLayerId(RLayer::Id layerId)
Definition: REntity.h:207
RS::RenderTop
@ RenderTop
Definition: RS.h:186
RBox
Represents a box e.g.
Definition: RBox.h:43
REntity::getMiddlePoints
virtual QList< RVector > getMiddlePoints(const RBox &queryBox=RDEFAULT_RBOX) const
Definition: REntity.h:477
RExplodable.h
REntity::getPointsWithDistanceToEnd
virtual QList< RVector > getPointsWithDistanceToEnd(double distance, int from=RS::FromAny, const RBox &queryBox=RDEFAULT_RBOX) const
Definition: REntity.h:500
REntity::mirror
virtual bool mirror(const RLine &axis)
Definition: REntity.h:584
RBlockReferenceEntity
Block reference entity.
Definition: RBlockReferenceEntity.h:38
REntity::setLinetypeScale
void setLinetypeScale(double linetypeScale)
Definition: REntity.h:294
RPolyline
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition: RPolyline.h:49
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10
REntity::getLinetypePattern
RLinetypePattern getLinetypePattern() const
Definition: REntity.h:287
REntity::getDistanceTo
virtual double getDistanceTo(const RVector &point, bool limited=true, double range=0.0, bool draft=false, double strictRange=RMAXDOUBLE) const
Definition: REntity.h:435
REntity::getType
virtual RS::EntityType getType() const
Definition: REntity.h:111
REntityData.h
RColor
Color.
Definition: RColor.h:44