diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-16 23:11:08 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-16 23:11:08 (GMT) |
commit | d05ea4453b875870375884d6671ca4f0cea624d8 (patch) | |
tree | 53ca5894e2f8d11afa33cbeaffb67bd9f15da1d2 /openscad.h | |
parent | cc3291a4f1def85273e0e1cc6e43bb0079965946 (diff) |
Clifford Wolf:
Added first steps towards dxf extrusion support
git-svn-id: http://svn.clifford.at/openscad/trunk@57 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.h')
-rw-r--r-- | openscad.h | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -264,6 +264,7 @@ extern void register_builtin_transform(); extern void register_builtin_primitives(); extern void register_builtin_control(); extern void register_builtin_render(); +extern void register_builtin_dxf_linear_extrude(); class Context { @@ -288,6 +289,33 @@ public: AbstractNode *evaluate_module(const ModuleInstanciation *inst) const; }; +class DxfData +{ +public: + struct Point { + double x, y; + Point() : x(0), y(0) { } + Point(double x, double y) : x(x), y(y) { } + }; + struct Line { + Point *p[2]; + Line(Point *p1, Point *p2) { p[0] = p1; p[1] = p2; } + Line() { p[0] = NULL; p[1] = NULL; } + }; + struct Path { + QList<Point*> points; + bool is_closed, is_inner; + Path() : is_closed(false), is_inner(false) { } + }; + + QList<Point> points; + QList<Path> paths; + + DxfData(double fn, double fs, double fa, QString filename, QString layername = QString()); + + Point *p(double x, double y); +}; + // The CGAL template magic slows down the compilation process by a factor of 5. // So we only include the declaration of AbstractNode where it is needed... #ifdef INCLUDE_ABSTRACT_NODE_DETAILS |