QCAD
Open Source 2D CAD
RDimAngularData.h
Go to the documentation of this file.
1 
20 #ifndef RDimAngularData_H
21 #define RDimAngularData_H
22 
23 #include "entity_global.h"
24 
25 #include "RArc.h"
26 #include "RDocument.h"
27 #include "RDimensionData.h"
28 #include "RLine.h"
29 #include "RVector.h"
30 
39  friend class RDimAngularEntity;
40 
41 protected:
43 
44 public:
46  RDimAngularData(const RDimensionData& dimData);
47 
48  virtual RS::EntityType getType() const {
49  return RS::EntityDimAngular;
50  }
51  virtual bool isValid() const;
52  virtual bool isSane() const;
53 
54  virtual void setExtensionLine1End(const RVector& p) = 0;
55  virtual RVector getExtensionLine1End() const = 0;
56  virtual void setExtensionLine2End(const RVector& p) = 0;
57  virtual RVector getExtensionLine2End() const = 0;
58  virtual void setDimArcPosition(const RVector& p) = 0;
59  virtual RVector getDimArcPosition() const = 0;
60 
61  virtual QList<RRefPoint> getReferencePoints(RS::ProjectionRenderingHint hint = RS::RenderTop) const;
62 
63  virtual bool moveReferencePoint(const RVector& referencePoint,
64  const RVector& targetPoint);
65 
66  virtual bool move(const RVector& offset);
67  virtual bool rotate(double rotation, const RVector& center);
68  virtual bool scale(const RVector& scaleFactors, const RVector& center);
69  virtual bool mirror(const RLine& axis);
70 
71  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false, bool segment = false) const;
72  double getAngle() const;
73  virtual bool getAngles(double& ang1, double& ang2,
74  bool& reversed,
75  RVector& p1, RVector& p2) const = 0;
76  virtual RVector getCenter() const = 0;
77  virtual double getMeasuredValue() const;
78  virtual QString getAutoLabel() const;
79 };
80 
83 Q_DECLARE_METATYPE(QSharedPointer<RDimAngularData>)
84 
85 #endif
Angular dimension entity base class.
Definition: RDimAngularEntity.h:38
Represents a box e.g.
Definition: RBox.h:43
virtual bool isValid() const
Definition: RDimensionData.cpp:107
virtual bool scale(const RVector &scaleFactors, const RVector &center)
Definition: RDimensionData.cpp:221
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define RDEFAULT_RBOX
Definition: RBox.h:32
RVector getDimArcPosition() const
Definition: RDimAngularEntity.h:108
RVector getExtensionLine2End() const
Definition: RDimAngularEntity.h:100
void setDimArcPosition(const RVector &p)
Definition: RDimAngularEntity.h:104
virtual QString getAutoLabel() const
Definition: RDimensionData.h:200
EntityType
Entity types used for property handling / filtering.
Definition: RS.h:76
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
void setExtensionLine2End(const RVector &p)
Definition: RDimAngularEntity.h:96
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false) const
Definition: REntityData.h:111
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:140
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: RDimensionData.cpp:200
void setExtensionLine1End(const RVector &p)
Definition: RDimAngularEntity.h:88
virtual bool moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint)
Moves the given reference point to the given target point or does nothing if this entity has no refer...
Definition: RDimensionData.cpp:172
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:210
Angular Dimension.
Definition: RS.h:114
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:134
virtual double getMeasuredValue() const
Definition: RDimensionData.h:199
virtual bool isSane() const
Definition: RDimensionData.cpp:111
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:67
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RDimensionData.h:38
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RDimAngularData.h:38
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:244
RVector getExtensionLine1End() const
Definition: RDimAngularEntity.h:92
Low-level mathematical representation of a line.
Definition: RLine.h:41
Definition: RS.h:135
virtual RS::EntityType getType() const
Definition: RDimAngularData.h:48
RDocument * document
Definition: RObject.h:308