11 enum ObjectType { OTNone = 0, OTLine, OTCircle, OTEllipse, OTArc, OTDimension, OTPolyline, OTSpline, OTText, OTContainer, OTCount };
13 enum DimensionType { DTLinear = 0, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric, DTCircumferential, DTAngular, DTLeader, DTCount };
15 enum ToolType { TTNone, TTLine, TTCircle, TTEllipse, TTArc, TTDimension, TTText, TTPolygon, TTSpline, TTRotate, TTMirror, TTTrim, TTTriangulate, TTDelete, TTParallel };
17 enum ToolState { TSNone, TSPoint1, TSPoint2, TSPoint3, TSPoint4, TSDone };
19 enum BasicUnit { BUInch = 0, BUFoot, BUYard, BUMile, BUMM, BUCM, BUM, BUKM, BUCount };
21 extern const char objName[OTCount][16];
22 extern const char dimName[DTCount][32];
23 extern const char buShortName[BUCount][8];
24 extern const double buInInches[BUCount];
26 #define OBJECT_COMMON \
50 Line(Vector pt1, Vector pt2, float th = 1.0, uint32_t c = 0, int l = LSSolid);
60 Circle(Vector pt1, double r, float th = 1.0, uint32_t c = 0, int l = LSSolid);
67 Ellipse(Vector pt1, Vector pt2, double r1, double r2, float th = 1.0, uint32_t c = 0, int l = LSSolid);
74 Arc(Vector ctr, double r, double a1, double a2, float th = 1.0, uint32_t c = 0, int l = LSSolid);
75 Arc(Vector ctr, double r, Point p1, Point p2, float th = 1.0, uint32_t c = 0, int l = LSSolid);
83 Point lp[2]; // Line point, the actual dimension line
84 Object * obj[2]; // Pointer to attached objects (circle, lines for angle)
87 Dimension(Vector pt1, Vector pt2, DimensionType dt = DTLinear, double offs = 0, float th = 1.0, uint32_t c = 0x0000FF, int l = LSSolid);
97 Text(Vector pt1, const char * str, float th = 10.0, uint32_t c = 0);
102 std::vector<Point> points;
103 // bool closed; //need this? could just repeat the endpoint as well...
107 Polyline(float th = 1.0, uint32_t c = 0, int l = LSSolid);
108 Polyline(std::vector<Point>, float th = 1.0, uint32_t c = 0, int l = LSSolid);
110 void Add(std::vector<Point>);
112 void Translate(Point);
128 int baseUnit; // Type of BasicUnit as seen above
129 int unitStyle; // 0 = decimal, 1 = fractional
130 int decimalPrecision; // 0-5, which, +1, is # of decimal places
131 int fractionalPrecision; // 0-5, which, +1, is 1/(2^n)
133 Container(bool tl = false);
134 void Add(void * obj);
135 void Add(VPVector objs);
138 #endif // __STRUCTS_H__