summaryrefslogtreecommitdiff
path: root/src/dxflinextrude.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dxflinextrude.cc')
-rw-r--r--src/dxflinextrude.cc37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/dxflinextrude.cc b/src/dxflinextrude.cc
index f1aaf8c..ff270da 100644
--- a/src/dxflinextrude.cc
+++ b/src/dxflinextrude.cc
@@ -31,6 +31,7 @@
#include "dxfdata.h"
#include "dxftess.h"
#include "polyset.h"
+#include "progress.h"
#include "openscad.h" // get_fragments_from_r()
#include <sys/types.h>
@@ -209,17 +210,6 @@ static void add_slice(PolySet *ps, DxfData::Path *pt, double rot1, double rot2,
}
}
-static void report_func(const class AbstractNode*, void *vp, int mark)
-{
- QProgressDialog *pd = (QProgressDialog*)vp;
- int v = (int)((mark*100.0) / progress_report_count);
- pd->setValue(v < 100 ? v : 99);
- QString label;
- label.sprintf("Rendering Polygon Mesh using CGAL (%d/%d)", mark, progress_report_count);
- pd->setLabelText(label);
- QApplication::processEvents();
-}
-
PolySet *DxfLinearExtrudeNode::render_polyset(render_mode_e rm) const
{
QString key = mk_cache_id();
@@ -234,26 +224,9 @@ PolySet *DxfLinearExtrudeNode::render_polyset(render_mode_e rm) const
if (filename.isEmpty())
{
#ifdef ENABLE_CGAL
- QTime t;
- QProgressDialog *pd = NULL;
-
- if (rm == RENDER_OPENCSG)
- {
- PRINT_NOCACHE("Processing uncached linear_extrude outline...");
- QApplication::processEvents();
-
- t.start();
- pd = new QProgressDialog("Rendering Polygon Mesh using CGAL...", QString(), 0, 100);
- pd->setValue(0);
- pd->setAutoClose(false);
- pd->show();
- QApplication::processEvents();
-
- progress_report_prep((AbstractNode*)this, report_func, pd);
- }
// Before extruding, union all (2D) children nodes
- // to a single DxfData, then tessealte this into a PolySet
+ // to a single DxfData, then tesselate this into a PolySet
CGAL_Nef_polyhedron N;
N.dim = 2;
foreach(AbstractNode * v, children) {
@@ -263,12 +236,6 @@ PolySet *DxfLinearExtrudeNode::render_polyset(render_mode_e rm) const
}
dxf = new DxfData(N);
- if (rm == RENDER_OPENCSG) {
- progress_report_fin();
- int s = t.elapsed() / 1000;
- PRINTF_NOCACHE("..rendering time: %d hours, %d minutes, %d seconds", s / (60*60), (s / 60) % 60, s % 60);
- delete pd;
- }
#else // ENABLE_CGAL
PRINT("WARNING: Found linear_extrude() statement without dxf file but compiled without CGAL support!");
dxf = new DxfData();
contact: Jan Huwald // Impressum