diff --git a/drawing.cpp b/drawing.cpp index 84e78915..b4fe8f63 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -34,6 +34,7 @@ static const int POLY_ALWAYS_IN = (1<<21); // always draw this static const int POLY_TRIANGLES = (1<<22); // made of TRIANGLES, not TRIANGLE_FAN static const int POLY_INTENSE = (1<<23); // extra intense colors static const int POLY_DEBUG = (1<<24); // debug this shape +static const int POLY_PRINTABLE = (1<<25); // these walls are printable /** \brief A graphical element that can be drawn. Objects are not drawn immediately but rather queued. * diff --git a/polygons.cpp b/polygons.cpp index d782e07d..41986e45 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -756,7 +756,7 @@ void geometry_information::make_wall(int id, vector vertices, vector ld yy = log(2) / 2; bshape(shWall3D[id], PPR::WALL); - last->flags |= POLY_TRIANGLES; + last->flags |= POLY_TRIANGLES | POLY_PRINTABLE; hyperpoint center = Hypc; int n = isize(vertices); @@ -842,8 +842,13 @@ void geometry_information::make_wall(int id, vector vertices, vector hpcpush(mid(C0, hpc[a])); if(shWall3D[id].flags & POLY_TRIANGLES) last->flags |= POLY_TRIANGLES; + if(shWall3D[id].flags & POLY_PRINTABLE) + last->flags |= POLY_PRINTABLE; finishshape(); + + shWall3D[id].intester = C0; + shMiniWall3D[id].intester = C0; shPlainWall3D[id] = shWall3D[id]; // force_triangles ? shWall3D[id] : shWireframe3D[id]; } diff --git a/screenshot.cpp b/screenshot.cpp index 814329e0..c0ad9cf3 100644 --- a/screenshot.cpp +++ b/screenshot.cpp @@ -242,6 +242,8 @@ EX always_false in; #if CAP_WRL EX bool in; + EX bool print; + fhstream f; string coord(ld val) { @@ -264,6 +266,7 @@ EX always_false in; } EX void polygon(dqi_poly& p) { + if(print && !(p.flags & POLY_PRINTABLE)) return; if(!(p.flags & POLY_TRIANGLES)) return; println(f, "Shape {"); println(f, " appearance Appearance {"); @@ -275,13 +278,36 @@ EX always_false in; println(f, " geometry IndexedFaceSet {"); println(f, " coord Coordinate {"); println(f, " point ["); + vector data; for(int i=0; i g(geometry, gEuclid); + for(int i=0; i 0) + for(int i=0; i