diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 1a44edcdfc8..77bccbbd586 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -54,5 +54,6 @@ include_directories( BEFORE include ) include( CGAL_CreateSingleSourceCGALProgram ) create_single_source_cgal_program( "heat_method_surface_mesh.cpp" ) +create_single_source_cgal_program( "flip.cpp" ) diff --git a/Heat_method_3/examples/Heat_method_3/flip.cpp b/Heat_method_3/examples/Heat_method_3/flip.cpp new file mode 100644 index 00000000000..c3cce063ad0 --- /dev/null +++ b/Heat_method_3/examples/Heat_method_3/flip.cpp @@ -0,0 +1,36 @@ +#include +#include +#include +#include + +#include +#include + +#include + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point; +//typedef CGAL::Surface_mesh Mesh; +typedef CGAL::Polyhedron_3 Mesh; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + +int main() +{ + Point p(0,0,0), q(1,0,0), r(1,1,0), s(0,0,1); + Mesh sm; + CGAL::make_tetrahedron(p, q, r, s, sm); + + halfedge_descriptor hd1 = *(halfedges(sm).first); + halfedge_descriptor hd2 = next(hd1,sm); + + CGAL::Euler::flip_edge(hd1,sm); + std::cout << "after flip_edge" << std::endl; + std::cout << sm << std::endl; + CGAL::Euler::flip_edge(hd2,sm); + std::cout << "after flip_edge" << std::endl; + std::cout << sm << std::endl; + + std::cout << "done"; + + return 0; +}