mirror of https://github.com/vitalif/openscad
Clifford Wolf:
Fixed building without CGAL git-svn-id: http://svn.clifford.at/openscad/trunk@406 b57f626f-c46c-0410-a088-ec61d464b74cstl_dim
parent
07bc7dbecd
commit
51ae248373
|
@ -39,7 +39,9 @@ public:
|
|||
|
||||
DxfData();
|
||||
DxfData(double fn, double fs, double fa, QString filename, QString layername = QString(), double xorigin = 0.0, double yorigin = 0.0, double scale = 1.0);
|
||||
#ifdef ENABLE_CGAL
|
||||
DxfData(const struct CGAL_Nef_polyhedron &N);
|
||||
#endif
|
||||
|
||||
Point *addPoint(double x, double y);
|
||||
|
||||
|
|
|
@ -233,6 +233,7 @@ PolySet *DxfLinearExtrudeNode::render_polyset(render_mode_e rm) const
|
|||
|
||||
if (filename.isEmpty())
|
||||
{
|
||||
#ifdef ENABLE_CGAL
|
||||
QTime t;
|
||||
QProgressDialog *pd = NULL;
|
||||
|
||||
|
@ -268,6 +269,10 @@ PolySet *DxfLinearExtrudeNode::render_polyset(render_mode_e rm) const
|
|||
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();
|
||||
#endif // ENABLE_CGAL
|
||||
} else {
|
||||
dxf = new DxfData(fn, fs, fa, filename, layername, origin_x, origin_y, scale);
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ PolySet *DxfRotateExtrudeNode::render_polyset(render_mode_e rm) const
|
|||
|
||||
if (filename.isEmpty())
|
||||
{
|
||||
#ifdef ENABLE_CGAL
|
||||
QTime t;
|
||||
QProgressDialog *pd;
|
||||
|
||||
|
@ -169,6 +170,10 @@ PolySet *DxfRotateExtrudeNode::render_polyset(render_mode_e rm) const
|
|||
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 rotate_extrude() statement without dxf file but compiled without CGAL support!");
|
||||
dxf = new DxfData();
|
||||
#endif // ENABLE_CGAL
|
||||
} else {
|
||||
dxf = new DxfData(fn, fs, fa, filename, layername, origin_x, origin_y, scale);
|
||||
}
|
||||
|
|
|
@ -25,12 +25,11 @@
|
|||
|
||||
#include "printutils.h"
|
||||
|
||||
#define CGAL_TESSELATE
|
||||
#ifdef CGAL_TESSELATE
|
||||
#ifdef ENABLE_CGAL
|
||||
#include "dxftess-cgal.cc"
|
||||
#else
|
||||
#include "dxftess-glu.cc"
|
||||
#endif // CGAL_TESSELATE
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Converts all paths in the given DxfData to PolySet::borders polygons
|
||||
|
|
|
@ -1215,7 +1215,9 @@ void MainWindow::actionExportDXF()
|
|||
void MainWindow::actionFlushCaches()
|
||||
{
|
||||
PolySet::ps_cache.clear();
|
||||
#ifdef ENABLE_CGAL
|
||||
AbstractNode::cgal_nef_cache.clear();
|
||||
#endif
|
||||
dxf_dim_cache.clear();
|
||||
dxf_cross_cache.clear();
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "grid.h"
|
||||
#include "cgal.h"
|
||||
|
||||
#ifdef ENABLE_CGAL
|
||||
|
||||
DxfData::DxfData(const struct CGAL_Nef_polyhedron &N)
|
||||
{
|
||||
Grid2d<int> grid(GRID_COARSE);
|
||||
|
@ -70,3 +72,4 @@ DxfData::DxfData(const struct CGAL_Nef_polyhedron &N)
|
|||
fixup_path_direction();
|
||||
}
|
||||
|
||||
#endif // ENABLE_CGAL
|
||||
|
|
|
@ -93,6 +93,8 @@ void register_builtin_projection()
|
|||
builtin_modules["projection"] = new ProjectionModule();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CGAL
|
||||
|
||||
static void report_func(const class AbstractNode*, void *vp, int mark)
|
||||
{
|
||||
QProgressDialog *pd = (QProgressDialog*)vp;
|
||||
|
@ -291,6 +293,18 @@ cant_project_non_simple_polyhedron:
|
|||
return ps;
|
||||
}
|
||||
|
||||
#else // ENABLE_CGAL
|
||||
|
||||
PolySet *ProjectionNode::render_polyset(render_mode_e) const
|
||||
{
|
||||
PRINT("WARNING: Found projection() statement but compiled without CGAL support!");
|
||||
PolySet *ps = new PolySet();
|
||||
ps->is2d = true;
|
||||
return ps;
|
||||
}
|
||||
|
||||
#endif // ENABLE_CGAL
|
||||
|
||||
QString ProjectionNode::dump(QString indent) const
|
||||
{
|
||||
if (dump_cache.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue