diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-30 04:26:05 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-30 04:26:05 (GMT) |
commit | 191dc4857c852f1867e80cd9d03a6d1c0921dcb1 (patch) | |
tree | 4a6421d50eb6cf70924fc0ba06afccf10df00650 /src/dxfdata.h | |
parent | 6940d171812565209efe679a5d923417c3f47d4a (diff) |
header file reorg
git-svn-id: http://svn.clifford.at/openscad/trunk@365 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/dxfdata.h')
-rw-r--r-- | src/dxfdata.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/dxfdata.h b/src/dxfdata.h new file mode 100644 index 0000000..e88fafd --- /dev/null +++ b/src/dxfdata.h @@ -0,0 +1,50 @@ +#ifndef DXFDATA_H_ +#define DXFDATA_H_ + +#include <QList> +#include <QString> + +class DxfData +{ +public: + struct Point { + double x, y; + Point() : x(0), y(0) { } + Point(double x, double y) : x(x), y(y) { } + }; + struct Path { + QList<Point*> points; + bool is_closed, is_inner; + Path() : is_closed(false), is_inner(false) { } + }; + struct Dim { + unsigned int type; + double coords[7][2]; + double angle; + double length; + QString name; + Dim() { + for (int i = 0; i < 7; i++) + for (int j = 0; j < 2; j++) + coords[i][j] = 0; + type = 0; + angle = 0; + length = 0; + } + }; + + QList<Point> points; + QList<Path> paths; + QList<Dim> dims; + + DxfData(); + DxfData(double fn, double fs, double fa, QString filename, QString layername = QString(), double xorigin = 0.0, double yorigin = 0.0, double scale = 1.0); + DxfData(const struct CGAL_Nef_polyhedron &N); + + Point *addPoint(double x, double y); + +private: + void fixup_path_direction(); +}; + +#endif |