Fix Meshing_thread

- re-add the possibility to stop the thread,
- re-add the display of the meshing progress.

That disappeared when the parallelism was merged into CGAL.
This commit is contained in:
Laurent Rineau 2016-01-07 11:59:18 +01:00
parent dd9af877c7
commit 5deefd79bf
1 changed files with 3 additions and 21 deletions

View File

@ -25,7 +25,7 @@
#ifndef CGAL_DEMO_MESH_3_MESH_FUNCTION_H
#define CGAL_DEMO_MESH_3_MESH_FUNCTION_H
//#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1
#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1
#include <CGAL/Mesh_3/Concurrent_mesher_config.h>
@ -55,23 +55,6 @@ struct Mesh_parameters
};
template < typename EdgeCriteria >
struct Edge_criteria_sizing_field_wrapper
{
typedef typename EdgeCriteria::Index Index;
typedef typename EdgeCriteria::FT FT;
typedef typename EdgeCriteria::Point_3 Point_3;
Edge_criteria_sizing_field_wrapper(const EdgeCriteria& ec) : ec_(ec) {}
FT operator()(const Point_3& p, const int dim, const Index& index) const
{ return ec_.sizing_field(p,dim,index); }
private:
// No need to copy EdgeCriteria here
const EdgeCriteria& ec_;
};
template < typename Domain_ >
class Mesh_function
: public Mesh_function_interface
@ -200,8 +183,8 @@ launch()
// Build mesher and launch refinement process
mesher_ = new Mesher(c3t3_, *domain_, criteria);
mesher_->refine_mesh();
/*mesher_->initialize();
// mesher_->refine_mesh();
mesher_->initialize();
#ifdef CGAL_MESH_3_PROFILING
WallClockTimer t;
@ -215,7 +198,6 @@ launch()
#ifdef CGAL_MESH_3_PROFILING
std::cerr << "Full refinement time (without fix_c3t3): " << t.elapsed() << " seconds." << std::endl;
#endif
*/
// Ensure c3t3 is ok (usefull if process has been stop by the user)
mesher_->fix_c3t3();