diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-02-09 13:48:09 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-02-09 13:48:09 (GMT) |
commit | c7b9a49c15f10ee76258f735ff66c1ed32e64c51 (patch) | |
tree | ebc9ef37dc44c0eed9c144441f5f763c381fdb08 /src/polyset.cc | |
parent | 66ac9239767dd2151e61a11bc3fb9605c2a4d917 (diff) |
Cleaned up progress handling, implemented cancel function. Needs more testing
git-svn-id: http://svn.clifford.at/openscad/trunk@420 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/polyset.cc')
-rw-r--r-- | src/polyset.cc | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/polyset.cc b/src/polyset.cc index 0285b95..8eccf37 100644 --- a/src/polyset.cc +++ b/src/polyset.cc @@ -24,9 +24,6 @@ */ #include "polyset.h" -#include "node.h" -#include "module.h" -#include "csgterm.h" #include "printutils.h" #include "Preferences.h" @@ -666,52 +663,3 @@ CGAL_Nef_polyhedron PolySet::render_cgal_nef_polyhedron() const #endif /* ENABLE_CGAL */ -PolySet *AbstractPolyNode::render_polyset(render_mode_e) const -{ - return NULL; -} - -#ifdef ENABLE_CGAL - -CGAL_Nef_polyhedron AbstractPolyNode::render_cgal_nef_polyhedron() const -{ - QString cache_id = mk_cache_id(); - if (cgal_nef_cache.contains(cache_id)) { - progress_report(); - PRINT(cgal_nef_cache[cache_id]->msg); - return cgal_nef_cache[cache_id]->N; - } - - print_messages_push(); - - PolySet *ps = render_polyset(RENDER_CGAL); - CGAL_Nef_polyhedron N = ps->render_cgal_nef_polyhedron(); - - cgal_nef_cache.insert(cache_id, new cgal_nef_cache_entry(N), N.weight()); - print_messages_pop(); - progress_report(); - - ps->unlink(); - return N; -} - -#endif /* ENABLE_CGAL */ - -CSGTerm *AbstractPolyNode::render_csg_term(double m[20], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const -{ - PolySet *ps = render_polyset(RENDER_OPENCSG); - return render_csg_term_from_ps(m, highlights, background, ps, modinst, idx); -} - -CSGTerm *AbstractPolyNode::render_csg_term_from_ps(double m[20], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background, PolySet *ps, const ModuleInstantiation *modinst, int idx) -{ - CSGTerm *t = new CSGTerm(ps, m, QString("n%1").arg(idx)); - if (modinst->tag_highlight && highlights) - highlights->append(t->link()); - if (modinst->tag_background && background) { - background->append(t); - return NULL; - } - return t; -} - |