From 0c65c7c15e74f4182f275fb1934b723bf11ce35e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 14 Apr 2015 14:14:35 +0200 Subject: [PATCH] upgrade test to BGL API --- Ridges_3/include/CGAL/Ridges.h | 1 - Ridges_3/test/Ridges_3/PolyhedralSurf.h | 61 ++++-- Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h | 78 +++---- Ridges_3/test/Ridges_3/compute_normals.h | 62 ++++++ Ridges_3/test/Ridges_3/ridge_test.cpp | 200 ++++++++---------- 5 files changed, 230 insertions(+), 172 deletions(-) create mode 100644 Ridges_3/test/Ridges_3/compute_normals.h diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h index 55777e006cf..292c79aab00 100644 --- a/Ridges_3/include/CGAL/Ridges.h +++ b/Ridges_3/include/CGAL/Ridges.h @@ -29,7 +29,6 @@ #include #include #include -#include #include namespace CGAL { diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf.h b/Ridges_3/test/Ridges_3/PolyhedralSurf.h index 39a3f97efd3..13f555e1cf8 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf.h @@ -1,20 +1,22 @@ -#ifndef _POLYHEDRALSURF_H_ -#define _POLYHEDRALSURF_H_ +#ifndef CGAL_POLYHEDRALSURF_H_ +#define CGAL_POLYHEDRALSURF_H_ +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include -#include -#include - -#include "PolyhedralSurf_operations.h" +#include //---------------------------------------------------------------- -// A redefined items class for the Polyhedron_3 with +// A redefined items class for the Polyhedron_3 with // a refined facet with a normal vector //--------------------------------------------------------------- @@ -29,11 +31,11 @@ public: typedef typename FGeomTraits::Vector_3 Vector_3; protected: - Vector_3 normal; + //Vector_3 normal; public: My_facet() {} - const Vector_3 & getUnitNormal() const { return normal; } - void setNormal(Vector_3 n) { normal = n; } + //const Vector_3 & getUnitNormal() const { std::cerr << "coucou" << std::endl;return normal; } + //void setNormal(Vector_3 n) { normal = n; } }; //------------------------------------------------ @@ -58,20 +60,39 @@ struct Wrappers_VFH:public CGAL::Polyhedron_items_3 { //PolyhedralSurf with facet normal operations //------------------------------------------------ typedef double FT; -typedef CGAL::Cartesian Kernel; +typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Polyhedron_3 < Kernel, Wrappers_VFH > Polyhedron; typedef Kernel::Vector_3 Vector_3; -class PolyhedralSurf:public Polyhedron { +class PolyhedralSurf; + +namespace boost { + template <> + struct graph_traits : public boost::graph_traits + {}; + + template <> + struct graph_traits : public boost::graph_traits + {}; + + template + struct property_map : public property_map + {}; + template + struct property_map : public property_map + {}; +} + +class PolyhedralSurf : public Polyhedron { public: + typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef boost::graph_traits::face_descriptor face_descriptor; + typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + PolyhedralSurf() {} - void compute_facets_normals(); - const Vector_3 computeFacetsAverageUnitNormal(const Vertex_const_handle v); + }; + + #endif - - - - - diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index 86cb7e7cbee..2f863bcee9c 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -1,30 +1,30 @@ -#ifndef _POLYSURF_RINGS_H_ -#define _POLYSURF_RINGS_H_ +#ifndef CGAL_PSURF_RINGS_H_ +#define CGAL_PSURF_RINGS_H_ + +#include +#include +#include -using namespace std; //--------------------------------------------------------------------------- //T_PolyhedralSurf_rings //--------------------------------------------------------------------------- -template < class TPoly > class T_PolyhedralSurf_rings +template < class TPoly > +class T_PolyhedralSurf_rings { + + const TPoly& P; + protected: //Polyhedron - typedef typename TPoly::Vertex_const_handle Vertex_const_handle; - typedef typename TPoly::Halfedge_const_handle Halfedge_const_handle; - typedef typename TPoly::Facet_const_handle Facet_const_handle; - typedef typename TPoly::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator; - typedef typename TPoly::Vertex_const_iterator Vertex_const_iterator; + typedef typename boost::graph_traits::vertex_descriptor Vertex_const_handle; + typedef typename boost::graph_traits::halfedge_descriptor Halfedge_const_handle; + typedef typename boost::graph_traits::vertex_iterator Vertex_const_iterator; + typedef CGAL::Halfedge_around_target_circulator Halfedge_around_vertex_const_circulator; - //tag to visit vertices - struct Vertex_cmp{//comparison is wrt vertex addresses - bool operator()(Vertex_const_handle a, Vertex_const_handle b) const{ - return &*a < &*b; - } - }; - typedef std::map Vertex2int_map; + typedef std::map Vertex2int_map; Vertex2int_map ring_index_map; - + //vertex indices are initialised to -1 void reset_ring_indices(std::vector &vces); @@ -40,13 +40,13 @@ protected: std::vector < Vertex_const_handle > ¤tRing, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); - - public: + + public: T_PolyhedralSurf_rings(const TPoly& P); - + //collect i>=1 rings : all neighbours up to the ith ring, - void collect_i_rings(const Vertex_const_handle v, - const int ring_i, + void collect_i_rings(const Vertex_const_handle v, + const int ring_i, std::vector < Vertex_const_handle >& all); //collect enough rings (at least 1), to get at least min_nb of neighbors @@ -60,10 +60,12 @@ protected: template < class TPoly > T_PolyhedralSurf_rings :: T_PolyhedralSurf_rings(const TPoly& P) + : P(P) { //init the ring_index_map - Vertex_const_iterator itb = P.vertices_begin(), ite = P.vertices_end(); - for(;itb!=ite;itb++) ring_index_map[itb] = -1; + Vertex_const_iterator itb, ite; + boost::tie(itb,ite) = vertices(P); + for(;itb!=ite;itb++) ring_index_map[*itb] = -1; } template < class TPoly > @@ -72,15 +74,15 @@ push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) { - Vertex_const_handle v; + Vertex_const_handle v; Halfedge_around_vertex_const_circulator - hedgeb = start->vertex_begin(), hedgee = hedgeb; - + hedgeb(halfedge(start,P),P), hedgee = hedgeb; + CGAL_For_all(hedgeb, hedgee) { - v = hedgeb->opposite()->vertex(); + v = target(opposite(*hedgeb,P),P); if (ring_index_map[v] != -1) continue;//if visited: next - + ring_index_map[v] = ith; nextRing.push_back(v); all.push_back(v); @@ -93,9 +95,9 @@ collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) { - typename std::vector < Vertex_const_handle >::const_iterator + typename std::vector < Vertex_const_handle >::const_iterator itb = currentRing.begin(), ite = currentRing.end(); - + CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all); } @@ -103,18 +105,18 @@ template void T_PolyhedralSurf_rings :: reset_ring_indices(std::vector < Vertex_const_handle >&vces) { - typename std::vector < Vertex_const_handle >::const_iterator + typename std::vector < Vertex_const_handle >::const_iterator itb = vces.begin(), ite = vces.end(); CGAL_For_all(itb, ite) ring_index_map[*itb] = -1; } - + template void T_PolyhedralSurf_rings :: -collect_i_rings(const Vertex_const_handle v, - const int ring_i, +collect_i_rings(const Vertex_const_handle v, + const int ring_i, std::vector < Vertex_const_handle >& all) { - std::vector current_ring, next_ring; + std::vector current_ring, next_ring; std::vector *p_current_ring, *p_next_ring; assert(ring_i >= 1); //initialize @@ -141,7 +143,7 @@ collect_enough_rings(const Vertex_const_handle v, const unsigned int min_nb, std::vector < Vertex_const_handle >& all) { - std::vector current_ring, next_ring; + std::vector current_ring, next_ring; std::vector *p_current_ring, *p_next_ring; //initialize @@ -153,7 +155,7 @@ collect_enough_rings(const Vertex_const_handle v, int i = 1; - while ( (all.size() < min_nb) && (p_current_ring->size() != 0) ) + while ( (all.size() < min_nb) && (p_current_ring->size() != 0) ) { collect_ith_ring(i, *p_current_ring, *p_next_ring, all); //next round must be launched from p_nextRing... diff --git a/Ridges_3/test/Ridges_3/compute_normals.h b/Ridges_3/test/Ridges_3/compute_normals.h new file mode 100644 index 00000000000..9e5b953e5af --- /dev/null +++ b/Ridges_3/test/Ridges_3/compute_normals.h @@ -0,0 +1,62 @@ +#ifndef COMPUTE_NORMALS_H +#define COMPUTE_NORMALS_H + +#include + +#include + +template +const typename Kernel::Vector_3 +computeFacetsAverageUnitNormal(const TriangleMesh& tm, + typename boost::graph_traits::vertex_descriptor v, + FaceVectorMap fvm, + const Kernel& ) +{ + typename boost::graph_traits::halfedge_descriptor h; + typename boost::graph_traits::face_descriptor f; + typename Kernel::Vector_3 sum(0., 0., 0.), n; + + CGAL::Halfedge_around_target_circulator hedgeb(halfedge(v,tm),tm), hedgee = hedgeb; + + do + { + h = *hedgeb; + if (is_border_edge(h,tm)) + { + hedgeb++; + continue; + } + + f = face(h,tm); + n = get(fvm,f); + sum = (sum + n); + hedgeb++; + } + while (hedgeb != hedgee); + sum = sum / std::sqrt(sum * sum); + return sum; +} + +template +void compute_facets_normals(const TriangleMesh& tm, + FaceVectorMap fvm, + const Kernel& k) +{ + typedef typename boost::property_traits::value_type Vector_3; + + typedef typename boost::property_map::const_type VPM; + VPM vpm = get(CGAL::vertex_point,tm); + BOOST_FOREACH(typename boost::graph_traits::face_descriptor f, faces(tm)){ + typename boost::graph_traits::halfedge_descriptor h = halfedge(f,tm); + Vector_3 normal = + CGAL::cross_product(get(vpm, target(h,tm)) - + get(vpm, target(opposite(h,tm),tm)), + get(vpm, target(next(h,tm),tm)) - + get(vpm, target(opposite(h,tm),tm))); + put(fvm, f, normal / CGAL::sqrt(normal * normal)); + } +} + + + +#endif diff --git a/Ridges_3/test/Ridges_3/ridge_test.cpp b/Ridges_3/test/Ridges_3/ridge_test.cpp index 4749d15657d..edae96af4d5 100644 --- a/Ridges_3/test/Ridges_3/ridge_test.cpp +++ b/Ridges_3/test/Ridges_3/ridge_test.cpp @@ -2,92 +2,64 @@ #include #include #include -#include -#include -#include - //This Is an enriched Polyhedron with facets' normal #include "PolyhedralSurf.h" #include "PolyhedralSurf_rings.h" +#include "compute_normals.h" +#include +#include +#include // Functions declared in PolyhedralSurf.h // They were previously defined in a separate file PolyhedralSurf.cpp, // but I prefere to avoid custom CMakeLists.txt files in the testsuite. // -- Laurent Rineau, 2008/11/10 -void PolyhedralSurf::compute_facets_normals() -{ - std::for_each(this->facets_begin(), this->facets_end(), - Facet_unit_normal()); -} - -const Vector_3 PolyhedralSurf::computeFacetsAverageUnitNormal(const Vertex_const_handle v) -{ - Halfedge_const_handle h; - Facet_const_handle f; - Vector_3 sum(0., 0., 0.), n; - - Halfedge_around_vertex_const_circulator - hedgeb = v->vertex_begin(), hedgee = hedgeb; - - do - { - h = hedgeb; - if (h->is_border_edge()) - { - hedgeb++; - continue; - } - - f = h->facet(); - n = f->getUnitNormal(); - sum = (sum + n); - hedgeb++; - } - while (hedgeb != hedgee); - sum = sum / std::sqrt(sum * sum); - return sum; -} - typedef PolyhedralSurf::Traits Kernel; typedef Kernel::FT FT; typedef Kernel::Point_3 Point_3; typedef Kernel::Vector_3 Vector_3; -typedef PolyhedralSurf::Vertex_const_handle Vertex_const_handle; -typedef PolyhedralSurf::Vertex_const_iterator Vertex_const_iterator; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::face_descriptor face_descriptor; typedef T_PolyhedralSurf_rings Poly_rings; typedef CGAL::Monge_via_jet_fitting Monge_via_jet_fitting; typedef Monge_via_jet_fitting::Monge_form Monge_form; - -typedef CGAL::Vertex2Data_Property_Map_with_std_map Vertex2Data_Property_Map_with_std_map; -typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_map Vertex2FT_map; -typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_map Vertex2Vector_map; -typedef Vertex2Data_Property_Map_with_std_map::Vertex2FT_property_map Vertex2FT_property_map; -typedef Vertex2Data_Property_Map_with_std_map::Vertex2Vector_property_map Vertex2Vector_property_map; + +typedef std::map VertexFT_map; +typedef boost::associative_property_map< VertexFT_map > VertexFT_property_map; + +typedef std::map VertexVector_map; +typedef boost::associative_property_map< VertexVector_map > VertexVector_property_map; + +typedef std::map Face2Vector_map; +typedef boost::associative_property_map< Face2Vector_map > Face2Vector_property_map; //RIDGES typedef CGAL::Ridge_line Ridge_line; typedef CGAL::Ridge_approximation < PolyhedralSurf, - Vertex2FT_property_map, - Vertex2Vector_property_map > Ridge_approximation; + VertexFT_property_map, + VertexVector_property_map > Ridge_approximation; //UMBILICS typedef CGAL::Umbilic Umbilic; typedef CGAL::Umbilic_approximation < PolyhedralSurf, - Vertex2FT_property_map, - Vertex2Vector_property_map > Umbilic_approximation; + VertexFT_property_map, + VertexVector_property_map > Umbilic_approximation; //create property maps, to be moved in main? -Vertex2FT_map vertex2k1_map, vertex2k2_map, - vertex2b0_map, vertex2b3_map, - vertex2P1_map, vertex2P2_map; -Vertex2Vector_map vertex2d1_map, vertex2d2_map; +VertexFT_map vertex_k1_map, vertex_k2_map, + vertex_b0_map, vertex_b3_map, + vertex_P1_map, vertex_P2_map; +VertexVector_map vertex_d1_map, vertex_d2_map; +Face2Vector_map face2normal_map; -Vertex2FT_property_map vertex2k1_pm(vertex2k1_map), vertex2k2_pm(vertex2k2_map), - vertex2b0_pm(vertex2b0_map), vertex2b3_pm(vertex2b3_map), - vertex2P1_pm(vertex2P1_map), vertex2P2_pm(vertex2P2_map); -Vertex2Vector_property_map vertex2d1_pm(vertex2d1_map), vertex2d2_pm(vertex2d2_map); +VertexFT_property_map vertex_k1_pm(vertex_k1_map), vertex_k2_pm(vertex_k2_map), + vertex_b0_pm(vertex_b0_map), vertex_b3_pm(vertex_b3_map), + vertex_P1_pm(vertex_P1_map), vertex_P2_pm(vertex_P2_map); +VertexVector_property_map vertex_d1_pm(vertex_d1_map), vertex_d2_pm(vertex_d2_map); +Face2Vector_property_map face2normal_pm(face2normal_map); // default fct parameter values and global variables unsigned int d_fitting = 4; @@ -99,41 +71,45 @@ Vertex2Vector_property_map vertex2d1_pm(vertex2d1_map), vertex2d2_pm(vertex2d2_m bool verbose = false; unsigned int min_nb_points = (d_fitting + 1) * (d_fitting + 2) / 2; + + /* gather points around the vertex v using rings on the polyhedralsurf. the collection of points resorts to 3 alternatives: 1. the exact number of points to be used 2. the exact number of rings to be used 3. nothing is specified */ -void gather_fitting_points(Vertex_const_handle v, +template +void gather_fitting_points(vertex_descriptor v, std::vector &in_points, - Poly_rings& poly_rings) + Poly_rings& poly_rings, + VertexPointMap vpm) { //container to collect vertices of v on the PolyhedralSurf - std::vector gathered; + std::vector gathered; //initialize - in_points.clear(); - + in_points.clear(); + //OPTION -p nb_points_to_use, with nb_points_to_use != 0. Collect //enough rings and discard some points of the last collected ring to - //get the exact "nb_points_to_use" + //get the exact "nb_points_to_use" if ( nb_points_to_use != 0 ) { - poly_rings.collect_enough_rings(v, nb_points_to_use, gathered);//, vpm); + poly_rings.collect_enough_rings(v, nb_points_to_use, gathered); if ( gathered.size() > nb_points_to_use ) gathered.resize(nb_points_to_use); } else { // nb_points_to_use=0, this is the default and the option -p is not considered; // then option -a nb_rings is checked. If nb_rings=0, collect // enough rings to get the min_nb_points required for the fitting // else collect the nb_rings required - if ( nb_rings == 0 ) - poly_rings.collect_enough_rings(v, min_nb_points, gathered);//, vpm); - else poly_rings.collect_i_rings(v, nb_rings, gathered);//, vpm); + if ( nb_rings == 0 ) + poly_rings.collect_enough_rings(v, min_nb_points, gathered); + else poly_rings.collect_i_rings(v, nb_rings, gathered); } - + //store the gathered points - std::vector::const_iterator + std::vector::const_iterator itb = gathered.begin(), ite = gathered.end(); - CGAL_For_all(itb,ite) in_points.push_back((*itb)->point()); + CGAL_For_all(itb,ite) in_points.push_back(get(vpm,*itb)); } /* Use the jet_fitting package and the class Poly_rings to compute @@ -143,55 +119,58 @@ void compute_differential_quantities(PolyhedralSurf& P, Poly_rings& poly_rings) { //container for approximation points std::vector in_points; - + + typedef boost::property_map::type VPM; + VPM vpm = get(CGAL::vertex_point,P); + //MAIN LOOP - Vertex_const_iterator vitb = P.vertices_begin(), vite = P.vertices_end(); + vertex_iterator vitb = P.vertices_begin(), vite = P.vertices_end(); for (; vitb != vite; vitb++) { //initialize - Vertex_const_handle v = vitb; - in_points.clear(); + vertex_descriptor v = * vitb; + in_points.clear(); Monge_form monge_form; Monge_via_jet_fitting monge_fit; - - //gather points around the vertex using rings - gather_fitting_points(v, in_points, poly_rings); - //exit if the nb of points is too small + //gather points around the vertex using rings + gather_fitting_points(v, in_points, poly_rings, vpm); + + //exit if the nb of points is too small if ( in_points.size() < min_nb_points ) {std::cerr << "Too few points to perform the fitting" << std::endl; exit(1);} //For Ridges we need at least 3rd order info assert( d_monge >= 3); // run the main fct : perform the fitting - monge_form = monge_fit(in_points.begin(), in_points.end(), + monge_form = monge_fit(in_points.begin(), in_points.end(), d_fitting, d_monge); - + //switch min-max ppal curv/dir wrt the mesh orientation - const Vector_3 normal_mesh = P.computeFacetsAverageUnitNormal(v); + const Vector_3 normal_mesh = computeFacetsAverageUnitNormal(P,v, face2normal_pm, Kernel()); monge_form.comply_wrt_given_normal(normal_mesh); - + //Store monge data needed for ridge computations in property maps - vertex2d1_map[v] = monge_form.maximal_principal_direction(); - vertex2d2_map[v] = monge_form.minimal_principal_direction(); - vertex2k1_map[v] = monge_form.coefficients()[0]; - vertex2k2_map[v] = monge_form.coefficients()[1]; - vertex2b0_map[v] = monge_form.coefficients()[2]; - vertex2b3_map[v] = monge_form.coefficients()[5]; + vertex_d1_map[v] = monge_form.maximal_principal_direction(); + vertex_d2_map[v] = monge_form.minimal_principal_direction(); + vertex_k1_map[v] = monge_form.coefficients()[0]; + vertex_k2_map[v] = monge_form.coefficients()[1]; + vertex_b0_map[v] = monge_form.coefficients()[2]; + vertex_b3_map[v] = monge_form.coefficients()[5]; if ( d_monge >= 4) { //= 3*b1^2+(k1-k2)(c0-3k1^3) - vertex2P1_map[v] = + vertex_P1_map[v] = 3*monge_form.coefficients()[3]*monge_form.coefficients()[3] +(monge_form.coefficients()[0]-monge_form.coefficients()[1]) *(monge_form.coefficients()[6] -3*monge_form.coefficients()[0]*monge_form.coefficients()[0] - *monge_form.coefficients()[0]); + *monge_form.coefficients()[0]); //= 3*b2^2+(k2-k1)(c4-3k2^3) - vertex2P2_map[v] = + vertex_P2_map[v] = 3*monge_form.coefficients()[4]*monge_form.coefficients()[4] +(-monge_form.coefficients()[0]+monge_form.coefficients()[1]) *(monge_form.coefficients()[10] -3*monge_form.coefficients()[1]*monge_form.coefficients()[1] - *monge_form.coefficients()[1]); + *monge_form.coefficients()[1]); } } //END FOR LOOP } @@ -210,8 +189,8 @@ int main() {std::cerr << "not enough points in the model" << std::endl; return 1;} //initialize Polyhedral data : normal of facets - P.compute_facets_normals(); - + compute_facets_normals(P,face2normal_pm, Kernel()); + //create a Poly_rings object Poly_rings poly_rings(P); @@ -223,28 +202,23 @@ int main() //--------------------------------------------------------------------------- //Ridges //-------------------------------------------------------------------------- - Ridge_approximation ridge_approximation_tag_3(P, - vertex2k1_pm, vertex2k2_pm, - vertex2b0_pm, vertex2b3_pm, - vertex2d1_pm, vertex2d2_pm, - Vertex2FT_property_map(), - Vertex2FT_property_map()); + Ridge_approximation ridge_approximation(P, + vertex_k1_pm, vertex_k2_pm, + vertex_b0_pm, vertex_b3_pm, + vertex_d1_pm, vertex_d2_pm, + vertex_P1_pm, vertex_P2_pm ); std::vector ridge_lines; - back_insert_iterator > ii(ridge_lines); + std::back_insert_iterator > ii(ridge_lines); //Find MAX_RIDGE, RED_RIDGE, CREST or all ridges - ridge_approximation_tag_3.compute_max_ridges(ii, tag_order); - ridge_approximation_tag_3.compute_min_ridges(ii, tag_order); - ridge_approximation_tag_3.compute_crest_ridges(ii, tag_order); + ridge_approximation.compute_max_ridges(ii, tag_order); + ridge_approximation.compute_min_ridges(ii, tag_order); + ridge_approximation.compute_crest_ridges(ii, tag_order); std::cout << "Compute ridges with tag_4" << std::endl; tag_order = CGAL::Ridge_order_4; //Find MAX_RIDGE, RED_RIDGE, CREST or all ridges - Ridge_approximation ridge_approximation(P, - vertex2k1_pm, vertex2k2_pm, - vertex2b0_pm, vertex2b3_pm, - vertex2d1_pm, vertex2d2_pm, - vertex2P1_pm, vertex2P2_pm ); + ridge_approximation.compute_max_ridges(ii, tag_order); ridge_approximation.compute_min_ridges(ii, tag_order); ridge_approximation.compute_crest_ridges(ii, tag_order); @@ -257,10 +231,10 @@ int main() // UMBILICS //-------------------------------------------------------------------------- Umbilic_approximation umbilic_approximation(P, - vertex2k1_pm, vertex2k2_pm, - vertex2d1_pm, vertex2d2_pm); + vertex_k1_pm, vertex_k2_pm, + vertex_d1_pm, vertex_d2_pm); std::vector umbilics; - back_insert_iterator > umb_it(umbilics); + std::back_insert_iterator > umb_it(umbilics); std::cout << "compute umbilics u=1" << std::endl; umbilic_approximation.compute(umb_it, umb_size); umb_size=2;