diff --git a/Surface_modeling/include/CGAL/Deform_mesh.h b/Surface_modeling/include/CGAL/Deform_mesh.h deleted file mode 100644 index a9b7dd11ee0..00000000000 --- a/Surface_modeling/include/CGAL/Deform_mesh.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2014 GeometryFactory -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// You can redistribute it and/or modify it under the terms of the GNU -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Yin Xu, Andreas Fabri and Ilker O. Yaz - -#ifndef CGAL_DEFORM_MESH_H -#define CGAL_DEFORM_MESH_H - -#ifdef DOXYGEN_RUNNING -template < - class HG, - class VIM=Default, - class HIM=Default, - Deformation_algorithm_tag TAG = SPOKES_AND_RIMS, - class WC = Default, - class ST = Default, - class CR = Default, - class VPM = Default - > -class Surface_mesh_deformation; -#endif - -#ifndef CGAL_NO_DEPRECATED_CODE - -#define CGAL_DEPRECATED_HEADER "" -#define CGAL_REPLACEMENT_HEADER "" -#include - -#include - -namespace CGAL { - - /// - /// \ingroup PkgSurfaceModeling - /// Class renamed to `Surface_mesh_deformation`. - /// \deprecated This class name is deprecated and has been renamed to `Surface_mesh_deformation`. -template < - class HG, - class VIM=Default, - class HIM=Default, - Deformation_algorithm_tag TAG = SPOKES_AND_RIMS, - class WC = Default, - class ST = Default, - class CR = Default, - class VPM = Default - > -class Deform_mesh : public Surface_mesh_deformation -{ - typedef Deform_mesh Self; - typedef Surface_mesh_deformation Base; -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS -public: - Deform_mesh(const Self&) = delete; // no copy -#else -private: - Deform_mesh(const Self&); // no copy -#endif - -public: - typedef typename Base::Halfedge_graph Halfedge_graph; - typedef typename Base::Vertex_index_map Vertex_index_map; - typedef typename Base::Hedge_index_map Hedge_index_map; - typedef typename Base::Weight_calculator Weight_calculator; - typedef typename Base::Vertex_point_map Vertex_point_map; - - //vertex_point_map set by default - Deform_mesh(Halfedge_graph& halfedge_graph, - Vertex_index_map vertex_index_map, - Hedge_index_map hedge_index_map - ) - : Base(halfedge_graph, vertex_index_map, hedge_index_map) - {} - - //vertex_point_map and hedge_index_map set by default - Deform_mesh(Halfedge_graph& halfedge_graph, - Vertex_index_map vertex_index_map) - : Base(halfedge_graph, vertex_index_map) - {} - //vertex_point_map, hedge_index_map and vertex_index_map set by default - Deform_mesh(Halfedge_graph& halfedge_graph) - : Base(halfedge_graph) - {} - - // Constructor with all the parameters provided - Deform_mesh(Halfedge_graph& halfedge_graph, - Vertex_index_map vertex_index_map, - Hedge_index_map hedge_index_map, - Vertex_point_map vertex_point_map, - Weight_calculator weight_calculator = Weight_calculator() - ) - : Base(halfedge_graph, vertex_index_map, hedge_index_map, vertex_point_map, weight_calculator) - {} -}; -} //namespace CGAL - -#endif //CGAL_NO_DEPRECATED_CODE - -#endif // CGAL_DEFORM_MESH_H diff --git a/Surface_modeling/test/Surface_modeling/CMakeLists.txt b/Surface_modeling/test/Surface_modeling/CMakeLists.txt index 9829dc2c43a..62e19c4a735 100644 --- a/Surface_modeling/test/Surface_modeling/CMakeLists.txt +++ b/Surface_modeling/test/Surface_modeling/CMakeLists.txt @@ -28,7 +28,6 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "Cactus_deformation_session.cpp" ) create_single_source_cgal_program( "Cactus_performance_test.cpp" ) create_single_source_cgal_program( "Symmetry_test.cpp" ) - create_single_source_cgal_program( "Deform_mesh_deprecation_test.cpp" ) find_package( OpenMesh QUIET ) if ( OpenMesh_FOUND ) diff --git a/Surface_modeling/test/Surface_modeling/Deform_mesh_deprecation_test.cpp b/Surface_modeling/test/Surface_modeling/Deform_mesh_deprecation_test.cpp deleted file mode 100644 index 4c366ec7f60..00000000000 --- a/Surface_modeling/test/Surface_modeling/Deform_mesh_deprecation_test.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef CGAL_NO_DEPRECATED_CODE - -#define CGAL_NO_DEPRECATION_WARNINGS - -#include -#include -#include -#include -// HalfedgeGraph adapters for Polyhedron_3 -#include -#include - -#include - -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; - -typedef CGAL::Deform_mesh Deform_mesh; - -int main() -{ - Polyhedron mesh; - std::ifstream input("data/cactus.off"); - - if ( !input || !(input >> mesh) || mesh.empty() ) { - std::cerr<< "Cannot open data/cactus.off" << std::endl; - return 1; - } - - // Init the indices of the halfedges and the vertices. - set_halfedgeds_items_id(mesh); - - // Create a deformation object - Deform_mesh deform_mesh(mesh); - - // Definition of the region of interest (use the whole mesh) - vertex_iterator vb,ve; - boost::tie(vb, ve) = vertices(mesh); - deform_mesh.insert_roi_vertices(vb, ve); - - // Select two control vertices ... - vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 1); - vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 2); - - // ... and insert them - deform_mesh.insert_control_vertex(control_1); - deform_mesh.insert_control_vertex(control_2); - - // The definition of the ROI and the control vertices is done, call preprocess - bool is_matrix_factorization_OK = deform_mesh.preprocess(); - if(!is_matrix_factorization_OK){ - std::cerr << "Error in preprocessing, check documentation of preprocess()" << std::endl; - return 1; - } - - // Use set_target_position() to set the constained position - // of control_1. control_2 remains at the last assigned positions - Deform_mesh::Point constrained_pos_1(-0.35, 0.40, 0.60); - deform_mesh.set_target_position(control_1, constrained_pos_1); - - // Deform the mesh, the positions of vertices of 'mesh' are updated - deform_mesh.deform(); - // The function deform() can be called several times if the convergence has not been reached yet - deform_mesh.deform(); - - // Set the constained position of control_2 - Deform_mesh::Point constrained_pos_2(0.55, -0.30, 0.70); - deform_mesh.set_target_position(control_2, constrained_pos_2); - - // Call the function deform() with one-time parameters: - // iterate 10 times and do not use energy based termination criterion - deform_mesh.deform(10, 0.0); - - - // Add another control vertex which requires another call to preprocess - vertex_descriptor control_3 = *CGAL::cpp11::next(vb, 3); - deform_mesh.insert_control_vertex(control_3); - - // The prepocessing step is again needed - if(!deform_mesh.preprocess()){ - std::cerr << "Error in preprocessing, check documentation of preprocess()" << std::endl; - return 1; - } - - // Deform the mesh - Deform_mesh::Point constrained_pos_3(0.55, 0.30, -0.70); - deform_mesh.set_target_position(control_3, constrained_pos_3); - - deform_mesh.deform(15, 0.0); -} -#else -int main(){} -#endif