diff --git a/.gitattributes b/.gitattributes index bbb97e3193d..1572c7e302a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2133,10 +2133,10 @@ Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_c Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop -text Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_cache.cpp -text -Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placemet_cache.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placement_cache.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_no_cache.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_cache.cpp -text -Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placemet_cache.cpp -text +Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placement_cache.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_no_cache.cpp -text Surface_mesher/demo/Surface_mesher/windows/Mesh.suo -text Surface_mesher/demo/Surface_mesher/windows/res/Mesh.ico -text svneol=unset#image/x-icon diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h index 7349a999c55..2f355523088 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/edge_collapse.h @@ -190,7 +190,7 @@ int edge_collapse ( ECM& aSurface LindstromTurk_params lPolicyParams ; - boost::graph_visitor_t vis ; + boost::graph_visitor_t vis = boost::graph_visitor_t() ; return edge_collapse(aSurface ,aShould_stop diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_cache_strategy.cpp index f415a0c31eb..a983288350b 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_cache_strategy.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_cache_strategy.cpp @@ -1,4 +1,4 @@ -typedef SMS::Edge_lenght_cost ActualCost ; +typedef SMS::Edge_length_cost ActualCost ; ActualCost actual_cost ; diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_placement_cache_strategy.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_placement_cache_strategy.cpp index 4795db581b1..2e35b82b242 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_placement_cache_strategy.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/MP_cost_placement_cache_strategy.cpp @@ -1,5 +1,5 @@ -typedef SMS::Edge_lenght_cost ActualCost ; -typedef SMS::Midpoint_placemet ActualPlacement ; +typedef SMS::Edge_length_cost ActualCost ; +typedef SMS::Midpoint_placement ActualPlacement ; ActualCost actual_cost ; ActualPlacement actual_placement ; diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp index ff1525dade9..1556c953183 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/aux_edge_collapse_test_Polyhedron_3.cpp @@ -121,6 +121,8 @@ bool Test ( string aName ) { if ( lSurface.is_pure_triangle() ) { + cerr << "Processing " << aName << " (" << ( lSurface.size_of_halfedges() / 2 ) << " edges)" << endl ; + Visitor lVisitor(audit_name) ; set_halfedgeds_items_id(lSurface); @@ -138,8 +140,10 @@ bool Test ( string aName ) .visitor(&lVisitor) ); t.stop(); + + rSucceeded = lSurface.is_valid() && lSurface.is_pure_triangle() ; - rSucceeded = true ; + cerr << "\r" << aName << ( rSucceeded ? " succeeded" : "FAILED" ) << ". Elapsed time=" << t.time() << " seconds." << endl ; } else { @@ -175,7 +179,8 @@ int main( int argc, char** argv ) for ( int i = 1 ; i < argc ; ++i ) { string c(argv[i]); - if ( c.find(".off") != string::npos ) + string ext = c.substr(c.find_last_of(".")); + if ( ext == ".off" ) lCases.push_back(c); } diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT index 5bc4c2e657b..36412eecd28 100755 Binary files a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT and b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT differ diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp index 8307cb9740b..82fa7c5385c 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_LT.cpp @@ -1,5 +1,5 @@ #define VISITOR "create_audit_edge_collapse_visitor.cpp" #define STRATEGY_ACRN "LT" -#define STRATEGY_POLICIES "LT_no_cache_strategy.cpp" +#define STRATEGY_POLICIES "LT_cost_placement_cache_strategy.cpp" #include "aux_edge_collapse_test_Polyhedron_3.cpp" diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp index ef12deefb7c..c52f84d6daf 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_Polyhedron_3_MP.cpp @@ -1,5 +1,5 @@ #define VISITOR "create_audit_edge_collapse_visitor.cpp" #define STRATEGY_ACRN "MP" -#define STRATEGY_POLICIES "MP_no_cache_strategy.cpp" +#define STRATEGY_POLICIES "MP_cost_placement_cache_strategy.cpp" #include "aux_edge_collapse_test_Polyhedron_3.cpp" diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp index 422e5e82bf8..b3ca5f883a7 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/create_audit_edge_collapse_visitor.cpp @@ -4,7 +4,7 @@ struct Visitor : mOut( new ofstream(audit_name.c_str(), ios::trunc ) ) { - CHECK_MSG(!out(), "Unable to open audit file: " << audit_name); + CHECK_MSG(out(), "Unable to open audit file: " << audit_name); } void OnStarted( Surface& ) {} diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop index 572c635e6a4..43d3a4df953 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop @@ -9,14 +9,14 @@ . false - + create_audit_edge_collapse_Polyhedron_3_LT build / - + false true @@ -26,29 +26,29 @@ 1 0 false - - + + CGAL_MAKEFILE=/home/fcacciola/Programming/CGAL/make/makefile_i686_Linux-2.6_g++-4.0.2 default - + make - + - + data/tetra.off - - - - + + + + true false false @@ -128,7 +128,7 @@ 250 - + set m_,_ theValue @@ -154,8 +154,8 @@ VisualBoyAdvance - - + + false false -f0 diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile b/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile index 2f6a6c49a42..0f9b23691b8 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/makefile @@ -56,7 +56,7 @@ test_edge_collapse_Polyhedron_3_LT_no_cache$(EXE_EXT): test_edge_collapse_Polyhe test_edge_collapse_Polyhedron_3_LT_cost_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_LT_cost_cache$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_edge_collapse_Polyhedron_3_LT_cost_cache test_edge_collapse_Polyhedron_3_LT_cost_cache$(OBJ_EXT) $(LDFLAGS) -test_edge_collapse_Polyhedron_3_LT_cost_placement_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_LT_placement_cache$(OBJ_EXT) +test_edge_collapse_Polyhedron_3_LT_cost_placement_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_LT_cost_placement_cache$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_edge_collapse_Polyhedron_3_LT_cost_placement_cache \ test_edge_collapse_Polyhedron_3_LT_cost_placement_cache$(OBJ_EXT) $(LDFLAGS) @@ -66,7 +66,7 @@ test_edge_collapse_Polyhedron_3_MP_no_cache$(EXE_EXT): test_edge_collapse_Polyhe test_edge_collapse_Polyhedron_3_MP_cost_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_MP_cost_cache$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_edge_collapse_Polyhedron_3_MP_cost_cache test_edge_collapse_Polyhedron_3_MP_cost_cache$(OBJ_EXT) $(LDFLAGS) -test_edge_collapse_Polyhedron_3_MP_cost_placement_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_MP_placement_cache$(OBJ_EXT) +test_edge_collapse_Polyhedron_3_MP_cost_placement_cache$(EXE_EXT): test_edge_collapse_Polyhedron_3_MP_cost_placement_cache$(OBJ_EXT) $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_edge_collapse_Polyhedron_3_MP_cost_placement_cache \ test_edge_collapse_Polyhedron_3_MP_cost_placement_cache$(OBJ_EXT) $(LDFLAGS) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placemet_cache.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placement_cache.cpp similarity index 100% rename from Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placemet_cache.cpp rename to Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_LT_cost_placement_cache.cpp diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placemet_cache.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placement_cache.cpp similarity index 100% rename from Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placemet_cache.cpp rename to Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3_MP_cost_placement_cache.cpp