diff options
author | Marius Kintel <marius@kintel.net> | 2011-04-10 23:51:16 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-04-10 23:51:16 (GMT) |
commit | b6e9179e4888bd52b2881275011e071b59fe1df9 (patch) | |
tree | a023b9226c25316f329754b9edb233d6e3107112 /src/cgaladv.cc | |
parent | 3fbadddeacdf708875df0fe4a2c5d410a263ca51 (diff) |
misc. fixes: Now supports hull() in OpenCSG mode, dump supports hull(), convexity not needed for hull()
Diffstat (limited to 'src/cgaladv.cc')
-rw-r--r-- | src/cgaladv.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cgaladv.cc b/src/cgaladv.cc index 66cefa9..dd797fd 100644 --- a/src/cgaladv.cc +++ b/src/cgaladv.cc @@ -105,10 +105,6 @@ AbstractNode *CgaladvModule::evaluate(const Context *ctx, const ModuleInstantiat level = c.lookup_variable("level", true); } - if (type == HULL) { - convexity = c.lookup_variable("convexity", true); - } - node->convexity = (int)convexity.num; node->path = path; node->subdiv_type = subdiv_type.text; @@ -222,6 +218,9 @@ CSGTerm *CgaladvNode::render_csg_term(double m[20], QVector<CSGTerm*> *highlight if (type == SUBDIV) return render_csg_term_from_nef(m, highlights, background, "subdiv", this->convexity); + if (type == HULL) + return render_csg_term_from_nef(m, highlights, background, "hull", this->convexity); + return NULL; } @@ -229,7 +228,7 @@ CSGTerm *CgaladvNode::render_csg_term(double m[20], QVector<CSGTerm*> *highlight CSGTerm *CgaladvNode::render_csg_term(double m[20], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const { - PRINT("WARNING: Found minkowski(), glide() or subdiv() statement but compiled without CGAL support!"); + PRINT("WARNING: Found minkowski(), glide(), subdiv() or hull() statement but compiled without CGAL support!"); return NULL; } @@ -247,6 +246,8 @@ QString CgaladvNode::dump(QString indent) const } if (type == SUBDIV) text.sprintf("subdiv(level = %d, convexity = %d) {\n", this->level, this->convexity); + if (type == HULL) + text.sprintf("hull() {\n"); foreach (AbstractNode *v, this->children) text += v->dump(indent + QString("\t")); text += indent + "}\n"; |