1 #ifndef RS_DIMDIAMETER_H
2 #define RS_DIMDIAMETER_H
4 #include "rs_dimension.h"
7 * Holds the data that defines a diametric dimension entity.
9 class RS_DimDiametricData
13 * Default constructor. Leaves the data object uninitialized.
15 RS_DimDiametricData() {}
18 * Constructor with initialisation.
20 * @param definitionPoint Definition point of the diametric dimension.
21 * @param leader Leader length.
23 RS_DimDiametricData(const Vector& definitionPoint,
25 this->definitionPoint = definitionPoint;
26 this->leader = leader;
29 friend class RS_DimDiametric;
30 //friend class RS_ActionDimDiametric;
32 friend std::ostream & operator<<(std::ostream & os, const RS_DimDiametricData & dd)
34 os << "(" << dd.definitionPoint << "/" << dd.leader << ")";
39 /** Definition point. */
40 Vector definitionPoint;
46 * Class for diametric dimension entities.
48 * @author Andrew Mustun
50 class RS_DimDiametric: public RS_Dimension
53 RS_DimDiametric(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimDiametricData & ed);
54 virtual ~RS_DimDiametric();
56 virtual RS_Entity * clone();
57 virtual RS2::EntityType rtti() const;
58 RS_DimDiametricData getEData() const;
59 virtual VectorSolutions getRefPoints();
60 virtual QString getMeasuredLabel();
61 virtual void update(bool autoText=false);
62 Vector getDefinitionPoint();
64 virtual void move(Vector offset);
65 virtual void rotate(Vector center, double angle);
66 virtual void scale(Vector center, Vector factor);
67 virtual void mirror(Vector axisPoint1, Vector axisPoint2);
68 virtual void moveRef(const Vector & ref, const Vector & offset);
70 friend std::ostream & operator<<(std::ostream & os, const RS_DimDiametric & d);
74 RS_DimDiametricData edata;