diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.ui b/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.ui index 64544ce8cf3..68707af79bd 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.ui +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.ui @@ -49,6 +49,7 @@ + @@ -78,6 +79,7 @@ + @@ -267,12 +269,35 @@ Two-sides + + Ctrl+F + Clone + + + true + + + true + + + :/icons/resize.png + + + Auto-resize + + + Automaticaly zoom in or out when the object change. + + + Ctrl+S + + diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/meshing_bar.ui b/Surface_mesher/demo/Surface_mesher/qt4-demo/meshing_bar.ui index 220a7cfeb8d..eea1c6781ca 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/meshing_bar.ui +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/meshing_bar.ui @@ -33,7 +33,10 @@ - Iso-value: + &Iso-value: + + + spinBox_isovalue @@ -47,7 +50,10 @@ - Sizing bound: + &Sizing bound: + + + spinBox_radius_bound @@ -61,7 +67,10 @@ - Distance bound: + &Distance bound: + + + spinBox_distance_bound diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/qt4-demo.pro b/Surface_mesher/demo/Surface_mesher/qt4-demo/qt4-demo.pro index f6fcc6b047a..cff25db0fff 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/qt4-demo.pro +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/qt4-demo.pro @@ -12,8 +12,6 @@ INCLUDEPATH += . \ ../../../../Data_structure_for_queries_3/include \ ../../../../Marching_cube/include -QMAKEFEATURES=$(PWD) - unix:LIBS += -lQGLViewer CONFIG += qt cgal QT += xml opengl script @@ -87,6 +85,5 @@ SOURCES += surface_mesher.cpp \ polyhedral_surface.cpp \ volume.cpp \ ../../../../Marching_cube/src/mc/MarchingCubes.cpp \ - ../../../../Marching_cube/src/mc/ply.c \ - ../../../../CGALimageIO/src/CGALimageIO/ImageIO.cpp + ../../../../Marching_cube/src/mc/ply.c RESOURCES += surface_mesher.qrc diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc b/Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc index b9794ffcc69..05bbee8bd1d 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/surface_mesher.qrc @@ -5,6 +5,7 @@ cgal_logo.xpm fileopen.png flip.png + resize.png surface.png twosides.png diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp b/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp index 2c6d6218faf..cd230b7f036 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp @@ -1,5 +1,6 @@ #include "viewer.h" #include "surface.h" +#include void Viewer::init() { @@ -17,6 +18,9 @@ QString Viewer::helpString() const void Viewer::interpolateToFitBoundingBox(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) { + QAction* auto_resize = parent->findChild("actionAuto_resize"); + if(!auto_resize || !auto_resize->isChecked()) + return; qglviewer::Camera new_camera = *(camera ()); new_camera.fitBoundingBox(qglviewer::Vec(xmin, ymin, zmin), qglviewer::Vec(xmax, ymax, zmax)); diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/volume.cpp b/Surface_mesher/demo/Surface_mesher/qt4-demo/volume.cpp index 813a78bf168..a8887130484 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/volume.cpp +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/volume.cpp @@ -224,8 +224,6 @@ void Volume::display_surface_mesher_result() Sphere bounding_sphere(m_image.center(),m_image.radius()*m_image.radius()); - std::cerr << "Image bounding sphere: " << bounding_sphere << "\n"; - // definition of the surface Surface_3 surface(m_image, bounding_sphere, m_relative_precision); @@ -243,7 +241,6 @@ void Volume::display_surface_mesher_result() { const Point test = *it + (*random_points_on_sphere_3++ - CGAL::ORIGIN); CGAL::Object o = intersect(surface, Segment_3(*it, test)); - std::cerr << o.type().name() << "\n"; if (const Point* intersection = CGAL::object_cast(&o)) tr.insert(*intersection); else