improve examples for user manual

This commit is contained in:
Jane Tournois 2015-06-23 12:28:25 +02:00
parent 01eb705d60
commit 6e621f037d
2 changed files with 17 additions and 17 deletions

View File

@ -45,10 +45,10 @@ int main(int argc, char* argv[])
CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, poly)). CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, poly)).
geom_traits(Kernel())) ); geom_traits(Kernel())) );
std::cout << "* Number of facets in constructed patch: " << patch_facets.size() << std::endl; std::cout << " Number of facets in constructed patch: " << patch_facets.size() << std::endl;
std::cout << " Number of vertices in constructed patch: " << patch_vertices.size() << std::endl; std::cout << " Number of vertices in constructed patch: " << patch_vertices.size() << std::endl;
std::cout << " Is fairing successful: " << success << std::endl; std::cout << " Fairing : " << (success ? "succeeded" : "failed") << std::endl;
nb_holes++; ++nb_holes;
} }
} }

View File

@ -6,16 +6,16 @@
#include <iterator> #include <iterator>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3; typedef Kernel::Point_3 Point;
int main() int main()
{ {
std::vector<Point_3> polyline; std::vector<Point> polyline;
polyline.push_back(Point_3( 1.,0.,0.)); polyline.push_back(Point( 1.,0.,0.));
polyline.push_back(Point_3( 0.,1.,0.)); polyline.push_back(Point( 0.,1.,0.));
polyline.push_back(Point_3(-1.,0.,0.)); polyline.push_back(Point(-1.,0.,0.));
polyline.push_back(Point_3( 1.,1.,0.)); polyline.push_back(Point( 1.,1.,0.));
// repeating first point (i.e. polyline.push_back(Point_3(1.,0.,0.)) ) is optional // repeating first point (i.e. polyline.push_back(Point(1.,0.,0.)) ) is optional
// any type, having Type(int, int, int) constructor available, can be used to hold output triangles // any type, having Type(int, int, int) constructor available, can be used to hold output triangles
typedef CGAL::Triple<int, int, int> Triangle_int; typedef CGAL::Triple<int, int, int> Triangle_int;
@ -33,12 +33,12 @@ int main()
<< std::endl; << std::endl;
} }
// note that no degenerate triangle is constructed in patch // note that no degenerate triangles are generated in the patch
std::vector<Point_3> polyline_collinear; std::vector<Point> polyline_collinear;
polyline_collinear.push_back(Point_3(1.,0.,0.)); polyline_collinear.push_back(Point(1.,0.,0.));
polyline_collinear.push_back(Point_3(2.,0.,0.)); polyline_collinear.push_back(Point(2.,0.,0.));
polyline_collinear.push_back(Point_3(3.,0.,0.)); polyline_collinear.push_back(Point(3.,0.,0.));
polyline_collinear.push_back(Point_3(4.,0.,0.)); polyline_collinear.push_back(Point(4.,0.,0.));
std::vector<Triangle_int> patch_will_be_empty; std::vector<Triangle_int> patch_will_be_empty;
CGAL::Polygon_mesh_processing::triangulate_hole_polyline( CGAL::Polygon_mesh_processing::triangulate_hole_polyline(