summaryrefslogtreecommitdiff
path: root/polyset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'polyset.cc')
-rw-r--r--polyset.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/polyset.cc b/polyset.cc
index 1bc015b..5ba9b10 100644
--- a/polyset.cc
+++ b/polyset.cc
@@ -22,6 +22,8 @@
#include "openscad.h"
+QCache<QString,PolySetPtr> PolySet::ps_cache(100);
+
PolySet::PolySet()
{
convexity = 1;
@@ -323,6 +325,11 @@ CGAL_Nef_polyhedron AbstractPolyNode::render_cgal_nef_polyhedron() const
CSGTerm *AbstractPolyNode::render_csg_term(double m[16], 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[16], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background, PolySet *ps, const ModuleInstanciation *modinst, int idx)
+{
CSGTerm *t = new CSGTerm(ps, m, QString("n%1").arg(idx));
if (modinst->tag_highlight && highlights)
highlights->append(t->link());
contact: Jan Huwald // Impressum