summaryrefslogtreecommitdiff
path: root/module.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-28 12:53:52 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-28 12:53:52 (GMT)
commit7b4cc84cdab040d92b4b98a2ce1fcfaea829bb5a (patch)
treead1b64122844847e2727cdc377356db5dbe63198 /module.cc
parentb7cb05dbbd8d9d249c21178bc0adc747c2f5fc17 (diff)
Clifford Wolf:
Added dxf polyset caching git-svn-id: http://svn.clifford.at/openscad/trunk@83 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'module.cc')
-rw-r--r--module.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/module.cc b/module.cc
index 66e7c73..98c1eb9 100644
--- a/module.cc
+++ b/module.cc
@@ -217,11 +217,7 @@ AbstractNode::~AbstractNode()
delete v;
}
-#ifdef ENABLE_CGAL
-
-QCache<QString, CGAL_Nef_polyhedron> AbstractNode::cgal_nef_cache;
-
-QString AbstractNode::cgal_nef_cache_id() const
+QString AbstractNode::mk_cache_id() const
{
QString cache_id = dump("");
cache_id.remove(QRegExp("[a-zA-Z_][a-zA-Z_0-9]*:"));
@@ -231,9 +227,13 @@ QString AbstractNode::cgal_nef_cache_id() const
return cache_id;
}
+#ifdef ENABLE_CGAL
+
+QCache<QString, CGAL_Nef_polyhedron> AbstractNode::cgal_nef_cache(100000);
+
CGAL_Nef_polyhedron AbstractNode::render_cgal_nef_polyhedron() const
{
- QString cache_id = cgal_nef_cache_id();
+ QString cache_id = mk_cache_id();
if (cgal_nef_cache.contains(cache_id)) {
progress_report();
return *cgal_nef_cache[cache_id];
contact: Jan Huwald // Impressum