summaryrefslogtreecommitdiff
path: root/src/projection.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
commite0c5673e1bf965fbb1bbbef2562a54be1a3144a3 (patch)
tree5996824c15ccca985630ff07294a5b79158e4d86 /src/projection.cc
parentb3f4c98c80acaa414f7bdacc86314d97267acba5 (diff)
Reverted accidental commits
git-svn-id: http://svn.clifford.at/openscad/trunk@573 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/projection.cc')
-rw-r--r--src/projection.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/projection.cc b/src/projection.cc
index 985ed20..7a3f77a 100644
--- a/src/projection.cc
+++ b/src/projection.cc
@@ -23,8 +23,8 @@
*
*/
-#include "projectionnode.h"
#include "module.h"
+#include "node.h"
#include "context.h"
#include "printutils.h"
#include "builtin.h"
@@ -33,7 +33,6 @@
#include "polyset.h"
#include "export.h"
#include "progress.h"
-#include "visitor.h"
#ifdef ENABLE_CGAL
# include <CGAL/assertions_behaviour.h>
@@ -44,7 +43,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
-#include <sstream>
#include <QApplication>
#include <QTime>
@@ -57,6 +55,18 @@ public:
virtual AbstractNode *evaluate(const Context *ctx, const ModuleInstantiation *inst) const;
};
+class ProjectionNode : public AbstractPolyNode
+{
+public:
+ int convexity;
+ bool cut_mode;
+ ProjectionNode(const ModuleInstantiation *mi) : AbstractPolyNode(mi) {
+ cut_mode = false;
+ }
+ virtual PolySet *render_polyset(render_mode_e mode) const;
+ virtual QString dump(QString indent) const;
+};
+
AbstractNode *ProjectionModule::evaluate(const Context *ctx, const ModuleInstantiation *inst) const
{
ProjectionNode *node = new ProjectionNode(inst);
@@ -112,7 +122,7 @@ PolySet *ProjectionNode::render_polyset(render_mode_e) const
foreach(AbstractNode *v, this->children) {
if (v->modinst->tag_background)
continue;
- N.p3 += v->renderCSGMesh().p3;
+ N.p3 += v->render_cgal_nef_polyhedron().p3;
}
}
catch (CGAL::Assertion_exception e) {
@@ -163,7 +173,7 @@ PolySet *ProjectionNode::render_polyset(render_mode_e) const
cube->append_vertex(x1, y1, z1);
cube->append_vertex(x1, y1, z2);
cube->append_vertex(x1, y2, z2);
- CGAL_Nef_polyhedron Ncube = cube->renderCSGMesh();
+ CGAL_Nef_polyhedron Ncube = cube->render_cgal_nef_polyhedron();
cube->unlink();
// N.p3 *= CGAL_Nef_polyhedron3(CGAL_Plane(0, 0, 1, 0), CGAL_Nef_polyhedron3::INCLUDED);
@@ -288,13 +298,3 @@ QString ProjectionNode::dump(QString indent) const
return dump_cache;
}
-std::string ProjectionNode::toString() const
-{
- std::stringstream stream;
- stream << "n" << this->index() << ": ";
-
- stream << "projection(cut = " << (this->cut_mode ? "true" : "false")
- << ", convexity = " << this->convexity << ")";
-
- return stream.str();
-}
contact: Jan Huwald // Impressum