summaryrefslogtreecommitdiff
path: root/openscad.h
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-29 11:08:27 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-29 11:08:27 (GMT)
commit0d198de8ff3986b678e824824d0f3dd0933255d0 (patch)
tree6a68edafcda0bad1f2d12992604afb40fd22b08f /openscad.h
parentf7799a8e4ea0c31bd284dc4cf5e2d23b13029a4c (diff)
Clifford Wolf:
Some progress with the 2d sub system git-svn-id: http://svn.clifford.at/openscad/trunk@188 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.h')
-rw-r--r--openscad.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/openscad.h b/openscad.h
index b765bd2..dfc3912 100644
--- a/openscad.h
+++ b/openscad.h
@@ -468,6 +468,7 @@ public:
typedef CGAL::Extended_cartesian<CGAL::Gmpq> CGAL_Kernel2;
typedef CGAL::Nef_polyhedron_2<CGAL_Kernel2> CGAL_Nef_polyhedron2;
+typedef CGAL_Kernel2::Aff_transformation_2 CGAL_Aff_transformation2;
typedef CGAL::Cartesian<CGAL::Gmpq> CGAL_Kernel3;
typedef CGAL::Polyhedron_3<CGAL_Kernel3> CGAL_Polyhedron;
@@ -501,7 +502,7 @@ struct CGAL_Nef_polyhedron
int weight() {
if (dim == 2)
- return 100;
+ return p2.explorer().number_of_vertices();
if (dim == 3)
return p3.number_of_vertices();
return 0;
@@ -525,6 +526,8 @@ public:
typedef QList<Point> Polygon;
QVector<Polygon> polygons;
Grid3d<void*> grid;
+
+ bool is2d;
int convexity;
PolySet();
@@ -534,6 +537,13 @@ public:
void append_vertex(double x, double y, double z);
void insert_vertex(double x, double y, double z);
+ void append_vertex(double x, double y) {
+ append_vertex(x, y, 0.0);
+ }
+ void insert_vertex(double x, double y) {
+ insert_vertex(x, y, 0.0);
+ }
+
enum colormode_e {
COLORMODE_NONE,
COLORMODE_MATERIAL,
contact: Jan Huwald // Impressum