QCAD
Open Source 2D CAD
RDimAngularData.h
Go to the documentation of this file.
1 
20 #ifndef RDimAngularDataDATA_H
21 #define RDimAngularDataDATA_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  const RVector& extensionLine1Start,
48  const RVector& extensionLine1End,
49  const RVector& extensionLine2Start,
50  const RVector& dimArcPosition);
51 
52  virtual bool isValid() const;
53 
55  extensionLine1Start = p;
56  }
57 
59  return extensionLine1Start;
60  }
61 
62  void setExtensionLine1End(const RVector& p) {
63  extensionLine1End = p;
64  }
65 
67  return extensionLine1End;
68  }
69 
71  extensionLine2Start = p;
72  }
73 
75  return extensionLine2Start;
76  }
77 
78  void setExtensionLine2End(const RVector& p) {
80  }
81 
83  return getDefinitionPoint();
84  }
85 
86  void setDimArcPosition(const RVector& p) {
87  dimArcPosition = p;
88  }
89 
91  return dimArcPosition;
92  }
93 
94  virtual QList<RVector> getReferencePoints(
96 
97  virtual bool moveReferencePoint(const RVector& referencePoint,
98  const RVector& targetPoint);
99 
100  virtual bool move(const RVector& offset);
101  virtual bool rotate(double rotation, const RVector& center);
102  virtual bool scale(const RVector& scaleFactors, const RVector& center);
103  virtual bool mirror(const RLine& axis);
104 
105  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const;
106  double getAngle() const;
107  bool getAngles(double& ang1, double& ang2,
108  bool& reversed,
109  RVector& p1, RVector& p2) const;
110  RVector getCenter() const;
111  virtual double getMeasuredValue() const;
112  virtual QString getAutoLabel() const;
113 
114 private:
123 };
124 
128 Q_DECLARE_METATYPE(QSharedPointer<RDimAngularData>)
129 
130 #endif
Aligned dimension entity class.
Definition: RDimAngularEntity.h:38
Represents a box e.g.
Definition: RBox.h:43
virtual bool isValid() const
Definition: RDimensionData.cpp:103
void setExtensionLine1End(const RVector &p)
Definition: RDimAngularData.h:62
virtual bool scale(const RVector &scaleFactors, const RVector &center)
Definition: RDimensionData.cpp:201
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define RDEFAULT_RBOX
Definition: RBox.h:32
RDimAngularData data
Definition: RDimAngularEntity.h:165
RVector getExtensionLine2End() const
Definition: RDimAngularData.h:82
virtual QString getAutoLabel() const
Definition: RDimensionData.h:170
#define QCADENTITY_EXPORT
Definition: entity_global.h:10
RVector getDefinitionPoint() const
Definition: RDimensionData.h:65
virtual void setDefinitionPoint(const RVector &p)
Definition: RDimensionData.h:60
void setExtensionLine2End(const RVector &p)
Definition: RDimAngularData.h:78
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition: RDimensionData.cpp:180
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:141
void setExtensionLine2Start(const RVector &p)
Definition: RDimAngularData.h:70
virtual bool rotate(double rotation, const RVector &center)
Definition: RDimensionData.cpp:190
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition: RS.h:118
RVector extensionLine2Start
Start point of second extension line.
Definition: RDimAngularData.h:120
void setExtensionLine1Start(const RVector &p)
Definition: RDimAngularData.h:54
virtual double getMeasuredValue() const
Definition: RDimensionData.h:169
RVector getExtensionLine2Start() const
Definition: RDimAngularData.h:74
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:63
Q_DECLARE_METATYPE(RMath *)
virtual QList< RVector > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const
Definition: RDimensionData.cpp:128
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimensionData.h:38
RVector extensionLine1Start
Start point of first extension line.
Definition: RDimAngularData.h:116
RVector getDimArcPosition() const
Definition: RDimAngularData.h:90
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false) const
Definition: REntityData.h:88
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDimAngularData.h:38
virtual bool mirror(const RLine &axis)
Definition: RDimensionData.cpp:211
Low-level mathematical representation of a line.
Definition: RLine.h:42
Definition: RS.h:119
RVector getExtensionLine1End() const
Definition: RDimAngularData.h:66
RVector dimArcPosition
Arc position.
Definition: RDimAngularData.h:122
RVector extensionLine1End
End point of first extension line.
Definition: RDimAngularData.h:118
RVector getExtensionLine1Start() const
Definition: RDimAngularData.h:58
void setDimArcPosition(const RVector &p)
Definition: RDimAngularData.h:86
RDocument * document
Definition: RObject.h:251