summaryrefslogtreecommitdiff
path: root/src/csgtermnormalizer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/csgtermnormalizer.cc')
-rw-r--r--src/csgtermnormalizer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/csgtermnormalizer.cc b/src/csgtermnormalizer.cc
index a830422..c4caa8f 100644
--- a/src/csgtermnormalizer.cc
+++ b/src/csgtermnormalizer.cc
@@ -2,7 +2,8 @@
#include "csgterm.h"
#include "printutils.h"
-shared_ptr<CSGTerm> CSGTermNormalizer::normalize(const shared_ptr<CSGTerm> &root)
+shared_ptr<CSGTerm> CSGTermNormalizer::normalize(const shared_ptr<CSGTerm> &root,
+ size_t limit)
{
shared_ptr<CSGTerm> temp = root;
while (1) {
@@ -14,8 +15,8 @@ shared_ptr<CSGTerm> CSGTermNormalizer::normalize(const shared_ptr<CSGTerm> &root
#ifdef DEBUG
PRINTF("Normalize count: %d\n", num);
#endif
- if (num > 5000) {
- PRINTF("WARNING: Normalized tree is growing past 5000 elements. Aborting normalization.\n");
+ if (num > limit) {
+ PRINTF("WARNING: Normalized tree is growing past %d elements. Aborting normalization.\n", limit);
return root;
}
}
contact: Jan Huwald // Impressum