diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index 5fd89b15dd0..ee7e1d7fdb3 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -179,6 +179,7 @@ CGAL_add_named_parameter(pointmatcher_config_t, pointmatcher_config, pointmatche CGAL_add_named_parameter(adjacencies_t, adjacencies, adjacencies) CGAL_add_named_parameter(scan_angle_t, scan_angle_map, scan_angle_map) CGAL_add_named_parameter(scanline_id_t, scanline_id_map, scanline_id_map) +CGAL_add_named_parameter(scalar_t, scalar_map, scalar_map) // List of named parameters used in Surface_mesh_approximation package CGAL_add_named_parameter(verbose_level_t, verbose_level, verbose_level) diff --git a/BGL/test/BGL/data/colored_tetra.ply b/BGL/test/BGL/data/colored_tetra.ply index 7ec622125d1..0512db6f502 100644 --- a/BGL/test/BGL/data/colored_tetra.ply +++ b/BGL/test/BGL/data/colored_tetra.ply @@ -18,8 +18,8 @@ property uchar green property uchar blue property int label element edge 6 -property int v0 -property int v1 +property int vertex1 +property int vertex2 property float confidence end_header 0 0 0 -0.5 -0.5 -0.5 255 255 0 0 diff --git a/BGL/test/BGL/data/invalid_cut.ply b/BGL/test/BGL/data/invalid_cut.ply index a158f142b37..c50bb6c56ad 100644 --- a/BGL/test/BGL/data/invalid_cut.ply +++ b/BGL/test/BGL/data/invalid_cut.ply @@ -18,8 +18,8 @@ property uchar green property uchar blue property int label element edge 6 -property int v0 -property int v1 +property int vertex1 +property int vertex2 property float confidence end_header 0 0 0 -0.5 -0.5 -0.5 255 255 0 0 diff --git a/BGL/test/BGL/data/invalid_nv.ply b/BGL/test/BGL/data/invalid_nv.ply index e6a3ca46bb2..18903f10b96 100644 --- a/BGL/test/BGL/data/invalid_nv.ply +++ b/BGL/test/BGL/data/invalid_nv.ply @@ -18,8 +18,8 @@ property uchar green property uchar blue property int label element edge 6 -property int v0 -property int v1 +property int vertex1 +property int vertex2 property float confidence end_header 0 0 0 -0.5 -0.5 -0.5 0 diff --git a/BGL/test/BGL/test_split.cpp b/BGL/test/BGL/test_split.cpp index f9b6fff3ced..9c13a2d0307 100644 --- a/BGL/test/BGL/test_split.cpp +++ b/BGL/test/BGL/test_split.cpp @@ -24,7 +24,8 @@ typedef std::vector Polyline_2; // inserts a polyline into a graph void insert(const std::vector& poly, Graph& graph, Point_vertex_map& pvmap) { - vertex_descriptor u, v; + vertex_descriptor u = boost::graph_traits::null_vertex(); + vertex_descriptor v; for (std::size_t i = 0; i < poly.size(); i++) { // check if the point is not yet in the graph if (pvmap.find(poly[i]) == pvmap.end()) { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 44dfe560667..53db68f906b 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -606,6 +606,7 @@ namespace CartesianKernelFunctors { template class Compare_slope_2 { + typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; public: @@ -625,6 +626,15 @@ namespace CartesianKernelFunctors { s2.source().x(), s2.source().y(), s2.target().x(), s2.target().y()); } + + result_type + operator()(const Point_2& s1s, const Point_2& s1t, const Point_2& s2s, const Point_2& s2t) const + { + return compare_slopesC2(s1s.x(), s1s.y(), + s1t.x(), s1t.y(), + s2s.x(), s2s.y(), + s2t.x(), s2t.y()); + } }; template diff --git a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp index 8d34709288f..674e5a0ea53 100644 --- a/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/DxfArrayBenchmarks/benchmarks_arrangement.cpp @@ -1,11 +1,7 @@ #define CGAL_CAST_INT #define CIRCULAR_KERNEL_2 -#define LAZY_CURVED_KERNEL_2 -//#define CIRCULAR_KERNEL_2_FILTERED_HEXAGON -//#define LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON // #define CIRCULAR_KERNEL_2_FILTERED_BBOX -//#define LAZY_CURVED_KERNEL_2_FILTERED_BBOX #define CGAL_CAST_INT #include @@ -22,9 +18,7 @@ #include #include -#include -#include #include @@ -88,80 +82,7 @@ for(i=1;i<6;i++){ //bench.Compute_dxf(Dxffilename[i]); #endif -/*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!! - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2 -// typedef CGAL::Quotient NT2; - typedef CGAL::Gmpq NT2; - typedef CGAL::Cartesian Linear_k2; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; - typedef CGAL::Circular_kernel_2 CK2_; - - - typedef CGAL::Interval_nt_advanced NT3; - typedef CGAL::Cartesian Linear_k3; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; - typedef CGAL::Circular_kernel_2 CK3_; - - - typedef CGAL::Lazy_circular_kernel_2 LazyCurvedK; - - - - typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; - typedef LazyCurvedK::Line_arc_2 Line_arc_3; - typedef boost::variant LazyVarArc; - typedef std::vector LazyVarContainer; - typedef CGAL::Variant_traits LazyCurvedK_Variant_Traits; - - bench.kernel("LazyK. VarTraits"); - - bench.ComputeArrayDxf(dxffilenames); - //bench.Compute_dxf(Dxffilename[i]); - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON - - typedef CGAL::Filtered_hexagon_circular_kernel_2 CircularKernelHexagon; - - typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4; - typedef CircularKernelHexagon::Line_arc_2 Line_arc_4; - typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc; - typedef std::vector CircularKernHexVarArcContainer; - typedef CGAL::Variant_traits CircularKernHex_Variant_Traits; - - bench.kernel("CK Hex VarTraits"); - - // bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON - - typedef CGAL::Filtered_hexagon_curved_kernel LazyKernelHexagon; - - typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5; - typedef LazyKernelHexagon::Line_arc_2 Line_arc_5; - typedef boost::variant HxLazyVarArc; - typedef std::vector HxLazyVarContainer; - typedef CGAL::Variant_traits HxLazyVariantTraits; - - bench.kernel("LazyK Hex VarTraits") ; - - //bench.Compute(Dxffilename[i]); -bench.Compute_no_dxf(); - #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!! @@ -182,58 +103,7 @@ bench.Compute_no_dxf() // bench.Compute_no_dxf(); #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX - - typedef CGAL::Filtered_bbox_curved_kernel BBLazyCurvedK; - - typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7; - typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; - typedef boost::variant BBLazyVarArc; - typedef std::vector< BBLazyVarArc> BBLazyVarContainer; - typedef CGAL::Variant_traits BBLazyVariantTraits; - - bench.kernel("LLazyK BBox VarTraits") ; - - bench.Compute(Dxffilename[i]); - //bench.Compute_no_dxf(); - - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircKHexagon ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircKHexagonCATraits; - #else - typedef CGAL::Circular_arc_traits Traits0_7; - typedef CGAL::Circular_arc_traits_tracer BBCircKHexagonCATraits; - #endif - typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc; - typedef std::vector BBCircKHexagonArcCont; - bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8; - typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8; - typedef boost::variant BBCircularKernelHexagonVarArc; - typedef std::vector BBCircularKernelHexagonVarContainer; - typedef CGAL::Variant_traits BBCircularKernelHexagonVariantTraits; - - bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf();*/ - /*-------------------------------------------------------------------------------------------------------------------------- - -----------------------------------------------------------------------------------------------------------------------------*/ dxffilenames.erase(dxffilenames.begin(),dxffilenames.end()); if (i<5){ for(int n = 3*(i+1)-3; n < 3*(i+1); n++){ @@ -245,5 +115,3 @@ for(int n = 3*(i+1)-3; n < 3*(i+1); n++){ return 0; }; - - diff --git a/Circular_kernel_2/benchmark/README_benchmark_CK2.txt b/Circular_kernel_2/benchmark/README_benchmark_CK2.txt index a60be41c135..16dbab068e1 100644 --- a/Circular_kernel_2/benchmark/README_benchmark_CK2.txt +++ b/Circular_kernel_2/benchmark/README_benchmark_CK2.txt @@ -3,13 +3,9 @@ The usage is: where alpha: 1: means to bench the BBox(CK) with Vartraits -2: means to bench the Lazy(CK) with Vartraits 3: means to bench the CK with Vartraits -4: means to bench the Bbox(Lazy(CK)) with Vartraits 5: means to bench the BBox(CK) with Circulartraits -6: means to bench the Lazy(CK) with Circulartraits 7: means to bench the CK(CK) with Circulartraits -8: means to bench the Bbox(Lazy(CK)) Circulartraits (le 0 est interne) beta: @@ -74,5 +70,3 @@ with 5 <= a <= 8 and 0 <= b <= 8, we cannot use the Circulartraits to handle th Compile with -DCGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES if you want to benchmark with the same kernel, but with an additional map for supporting circles. - - diff --git a/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp index 22bba806cbc..5ebf26838bc 100644 --- a/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/arrangement_traits/benchmarks_arrangement.cpp @@ -15,10 +15,6 @@ #include #include -#include - -#include - #include #include @@ -141,75 +137,13 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]); } fin.close(); -/*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Place for tests!!!!!!!!!!!!!!!!!! - -------------------------------------------------------------------------------------------------------------------------*/ -// typedef CGAL::Lazy_exact_nt > NT4; -// typedef CGAL::Cartesian Linear_k4; -// typedef CGAL::Algebraic_kernel_2_2 Algebraic_k4; -// typedef CGAL::Curved_kernel CK4; -// -// #ifndef CGAL_CURVED_KERNEL_DEBUG -// typedef CGAL::Circular_arc_traits CircularK_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0; -// typedef CGAL::Circular_arc_traits_tracer CircularK_CA_Traits; -// #endif -// -// typedef CK4::Circular_arc_2 CircularKArc; -// typedef std::vector CircularKArcContainer; -// bench.kernel("Circular kernel Circular arc traits"); -// -// typedef CircularK_CA_Traits::Curve_2 Conic_arc_2; -// typedef CGAL::Arrangement_2 Pmwx; -// typedef CGAL::Arr_naive_point_location Point_location; -// -// typedef CircularK_CA_Traits::X_monotone_curve_2 X_monotone_curve_2; -// typedef CK4::Point_2 Point_2; -// typedef CK4::Circle_2 Circle_2; -// typedef CK4::Circular_arc_2 Circular_arc_2; -// -// -// CGAL::Random generatorOfgenerator; -// int random_seed = generatorOfgenerator.get_int(0, 123456); -// std::cout << "random_seed = " << random_seed << std::endl; -// CGAL::Random theRandom(random_seed); -// int random_max = 128; -// int random_min = -128; -// CircularKArcContainer ac; -// int x; -// int y; -// int r; -// for(int i = 0; i < 20; i++){ -// x = theRandom.get_int(random_min,random_max); -// y = theRandom.get_int(random_min,random_max); -// r = theRandom.get_int(1,random_max); -// ac.push_back( Circle_2( Point_2(x,y), r*r)); -// } -// -// // Pmwx _pm; -// // Point_location _pl(_pm); -// // try{ -// // bench.start(); -// // for (typename ArcContainer::const_iterator it=ac.begin(); -// // it != ac.end(); ++it) { -// // //insert(_pm,_pl,*it); -// // insert(_pm,*it,_pl); -// // }; -// // bench.stop(); -// // bench.summarize(_pm.number_of_vertices(),_pm.number_of_halfedges()); -// // } -// // catch (...) { -// // bench.fail(); -// // } /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!Circular_Kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ typedef CGAL::Quotient NT1; - //typedef CGAL::Lazy_exact_nt > NT1; typedef CGAL::Cartesian Linear_k1; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; typedef CGAL::Circular_kernel_2 CircularKernel; @@ -240,208 +174,6 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]); bench.Compute(Dxffilename[i]); // bench.Compute_dxf(Dxffilename[i]); -/*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Quotient NT2; - // typedef CGAL::Lazy_exact_nt > NT2; - typedef CGAL::Cartesian Linear_k2; - typedef CGAL::Algebraic_kernel_2_2 Algebraic_k2; - typedef CGAL::Curved_kernel CK2_; - - //typedef CGAL::Interval_nt<> NT2; - typedef CGAL::Interval_nt_advanced NT3; - typedef CGAL::Cartesian Linear_k3; - typedef CGAL::Algebraic_kernel_2_2 Algebraic_k3; - typedef CGAL::Curved_kernel CK3_; - - - typedef CGAL::Lazy_curved_kernel LazyCurvedK; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits LazyCurvedK_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_2; - typedef CGAL::Circular_arc_traits_tracer LazyCurved_kTraits; - #endif - - typedef LazyCurvedK::Circular_arc_2 LazyArc; - typedef std::vector LazyArcContainer; - - bench.kernel("Lazy curved kernel Circular arc traits") ; - - bench.Compute_no_dxf(); - - - typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; - typedef LazyCurvedK::Line_arc_2 Line_arc_3; - typedef boost::variant LazyVarArc; - typedef std::vector LazyVarContainer; - typedef CGAL::Variant_traits LazyCurvedK_Variant_Traits; - - bench.kernel("Lazy curved kernel Variant traits"); - - bench.Compute(Dxffilename[i]); - //bench.Compute_dxf(Dxffilename[i]); - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - -/* - typedef CGAL::Filtered_hexagon_curved_kernel CircularKernelHexagon; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits CircularKernHex_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_3; - typedef CGAL::Circular_arc_traits_tracer CircularKernHex_CA_Traits; - #endif - - typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc; - typedef std::vector CircularKernHexArcContainer; - bench.kernel("Circular kernel filtered hexagon Circular arc traits"); - - bench.Compute_no_dxf(); - - - typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4; - typedef CircularKernelHexagon::Line_arc_2 Line_arc_4; - typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc; - typedef std::vector CircularKernHexVarArcContainer; - typedef CGAL::Variant_traits CircularKernHex_Variant_Traits; - - bench.kernel("Circular kernel filtered hexagon Variants traits"); - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - - - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_hexagon_curved_kernel LazyKernelHexagon; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits LazyKernelHexagon_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_4; - typedef CGAL::Circular_arc_traits_tracer LazyKernelHexagon_CA_Traits; - #endif - typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc; - typedef std::vector LazyKernelHexagonArcContainer; - bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5; - typedef LazyKernelHexagon::Line_arc_2 Line_arc_5; - typedef boost::variant HxLazyVarArc; - typedef std::vector HxLazyVarContainer; - typedef CGAL::Variant_traits HxLazyVariantTraits; - - bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ; - - //bench.Compute(Dxffilename[i]); -bench.Compute_no_dxf(); - - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircularKernel ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircularKernel_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_5; - typedef CGAL::Circular_arc_traits_tracer BBCircularKernel_CA_Traits; - #endif - typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc; - typedef std::vector BBCircularKernelArcContainer; - bench.kernel("Circular kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernel::Circular_arc_2 Circular_arc_6; - typedef BBCircularKernel::Line_arc_2 Line_arc_6; - typedef boost::variant BBCircVarArc; - typedef std::vector BBCircVarContainer; - typedef CGAL::Variant_traits BBCircVariantTraits; - - bench.kernel("Circular kernel filtered bbox Variants traits") ; - - // bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBLazyCurvedK; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBLazyCurvedK_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_6; - typedef CGAL::Circular_arc_traits_tracer BBLazyCurvedK_CA_Traits; - #endif - typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc; - typedef std::vector BBLazyCurvedKArcContainer; - bench.kernel("Lazy curved kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - - typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7; - typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; - typedef boost::variant BBLazyVarArc; - typedef std::vector< BBLazyVarArc> BBLazyVarContainer; - typedef CGAL::Variant_traits BBLazyVariantTraits; - - bench.kernel("Lazy curved kernel filtered bbox Variants traits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircKHexagon ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircKHexagonCATraits; - #else - typedef CGAL::Circular_arc_traits Traits0_7; - typedef CGAL::Circular_arc_traits_tracer BBCircKHexagonCATraits; - #endif - typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc; - typedef std::vector BBCircKHexagonArcCont; - bench.kernel("BBox Circular kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8; - typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8; - typedef boost::variant BBCircularKernelHexagonVarArc; - typedef std::vector BBCircularKernelHexagonVarContainer; - typedef CGAL::Variant_traits BBCircularKernelHexagonVariantTraits; - - bench.kernel("BBox Circular kernel filtered bbox Variants traits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf();*/ - /*-------------------------------------------------------------------------------------------------------------------------- - -----------------------------------------------------------------------------------------------------------------------------*/ if (i+1<15) { if (strcmp(Dxffilename[i+1],"")) @@ -460,4 +192,3 @@ bench.infotable(); return 0; } - diff --git a/Circular_kernel_2/benchmark/benchmark_CK2.cpp b/Circular_kernel_2/benchmark/benchmark_CK2.cpp index cbec320b58f..54a4137e4ce 100644 --- a/Circular_kernel_2/benchmark/benchmark_CK2.cpp +++ b/Circular_kernel_2/benchmark/benchmark_CK2.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -42,21 +41,6 @@ typedef CGAL::Arr_circular_line_arc_traits_2 CircularK_Variant typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; -// LAZY KERNEL TYPEDEFS -typedef CGAL::Interval_nt_advanced NT3; -typedef CGAL::Cartesian Linear_k3; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; -typedef CGAL::Circular_kernel_2 CK3_; -typedef CGAL::Lazy_circular_kernel_2 LazyCurvedK; -typedef CGAL::Arr_circular_arc_traits_2 LazyCurvedK_CA_Traits; -typedef LazyCurvedK::Circular_arc_2 LazyArc; -typedef std::vector LazyArcContainer; -typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; -typedef LazyCurvedK::Line_arc_2 Line_arc_3; -typedef boost::variant LazyVarArc; -typedef std::vector LazyVarContainer; -//~ typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; -typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; // BBOX TYPEDEFS typedef CGAL::Filtered_bbox_circular_kernel_2 @@ -77,24 +61,6 @@ typedef std::vector BBCircVarContainer; typedef CGAL::Arr_circular_line_arc_traits_2 BBCircVariantTraits; -// BBOX(LAZY) -typedef CGAL::Filtered_bbox_circular_kernel_2 - BBLazyKernel ; -typedef CGAL::Arr_circular_arc_traits_2 - BBLazyKernel_CA_Traits; -typedef BBLazyKernel::Circular_arc_2 - BBLazyKernelArc; -typedef std::vector - BBLazyKernelArcContainer; -typedef BBLazyKernel::Circular_arc_2 - Circular_arc_lazybb; -typedef BBLazyKernel::Line_arc_2 - Line_arc_lazybb; -typedef boost::variant - BBLazyVarArc; -typedef std::vector - BBLazyVarContainer; -typedef CGAL::Arr_circular_line_arc_traits_2 BBLazyVariantTraits; template void do_main(const char *s) { @@ -243,9 +209,7 @@ int main(int argc, char* argv[]){ int j = argv[2][0]-'0'; if((j >= 0 && j < 9)) { if(i == 1) do_main(dxf_filename[j]); - if(i == 2) do_main(dxf_filename[j]); if(i == 3) do_main(dxf_filename[j]); - if(i == 4) do_main(dxf_filename[j]); if((i >= 5) || (i <= 0)) std::cout << "INVALID PARAMETERS" << std::endl; } else { int k = -1; @@ -255,13 +219,9 @@ int main(int argc, char* argv[]){ if(j == ('c'-'0')) k = 3; if(j == ('d'-'0')) k = 4; if(i == 1) do_main(k); - if(i == 2) do_main(k); if(i == 3) do_main(k); - if(i == 4) do_main(k); if(i == 5) do_main(k); - if(i == 6) do_main(k); if(i == 7) do_main(k); - if(i == 8) do_main(k); } } else std::cout << "INVALID PARAMETERS" << std::endl; diff --git a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp index 728f8c18040..c0c627086a4 100644 --- a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp @@ -1,18 +1,13 @@ #define CGAL_CAST_INT #define CIRCULAR_KERNEL_2 -#define LAZY_CURVED_KERNEL_2 #define CIRCULAR_KERNEL_2_FILTERED_HEXAGON -#define LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON #define CIRCULAR_KERNEL_2_FILTERED_BBOX -#define LAZY_CURVED_KERNEL_2_FILTERED_BBOX #include #include #include -#include - #include #include @@ -21,11 +16,6 @@ #include //#include -#include - -#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON -#include -#endif #include @@ -184,123 +174,7 @@ Bench bench; //If you want create table with all datasets bench.Compute_no_dxf(); #endif -/*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!! - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2 - - typedef CGAL::Quotient NT2; - typedef CGAL::Cartesian Linear_k2; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; - typedef CGAL::Circular_kernel_2 CK2_; - - - typedef CGAL::Interval_nt_advanced NT3; - typedef CGAL::Cartesian Linear_k3; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; - typedef CGAL::Circular_kernel_2 CK3_; - - - typedef CGAL::Lazy_circular_kernel_2 LazyCurvedK; - -// #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits_2 LazyCurvedK_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0_2; -// typedef CGAL::Circular_arc_traits_tracer LazyCurved_kTraits; -// #endif - - typedef LazyCurvedK::Circular_arc_2 LazyArc; - typedef std::vector LazyArcContainer; - - bench.kernel("LazyCircArc") ; - - bench.Compute_no_dxf(); - - - typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; - typedef LazyCurvedK::Line_arc_2 Line_arc_3; - typedef boost::variant LazyVarArc; - typedef std::vector LazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits_2 LazyCurvedK_Variant_Traits; - - bench.kernel("LazyKVar"); - - //bench.Compute(Dxffilename[i]); - //bench.Compute_dxf(Dxffilename[i]); - bench.Compute_no_dxf(); - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON - - typedef CGAL::Filtered_hexagon_circular_kernel_2 CircularKernelHexagon; - -// #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits_2 CircularKernHex_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0_3; -// typedef CGAL::Circular_arc_traits_tracer CircularKernHex_CA_Traits; -// #endif - - typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc; - typedef std::vector CircularKernHexArcContainer; - bench.kernel("CK Hex CircArcTraits"); - - bench.Compute_no_dxf(); - - - typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4; - typedef CircularKernelHexagon::Line_arc_2 Line_arc_4; - typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc; - typedef std::vector CircularKernHexVarArcContainer; - typedef CGAL::Arr_circular_line_arc_traits_2 CircularKernHex_Variant_Traits; - - bench.kernel("CK Hex VarTraits"); - - // bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON - - - typedef CGAL::Filtered_hexagon_circular_kernel_2 LazyKernelHexagon; - -// #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits_2 LazyKernelHexagon_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0_4; -// typedef CGAL::Circular_arc_traits_tracer LazyKernelHexagon_CA_Traits; -// #endif - - typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc; - typedef std::vector LazyKernelHexagonArcContainer; - bench.kernel("LazyK Hex CircArcTraits"); - - bench.Compute_no_dxf(); - - typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5; - typedef LazyKernelHexagon::Line_arc_2 Line_arc_5; - typedef boost::variant HxLazyVarArc; - typedef std::vector HxLazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits_2 HxLazyVariantTraits; - - bench.kernel("LazyK Hex VarTraits") ; - - //bench.Compute(Dxffilename[i]); -bench.Compute_no_dxf(); - - #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!! @@ -333,105 +207,6 @@ bench.Compute_no_dxf() bench.Compute_no_dxf(); #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - #ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX - - typedef CGAL::Filtered_bbox_circular_kernel_2 BBLazyCurvedK; - -// #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Arr_circular_arc_traits_2 BBLazyCurvedK_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0_6; -// typedef CGAL::Circular_arc_traits_tracer BBLazyCurvedK_CA_Traits; -// #endif - - typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc; - typedef std::vector BBLazyCurvedKArcContainer; - bench.kernel("LLazyK BBox CircArcTraits"); - - bench.Compute_no_dxf(); - - - typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7; - typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; - typedef boost::variant BBLazyVarArc; - typedef std::vector< BBLazyVarArc> BBLazyVarContainer; - typedef CGAL::Arr_circular_line_arc_traits_2 BBLazyVariantTraits; - - bench.kernel("LLazyK BBox VarTraits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf(); - - #endif - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircKHexagon ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircKHexagonCATraits; - #else - typedef CGAL::Circular_arc_traits Traits0_7; - typedef CGAL::Circular_arc_traits_tracer BBCircKHexagonCATraits; - #endif - typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc; - typedef std::vector BBCircKHexagonArcCont; - bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8; - typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8; - typedef boost::variant BBCircularKernelHexagonVarArc; - typedef std::vector BBCircularKernelHexagonVarContainer; - typedef CGAL::Variant_traits BBCircularKernelHexagonVariantTraits; - - bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf();*/ - /*-------------------------------------------------------------------------------------------------------------------------- - -----------------------------------------------------------------------------------------------------------------------------*/ -// if (i+1<2) -// { -// try{ -// if (strcmp(Dxffilename[i+1],"")) -// { -// try{ -// fin.open (Dxffilename[i]); -// } -// catch(...){ -// std::cout<<"error"< #include -#include - -#include - #include #include @@ -225,4 +221,3 @@ int exit_status = 0; return exit_status; } - diff --git a/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp index 61527c6040f..8895b11f372 100644 --- a/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/incremental_insertion/benchmarks_arrangement.cpp @@ -13,10 +13,6 @@ #include #include -#include - -#include - #include #include @@ -169,207 +165,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true); // bench.Compute(Dxffilename[i]); bench.Compute_dxf(Dxffilename[i]); -/*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!! - -------------------------------------------------------------------------------------------------------------------------*/ - - typedef CGAL::Quotient NT2; - typedef CGAL::Cartesian Linear_k2; - typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; - typedef CGAL::Circular_kernel_2 CK2_; - - //typedef CGAL::Interval_nt<> NT2; - typedef CGAL::Interval_nt_advanced NT3; - typedef CGAL::Cartesian Linear_k3; - typedef CGAL::Algebraic_kernel_2_2 Algebraic_k3; - typedef CGAL::Curved_kernel CK3_; - - - typedef CGAL::Lazy_circular_kernel_2 LazyCurvedK; - -// #ifndef CGAL_CURVED_KERNEL_DEBUG -// typedef CGAL::Circular_arc_traits LazyCurvedK_CA_Traits; -// #else -// typedef CGAL::Circular_arc_traits Traits0_2; -// typedef CGAL::Circular_arc_traits_tracer LazyCurved_kTraits; -// #endif -// -// typedef LazyCurvedK::Circular_arc_2 LazyArc; -// typedef std::vector LazyArcContainer; -// -// bench.kernel("Lazy curved kernel Circular arc traits") ; -// -// bench.Compute_no_dxf(); - - - typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; - typedef LazyCurvedK::Line_arc_2 Line_arc_3; - typedef boost::variant LazyVarArc; - typedef std::vector LazyVarContainer; - typedef CGAL::Variant_traits LazyCurvedK_Variant_Traits; - - bench.kernel("Lazy curved kernel Variant traits"); - - // bench.Compute(Dxffilename[i]); - // bench.Compute_dxf(Dxffilename[i]); - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* -asdashhhhhhhhhhhhfhjhdghdf - typedef CGAL::Filtered_hexagon_curved_kernel CircularKernelHexagon; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits CircularKernHex_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_3; - typedef CGAL::Circular_arc_traits_tracer CircularKernHex_CA_Traits; - #endif - - typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc; - typedef std::vector CircularKernHexArcContainer; - bench.kernel("Circular kernel filtered hexagon Circular arc traits"); - - bench.Compute_no_dxf(); - - - typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4; - typedef CircularKernelHexagon::Line_arc_2 Line_arc_4; - typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc; - typedef std::vector CircularKernHexVarArcContainer; - typedef CGAL::Variant_traits CircularKernHex_Variant_Traits; - - bench.kernel("Circular kernel filtered hexagon Variants traits"); - - bench.Compute(Dxffilename[i]); - // bench.Compute_no_dxf(); - - - */ - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_hexagon_curved_kernel LazyKernelHexagon; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits LazyKernelHexagon_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_4; - typedef CGAL::Circular_arc_traits_tracer LazyKernelHexagon_CA_Traits; - #endif - typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc; - typedef std::vector LazyKernelHexagonArcContainer; - bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5; - typedef LazyKernelHexagon::Line_arc_2 Line_arc_5; - typedef boost::variant HxLazyVarArc; - typedef std::vector HxLazyVarContainer; - typedef CGAL::Variant_traits HxLazyVariantTraits; - - bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ; - - bench.Compute(Dxffilename[i]); -//bench.Compute_no_dxf(); -*/ - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircularKernel ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircularKernel_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_5; - typedef CGAL::Circular_arc_traits_tracer BBCircularKernel_CA_Traits; - #endif - typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc; - typedef std::vector BBCircularKernelArcContainer; - bench.kernel("Circular kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernel::Circular_arc_2 Circular_arc_6; - typedef BBCircularKernel::Line_arc_2 Line_arc_6; - typedef boost::variant BBCircVarArc; - typedef std::vector BBCircVarContainer; - typedef CGAL::Variant_traits BBCircVariantTraits; - - bench.kernel("Circular kernel filtered bbox Variants traits") ; - - bench.Compute(Dxffilename[i]); - // bench.Compute_no_dxf(); - */ - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBLazyCurvedK; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBLazyCurvedK_CA_Traits; - #else - typedef CGAL::Circular_arc_traits Traits0_6; - typedef CGAL::Circular_arc_traits_tracer BBLazyCurvedK_CA_Traits; - #endif - typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc; - typedef std::vector BBLazyCurvedKArcContainer; - bench.kernel("Lazy curved kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - - typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7; - typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; - typedef boost::variant BBLazyVarArc; - typedef std::vector< BBLazyVarArc> BBLazyVarContainer; - typedef CGAL::Variant_traits BBLazyVariantTraits; - - bench.kernel("Lazy curved kernel filtered bbox Variants traits") ; - - bench.Compute(Dxffilename[i]); - //bench.Compute_no_dxf(); - */ - /*------------------------------------------------------------------------------------------------------------------------- - !!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! - - -------------------------------------------------------------------------------------------------------------------------*/ - /* - typedef CGAL::Filtered_bbox_curved_kernel BBCircKHexagon ; - - #ifndef CGAL_CURVED_KERNEL_DEBUG - typedef CGAL::Circular_arc_traits BBCircKHexagonCATraits; - #else - typedef CGAL::Circular_arc_traits Traits0_7; - typedef CGAL::Circular_arc_traits_tracer BBCircKHexagonCATraits; - #endif - typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc; - typedef std::vector BBCircKHexagonArcCont; - bench.kernel("BBox Circular kernel filtered bbox Circular arc traits"); - - bench.Compute_no_dxf(); - - typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8; - typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8; - typedef boost::variant BBCircularKernelHexagonVarArc; - typedef std::vector BBCircularKernelHexagonVarContainer; - typedef CGAL::Variant_traits BBCircularKernelHexagonVariantTraits; - - bench.kernel("BBox Circular kernel filtered bbox Variants traits") ; - - //bench.Compute(Dxffilename[i]); - bench.Compute_no_dxf();*/ - /*-------------------------------------------------------------------------------------------------------------------------- - -----------------------------------------------------------------------------------------------------------------------------*/ if (i+1<15) { if (strcmp(Dxffilename[i+1],"")) @@ -388,4 +184,3 @@ bench.infotable(); return 0; } - diff --git a/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h b/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h index 6cc7710f289..ced750303bc 100644 --- a/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h +++ b/Circular_kernel_2/include/CGAL/Exact_circular_kernel_2.h @@ -44,28 +44,20 @@ namespace CGAL { namespace internal { #ifdef CGAL_USE_GMP - typedef CGAL::Gmpq NT1; + typedef CGAL::Gmpq NT; #else - typedef Quotient NT1; + typedef Quotient NT; #endif - typedef Cartesian Linear_k1; - typedef Algebraic_kernel_for_circles_2_2 Algebraic_k1; - typedef Circular_kernel_2 CK1; - -// typedef CGAL::Interval_nt_advanced NT2; -// typedef CGAL::Cartesian Linear_k2; -// typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; -// typedef CGAL::Circular_kernel_2 CK2; - -// typedef CGAL::Lazy_circular_kernel_2 -// Exact_circular_kernel_2; + typedef Cartesian Linear_k; + typedef Algebraic_kernel_for_circles_2_2 Algebraic_k; + typedef Circular_kernel_2 CK; } // namespace internal -typedef Filtered_bbox_circular_kernel_2 Exact_circular_kernel_2; +typedef Filtered_bbox_circular_kernel_2 Exact_circular_kernel_2; } //namespace CGAL diff --git a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt index adb6ce0ef65..1ed29d17602 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt @@ -16,7 +16,6 @@ include_directories(BEFORE ../../../Kernel_23/test/Kernel_23/include) include_directories(BEFORE ../Kernel_23/include) create_single_source_cgal_program("test_Circular_kernel.cpp") -create_single_source_cgal_program("test_Lazy_circular_kernel.cpp") create_single_source_cgal_program("test_Exact_circular_kernel.cpp") create_single_source_cgal_program("test_Filtered_bbox_circular_kernel.cpp") create_single_source_cgal_program("test_Line_arc.cpp") diff --git a/Circular_kernel_2/test/Circular_kernel_2/test_Lazy_circular_kernel.cpp b/Circular_kernel_2/test/Circular_kernel_2/test_Lazy_circular_kernel.cpp deleted file mode 100644 index cffb1ddbba2..00000000000 --- a/Circular_kernel_2/test/Circular_kernel_2/test_Lazy_circular_kernel.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial -// -// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado - -// Partially supported by the IST Programme of the EU as a Shared-cost -// RTD (FET Open) Project under Contract No IST-2000-26473 -// (ECG - Effective Computational Geometry for Curves and Surfaces) -// and a STREP (FET Open) Project under Contract No IST-006413 -// (ACS -- Algorithms for Complex Shapes) - -#include - -#include -#include -#include -#include -#include - - -typedef CGAL::Exact_predicates_exact_constructions_kernel Linear_k1; -typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; -typedef CGAL::Circular_kernel_2 CK; -CK ck; - - -#include -#include -#include - -int main() { - - _test_circle_predicat(ck); - _test_circle_construct(ck); - _test_circle_bbox(ck); - _test_circular_arc_bbox(ck); - _test_has_on(ck); - - return 0; -} diff --git a/Classification/package_info/Classification/copyright.txt b/Classification/package_info/Classification/copyright similarity index 100% rename from Classification/package_info/Classification/copyright.txt rename to Classification/package_info/Classification/copyright diff --git a/Cone_spanners_2/package_info/Cone_spanners_2/copyright.txt b/Cone_spanners_2/package_info/Cone_spanners_2/copyright similarity index 100% rename from Cone_spanners_2/package_info/Cone_spanners_2/copyright.txt rename to Cone_spanners_2/package_info/Cone_spanners_2/copyright diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index 1ce8cb797a6..ba2cbad23b3 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -153,6 +153,7 @@ \package_listing{BGL} \package_listing{Solver_interface} \package_listing{Property_map} +\package_listing{Weights} \package_listing{Cone_spanners_2} \package_listing{Circulator} \package_listing{Generator} diff --git a/Documentation/doc/scripts/compare_testsuites.sh b/Documentation/doc/scripts/compare_testsuites.sh index 1c5a594ce1b..0181e8166cc 100644 --- a/Documentation/doc/scripts/compare_testsuites.sh +++ b/Documentation/doc/scripts/compare_testsuites.sh @@ -28,7 +28,7 @@ FAILURES=() for dir in $PATH_TO_DOC/* do OUTPUT=$(basename $dir) - python ../documentation_parser.py $dir/xml > ./"$OUTPUT.txt" + python3 ../documentation_parser.py $dir/xml > ./"$OUTPUT.txt" if [ $? -eq 0 ]; then echo "$dir OK" else diff --git a/Documentation/doc/scripts/documentation_parser.py b/Documentation/doc/scripts/documentation_parser.py index 187b175bf4f..462291efae6 100644 --- a/Documentation/doc/scripts/documentation_parser.py +++ b/Documentation/doc/scripts/documentation_parser.py @@ -1,3 +1,5 @@ +#/usr/bin/env python3 + from pyquery import PyQuery as pq from collections import defaultdict from sys import argv @@ -12,17 +14,17 @@ def check_type(_in, args): root_path=argv[1] d = pq(filename=op.join(op.sep, root_path,'index.xml'), parser="xml") -compounds=[p.text() for p in d('compound').items()] -types=[p.attr('kind') for p in d('compound').items()] +compounds=[p.text() for p in list(d('compound').items())] +types=[p.attr('kind') for p in list(d('compound').items())] type_map = defaultdict(list) #map dict_map = defaultdict(dict)#map > #FOREACH compounds : fill maps -for i in xrange(0,len(compounds)): +for i in range(0,len(compounds)): if check_type(types[i], "typedef"): types[i]="type" name=d('compound').children("name").eq(i).text() - members=[p.text() for p in d('compound').eq(i).children("member").items()] - m_types=[p.attr('kind') for p in d('compound').eq(i).children("member").items()] + members=[p.text() for p in list(d('compound').eq(i).children("member").items())] + m_types=[p.attr('kind') for p in list(d('compound').eq(i).children("member").items())] if (not check_type(types[i], ['example', 'file', 'dir', 'page', 'group']) and not (types[i] == "namespace" and len(members) == 0) and not (types[i] == "enum" and len(members) == 0) ): @@ -32,7 +34,7 @@ for i in xrange(0,len(compounds)): total_path=op.join(op.sep, root_path,filepath) if(op.isfile(total_path)): e = pq(filename=total_path, parser="xml") - compoundnames=[p.text() for p in e('includes').items()] + compoundnames=[p.text() for p in list(e('includes').items())] if(len(compoundnames) > 1 and compoundnames[0].find("Concept") != -1): types[i] = 'Concept '+types[i].lower() @@ -41,7 +43,7 @@ for i in xrange(0,len(compounds)): mtype_map = defaultdict(list)# map #FOREACH member : - for j in xrange(0,len(members)): + for j in range(0,len(members)): if(check_type(types[i], ['class', 'Concept class']) and m_types[j] == "function"): m_types[j]="method" @@ -62,7 +64,7 @@ for btype in type_map: out=btype if btype.endswith('s'): out+='e' - print out.title()+'s' + print(out.title()+'s') indent+=" " #FOREACH name for name in type_map[btype]: @@ -74,7 +76,7 @@ for btype in type_map: templates=[] if op.isfile(op.join(op.sep, root_path,filepath)): f=pq(filename=op.join(op.sep, root_path,filepath), parser="xml") - templateparams=f("compounddef").children("templateparamlist").eq(0).children("param").items() + templateparams=list(f("compounddef").children("templateparamlist").eq(0).children("param").items()) for param in templateparams: template_type="" template_name="" @@ -91,7 +93,7 @@ for btype in type_map: complete_template+=' = '+template_defval templates.append(complete_template) if templates==[]:#if no child was found, just take param.text() - templates=[t.text() for t in param.items()] + templates=[t.text() for t in list(param.items())] suffix="<" #as template got type, defname and declname, name is twice in template. keep only one of them. to_remove=[""] @@ -101,7 +103,7 @@ for btype in type_map: suffix="" if suffix.endswith(', '): suffix = suffix[:-2]+'>' - print indent+name+suffix + print(indent+name+suffix) indent+=" " #FOREACH mtype @@ -109,7 +111,7 @@ for btype in type_map: out=mtype if mtype.endswith('s'): out+='e' - print indent+out.title()+'s' + print(indent+out.title()+'s') indent+=" " #FOREACH member overload_map = defaultdict(int) #contains the number of times a member has appeared (to manage the overloads) @@ -123,16 +125,16 @@ for btype in type_map: if op.isfile(op.join(op.sep, root_path,filepath)): f=pq(filename=op.join(op.sep, root_path,filepath), parser="xml") index=0 - memberdefs=[m.text() for m in f("memberdef").items()] - for i in xrange(0,len(memberdefs)): - member_names=[member_name.text() for member_name in f('memberdef').eq(i).children("name").items()] + memberdefs=[m.text() for m in list(f("memberdef").items())] + for i in range(0,len(memberdefs)): + member_names=[member_name.text() for member_name in list(f('memberdef').eq(i).children("name").items())] if f('memberdef').eq(i).children("name").text() == member: if (index < overload_map[member]): index+=1 elif (index == overload_map[member]): if check_type(mtype, ['function', 'method']): args=[f('memberdef').eq(i).children("argsstring").text()] - templateparams=f('memberdef').eq(i).children("templateparamlist").children("param").items() + templateparams=list(f('memberdef').eq(i).children("templateparamlist").children("param").items()) if check_type(mtype, ['function', 'method', 'type', 'variable']): return_type=[f('memberdef').eq(i).children("type").text()] break; @@ -158,7 +160,7 @@ for btype in type_map: complete_template+=' = '+template_defval templates.append(complete_template) if templates==[]:#if no child was found, just take param.text() - templates=[t.text() for t in param.items()] + templates=[t.text() for t in list(param.items())] prefix="template <" for template in templates: @@ -171,7 +173,7 @@ for btype in type_map: prefix+=definition if(prefix != ""): prefix+=" " - print indent+prefix+member+arguments + print(indent+prefix+member+arguments) overload_map[member]+=1 #END foreach member indent=indent[:-2] diff --git a/Documentation/doc/scripts/testsuite.py b/Documentation/doc/scripts/testsuite.py index 3d3dbc28c50..efaa0f31f0c 100755 --- a/Documentation/doc/scripts/testsuite.py +++ b/Documentation/doc/scripts/testsuite.py @@ -150,7 +150,7 @@ body {color: black; background-color: #C0C0D0; font-family: sans-serif;} for index in range(0, len(results1)): result = [('./build_logs', './build_logs', (0,1))] results_master.extend(result) - for index in range(0, len(results1)-1): + for index in range(0, len(results1)): status='class="package-good"' no_errors = True no_warn = True diff --git a/Heat_method_3/package_info/Heat_method_3/copyright.txt b/Heat_method_3/package_info/Heat_method_3/copyright similarity index 100% rename from Heat_method_3/package_info/Heat_method_3/copyright.txt rename to Heat_method_3/package_info/Heat_method_3/copyright diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 2f62b8ffb85..a7f8b7ca8c2 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -810,6 +810,7 @@ namespace HomogeneousKernelFunctors { template class Compare_slope_2 { + typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; public: @@ -842,48 +843,55 @@ namespace HomogeneousKernelFunctors { result_type operator()(const Segment_2& s1, const Segment_2& s2) const + { + return (*this)(s1.source(), s1.target(), + s2.source(), s2.target()); + } + + result_type + operator()(const Point_2& s1s, const Point_2& s1t, const Point_2& s2s, const Point_2& s2t) const { typedef typename K::FT FT; - typename K::Comparison_result cmp_y1 = compare_y(s1.source(), s1.target()); + typename K::Comparison_result cmp_y1 = compare_y(s1s, s1t); if (cmp_y1 == EQUAL) // horizontal { - typename K::Comparison_result cmp_x2 = compare_x(s2.source(), s2.target()); + typename K::Comparison_result cmp_x2 = compare_x(s2s, s2t); if (cmp_x2 == EQUAL) return SMALLER; - FT s_hw = s2.source().hw(); - FT t_hw = s2.target().hw(); - return - CGAL_NTS sign(s2.source().hy()*t_hw - s2.target().hy()*s_hw) * - CGAL_NTS sign(s2.source().hx()*t_hw - s2.target().hx()*s_hw); + FT s_hw = s2s.hw(); + FT t_hw = s2t.hw(); + return - CGAL_NTS sign(s2s.hy()*t_hw - s2t.hy()*s_hw) * + CGAL_NTS sign(s2s.hx()*t_hw - s2t.hx()*s_hw); } - typename K::Comparison_result cmp_y2 = compare_y(s2.source(), s2.target()); + typename K::Comparison_result cmp_y2 = compare_y(s2s, s2t); if (cmp_y2 == EQUAL) { - typename K::Comparison_result cmp_x1 = compare_x(s1.source(), s1.target()); + typename K::Comparison_result cmp_x1 = compare_x(s1s, s1t); if (cmp_x1 == EQUAL) return LARGER; - FT s_hw = s1.source().hw(); - FT t_hw = s1.target().hw(); - return CGAL_NTS sign(s1.source().hy()*t_hw - s1.target().hy()*s_hw) * - CGAL_NTS sign(s1.source().hx()*t_hw - s1.target().hx()*s_hw); + FT s_hw = s1s.hw(); + FT t_hw = s1t.hw(); + return CGAL_NTS sign(s1s.hy()*t_hw - s1t.hy()*s_hw) * + CGAL_NTS sign(s1s.hx()*t_hw - s1t.hx()*s_hw); } - typename K::Comparison_result cmp_x1 = compare_x(s1.source(), s1.target()); - typename K::Comparison_result cmp_x2 = compare_x(s2.source(), s2.target()); + typename K::Comparison_result cmp_x1 = compare_x(s1s, s1t); + typename K::Comparison_result cmp_x2 = compare_x(s2s, s2t); if (cmp_x1 == EQUAL) return cmp_x2 == EQUAL ? EQUAL : LARGER; if (cmp_x2 == EQUAL) return SMALLER; - FT s1_s_hw = s1.source().hw(); - FT s1_t_hw = s1.target().hw(); - FT s2_s_hw = s2.source().hw(); - FT s2_t_hw = s2.target().hw(); - FT s1_xdiff = s1.source().hx()*s1_t_hw - s1.target().hx()*s1_s_hw; - FT s1_ydiff = s1.source().hy()*s1_t_hw - s1.target().hy()*s1_s_hw; - FT s2_xdiff = s2.source().hx()*s2_t_hw - s2.target().hx()*s2_s_hw; - FT s2_ydiff = s2.source().hy()*s2_t_hw - s2.target().hy()*s2_s_hw; + FT s1_s_hw = s1s.hw(); + FT s1_t_hw = s1t.hw(); + FT s2_s_hw = s2s.hw(); + FT s2_t_hw = s2t.hw(); + FT s1_xdiff = s1s.hx()*s1_t_hw - s1t.hx()*s1_s_hw; + FT s1_ydiff = s1s.hy()*s1_t_hw - s1t.hy()*s1_s_hw; + FT s2_xdiff = s2s.hx()*s2_t_hw - s2t.hx()*s2_s_hw; + FT s2_ydiff = s2s.hy()*s2_t_hw - s2t.hy()*s2_s_hw; typename K::Sign s1_sign = CGAL_NTS sign(s1_ydiff * s1_xdiff); typename K::Sign s2_sign = CGAL_NTS sign(s2_ydiff * s2_xdiff); diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 7880c97c0a4..aea9ec96dd2 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -58,6 +58,12 @@ Release date: December 2021 - Added the [OSQP solver](https://osqp.org/) support. This solver enables to efficiently compute the convex Quadratic Programming (QP) problems arising in the context of several packages. +### [Point Set Processing](https://doc.cgal.org/5.4/Manual/packages.html#PkgPointSetProcessing3) + +- Added support for `libpointmatcher::GenericDescriptorOutlierFilter` + that enables to provide a map from a point to a weight associated with this point. + + [Release 5.3](https://github.com/CGAL/cgal/releases/tag/v5.3) ----------- diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h index de21eb21c62..8c365a8b257 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h @@ -852,7 +852,7 @@ const CGAL::Point_3& t); -/// \defgroup compare_slopes_grp CGAL::compare_slopes() +/// \defgroup compare_slopes_grp CGAL::compare_slope() /// \ingroup kernel_global_function /// @{ @@ -870,9 +870,20 @@ from the left to the right endpoint of the segments. */ template Comparison_result compare_slope(const CGAL::Segment_2 &s1, -const CGAL::Segment_2 &s2); + const CGAL::Segment_2 &s2); /*! +compares the slopes of the segments `(s1s,s1t)` and `(s2s,s2t)`, +where the slope is the variation of the `y`-coordinate +from the left to the right endpoint of the segments. +*/ +template +Comparison_result compare_slope(const CGAL::Point_2 &s1s, + const CGAL::Point_2 &s1t, + const CGAL::Point_2 &s2s, + const CGAL::Point_2 &s2t); + + /*! compares the slopes of the segments `(p,q)` and `(r,s)`, where the slope is the variation of the `z`-coordinate from the first to the second point of the segment divided by the length of the segment. diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 96dea893001..e9a5d9f3058 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -1041,6 +1041,16 @@ public: Comparison_result operator()(const Kernel::Segment_2& s1, const Kernel::Segment_2& s2); + /*! + compares the slopes of the segments `(s1s,s1t)` and `(s2s,s2t)`, + where the slope is the variation of the `y`-coordinate + from the left to the right endpoint of the segments. + */ + Comparison_result operator()(const Kernel::Point_2& s1s, + const Kernel::Point_2& s1t, + const Kernel::Point_2& s2s, + const Kernel::Point_2& s2t)); + /// @} }; /* end Kernel::CompareSlope_2 */ @@ -9712,7 +9722,6 @@ public: const Kernel::Point_3&s, const Kernel::Point_3&t); - /// @} }; /* end Kernel::SideOfOrientedSphere_3 */ diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_2.h index 6cc0d7c8808..e974eae730d 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_2.h @@ -347,6 +347,15 @@ compare_slope(const Segment_2 &s1, const Segment_2 &s2) return internal::compare_slope(s1, s2, K()); } +template < class K > +inline +typename K::Comparison_result +compare_slope(const Point_2 &s1s, const Point_2 &s1t, + const Point_2 &s2s, const Point_2 &s2t) +{ + return internal::compare_slope(s1s, s1t, s2s, s2t, K()); +} + #ifndef CGAL_NO_DEPRECATED_CODE // kept for backward compatibility diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h index a9e659f704c..53d60ca990d 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h @@ -373,6 +373,17 @@ compare_slope(const typename K::Segment_2 &s1, return k.compare_slope_2_object()(s1, s2); } +template < class K > +inline +typename K::Comparison_result +compare_slope(const typename K::Point_2 &s1s, + const typename K::Point_2 &s1t, + const typename K::Point_2 &s2s, + const typename K::Point_2 &s2t,const K& k) +{ + return k.compare_slope_2_object()(s1s, s1t, s2s, s2t); +} + template < class K > inline typename K::Comparison_result diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h index efbae8e7e89..367be24d322 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h @@ -477,6 +477,7 @@ test_new_2(const R& rep) = rep.compare_slope_2_object(); Comparison_result tmp34ee = compare_slope(l1, l2); Comparison_result tmp34ff = compare_slope(s1, s2); + Comparison_result tmp34gg = compare_slope(p3, p5, p2, p3); typename R::Less_distance_to_point_2 less_distance_to_point = rep.less_distance_to_point_2_object(); @@ -680,7 +681,7 @@ test_new_2(const R& rep) use(tmp32a); use(tmp31d); use(tmp31c); use(tmp31b); use(tmp31a); use(tmp30); use(tmp26); use(tmp25); use(tmp24); use(tmp29); use(tmp28); use(tmp33a); use(tmp33b); use(tmp34ab); use(tmp34ac); - use(tmp34ff); use(tmp34ee); use(tmp34dd); use(tmp34cc); use(tmp34bb); + use(tmp34ff); use(tmp34gg); use(tmp34ee); use(tmp34dd); use(tmp34cc); use(tmp34bb); use(tmp34aa); use(tmp39a); use(tmp36a); use(tmp48c); use(tmp49c); use(tmp50c); use(tmp24a); use(tmp24b); use(tmp24c); use(tmp24d); use(tmp24e); use(tmp24f); diff --git a/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h b/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h index a5fc2f51271..3093f3b49a9 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesh_vertex_base_2.h @@ -60,7 +60,15 @@ public: sizing_info_ = s; } const FT& sizing_info() const { return sizing_info_; } +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + typedef Tag_true Has_timestamp; + std::size_t time_stamp() const { return time_stamp_; } + + void set_time_stamp(const std::size_t& ts) { time_stamp_ = ts; } + + std::size_t time_stamp_; +#endif // CGAL_MESH_2_DEBUG_REFINEMENT_POINTS }; } // namespace CGAL diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h index f66e077ae28..8f2cf435d60 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h @@ -504,6 +504,14 @@ public: va = edge.first->vertex(tr.cw (edge.second)); vb = edge.first->vertex(tr.ccw(edge.second)); +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + std::cerr << "refinement_point_impl(" + << "#" << va->time_stamp() << ": " << va->point() << ", " + << "#" << vb->time_stamp() << ": " << vb->point() << ") = "; + auto p = midpoint(va->point(), vb->point()); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return midpoint(va->point(), vb->point()); } diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h index 78449a2a443..827a7dc7557 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h @@ -71,9 +71,9 @@ class Refine_edges_base_with_clusters : Cluster ca, cb; clusters_iterator ca_it, cb_it; +public: using Super::triangulation_ref_impl; -public: /** \name CONSTRUCTORS */ Refine_edges_base_with_clusters(Tr& tr_, Clusters& c_) @@ -91,6 +91,11 @@ public: this->va = edge.first->vertex(Tr::cw (edge.second)); this->vb = edge.first->vertex(Tr::ccw(edge.second)); +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + std::cerr << "refinement_point_impl(" + << "#" << this->va->time_stamp() << ": " << this->va->point() << ", " + << "#" << this->vb->time_stamp() << ": " << this->vb->point() << ") = "; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES // std::cerr << "refinement_point_impl\n" << this->va->point() << " / " // << this->vb->point() << std::endl; @@ -110,17 +115,32 @@ public: std::cerr << "midpoint(" << this->va->point() << " , " << this->vb->point() << ")\n"; #endif // CGAL_MESH_2_DEBUG_CLUSTERS +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + auto p = midpoint(this->va->point(), this->vb->point()); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return midpoint(this->va->point(), this->vb->point()); } else { // va only is a cluster va_has_a_cluster = true; +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + auto p = split_cluster_point(this->va,this->vb,ca); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return split_cluster_point(this->va,this->vb,ca); } } else if( clusters.get_cluster(this->vb,this->va,cb,cb_it) ){ // vb only is a cluster vb_has_a_cluster = true; +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + auto p = split_cluster_point(this->vb,this->va,cb); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return split_cluster_point(this->vb,this->va,cb); }else{ // no cluster @@ -128,6 +148,11 @@ public: std::cerr << "midpoint(" << this->va->point() << " , " << this->vb->point() << ")\n"; #endif // CGAL_MESH_2_DEBUG_CLUSTERS +#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS + auto p = midpoint(this->va->point(), this->vb->point()); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return midpoint(this->va->point(), this->vb->point()); } }; diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h b/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h index 262dfe0d743..1d7126e80e9 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h @@ -15,7 +15,7 @@ #include - +#include #include #include #include @@ -81,7 +81,7 @@ protected: // --- PROTECTED TYPES --- typedef CGAL::Double_map Bad_faces; protected: - // --- PROTECTED MEMBER DATAS --- + // --- PROTECTED MEMBER DATA --- Criteria& criteria; /**vertex(0)->time_stamp() << ": " << f->vertex(0)->point() << ", " + << "#" << f->vertex(1)->time_stamp() << ": " << f->vertex(1)->point() << ", " + << "#" << f->vertex(2)->time_stamp() << ": " << f->vertex(2)->point() << ") = "; + auto p = triangulation_ref_impl().circumcenter(f); + std::cerr << p << '\n'; + return p; +#endif // CGAL_MESH_2_DEBUG_BAD_FACES return triangulation_ref_impl().circumcenter(f); } diff --git a/Orthtree/package_info/Orthtree/copyright.txt b/Orthtree/package_info/Orthtree/copyright similarity index 100% rename from Orthtree/package_info/Orthtree/copyright.txt rename to Orthtree/package_info/Orthtree/copyright diff --git a/Point_set_2/package_info/Point_set_2/copyright b/Point_set_2/package_info/Point_set_2/copyright new file mode 100644 index 00000000000..2d3aff3e5b9 --- /dev/null +++ b/Point_set_2/package_info/Point_set_2/copyright @@ -0,0 +1 @@ +Max-Planck-Institute Saarbruecken (Germany) diff --git a/Point_set_3/package_info/Point_set_3/copyright.txt b/Point_set_3/package_info/Point_set_3/copyright similarity index 100% rename from Point_set_3/package_info/Point_set_3/copyright.txt rename to Point_set_3/package_info/Point_set_3/copyright diff --git a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp index 1d78d67f9a1..68d6c69801f 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/registration_with_pointmatcher.cpp @@ -21,6 +21,17 @@ typedef std::pair Pwn; typedef CGAL::First_of_pair_property_map Point_map; typedef CGAL::Second_of_pair_property_map Normal_map; +struct Weight_map +{ + typedef Pwn key_type; + typedef typename K::FT value_type; + typedef value_type reference; + typedef boost::readable_property_map_tag category; + + typedef Weight_map Self; + friend reference get(const Self&, const key_type&) { return value_type(1); } +}; + namespace params = CGAL::parameters; int main(int argc, const char** argv) @@ -63,15 +74,17 @@ int main(int argc, const char** argv) point_set_2_filters.push_back( ICP_config { /*.name=*/"MinDistDataPointsFilter" , /*.params=*/{ {"minDist", "0.5" }} } ); point_set_2_filters.push_back( ICP_config { /*.name=*/"RandomSamplingDataPointsFilter", /*.params=*/{ {"prob" , "0.05"}} } ); - // Prepare matcher function + // Prepare matcher function ICP_config matcher { /*.name=*/"KDTreeMatcher", /*.params=*/{ {"knn", "1"}, {"epsilon", "3.16"} } }; // Prepare outlier filters + // NOTE: `GenericDescriptorOutlierFilter` supports only one `descName` that is `weights`! std::vector outlier_filters; outlier_filters.push_back( ICP_config { /*.name=*/"TrimmedDistOutlierFilter", /*.params=*/{ {"ratio", "0.75" }} } ); + outlier_filters.push_back( ICP_config { /*.name=*/"GenericDescriptorOutlierFilter", /*.params=*/{ {"descName", "weights" }} } ); // Prepare error minimizer - ICP_config error_minimizer { /*.name=*/"PointToPointErrorMinimizer"}; + ICP_config error_minimizer { /*.name=*/"PointToPointErrorMinimizer", /*.params=*/{ } }; // Prepare transformation checker std::vector transformation_checkers; @@ -81,10 +94,10 @@ int main(int argc, const char** argv) {"smoothLength" , "4" } } } ); // Prepare inspector - ICP_config inspector { /*.name=*/"NullInspector" }; + ICP_config inspector { /*.name=*/"NullInspector", /*.params=*/{ } }; // Prepare logger - ICP_config logger { /*.name=*/"FileLogger" }; + ICP_config logger { /*.name=*/"FileLogger", /*.params=*/{ } }; const K::Aff_transformation_3 identity_transform = K::Aff_transformation_3(CGAL::Identity_transformation()); @@ -92,7 +105,7 @@ int main(int argc, const char** argv) std::pair res = CGAL::pointmatcher::compute_registration_transformation (pwns1, pwns2, - params::point_map(Point_map()).normal_map(Normal_map()) + params::point_map(Point_map()).normal_map(Normal_map()).scalar_map(Weight_map()) .point_set_filters(point_set_1_filters) .matcher(matcher) .outlier_filters(outlier_filters) @@ -100,7 +113,7 @@ int main(int argc, const char** argv) .transformation_checkers(transformation_checkers) .inspector(inspector) .logger(logger), - params::point_map(Point_map()).normal_map(Normal_map()) + params::point_map(Point_map()).normal_map(Normal_map()).scalar_map(Weight_map()) .point_set_filters(point_set_2_filters) .transformation(identity_transform) /* initial transform for pwns2. * default value is already identity transform. diff --git a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h index d561b3b26a4..066d233cede 100644 --- a/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -78,7 +79,7 @@ construct_icp(const NamedParameters1& np1, const NamedParameters2& np2) icp.setDefault(); - const ICP_config null_config { "_null_pm_config_in_cgal" }; + const ICP_config null_config { /*.name=*/"_null_pm_config_in_cgal", /*.params=*/{ } }; const std::vector null_config_chain { null_config }; auto is_null_config = [&](const ICP_config& c) { return !c.name.compare(null_config.name); }; @@ -220,10 +221,11 @@ template void copy_cgal_points_to_pm_matrix -(const PointRange& prange, PointMap point_map, VectorMap vector_map, PM_matrix& pm_points, PM_matrix& pm_normals) +(const PointRange& prange, PointMap point_map, VectorMap vector_map, ScalarMap scalar_map, PM_matrix& pm_points, PM_matrix& pm_normals, PM_matrix& pm_weights) { int idx = 0; for(const auto& p : prange) @@ -236,11 +238,15 @@ copy_cgal_points_to_pm_matrix pm_points(3, idx) = Scalar(1.); // normal - const auto& normal = get (vector_map, p); + const auto& normal = get(vector_map, p); pm_normals(0, idx) = normal.x(); pm_normals(1, idx) = normal.y(); pm_normals(2, idx) = normal.z(); + // weight + const auto& weight = get(scalar_map, p); + pm_weights(0, idx) = weight; + ++idx; } } @@ -251,11 +257,14 @@ template + class VectorMap2, + class ScalarMap1, + class ScalarMap2> std::pair compute_registration_transformation(const PointRange1& range1, const PointRange2& range2, PointMap1 point_map1, PointMap2 point_map2, VectorMap1 vector_map1, VectorMap2 vector_map2, + ScalarMap1 scalar_map1, ScalarMap2 scalar_map2, const typename Kernel::Aff_transformation_3& initial_transform, ICP icp) { @@ -273,8 +282,10 @@ compute_registration_transformation(const PointRange1& range1, const PointRange2 PM_matrix ref_points_pos_matrix = PM_matrix (4, nb_ref_points); PM_matrix ref_points_normal_matrix = PM_matrix (3, nb_ref_points); + PM_matrix ref_points_weight_matrix = PM_matrix (1, nb_ref_points); PM_matrix points_pos_matrix = PM_matrix (4, nb_points); PM_matrix points_normal_matrix = PM_matrix (3, nb_points); + PM_matrix points_weight_matrix = PM_matrix (1, nb_points); // In CGAL, point_set_1 is the reference while point_set_2 is the data @@ -282,16 +293,20 @@ compute_registration_transformation(const PointRange1& range1, const PointRange2 internal::copy_cgal_points_to_pm_matrix(range1, point_map1, vector_map1, + scalar_map1, ref_points_pos_matrix, // out - ref_points_normal_matrix); // out + ref_points_normal_matrix, // out + ref_points_weight_matrix); // out internal::copy_cgal_points_to_pm_matrix(range2, point_map2, vector_map2, + scalar_map2, points_pos_matrix, // out - points_normal_matrix); // out + points_normal_matrix, // out + points_weight_matrix); // out - auto construct_PM_cloud = [](const PM_matrix& positions, const PM_matrix& normals) -> PM_cloud + auto construct_PM_cloud = [](const PM_matrix& positions, const PM_matrix& normals, const PM_matrix& weights) -> PM_cloud { PM_cloud cloud; @@ -300,12 +315,13 @@ compute_registration_transformation(const PointRange1& range1, const PointRange2 cloud.addFeature("z", positions.row(2)); cloud.addFeature("pad", positions.row(3)); cloud.addDescriptor("normals", normals); + cloud.addDescriptor("weights", weights); return cloud; }; - PM_cloud ref_cloud = construct_PM_cloud(ref_points_pos_matrix, ref_points_normal_matrix); - PM_cloud cloud = construct_PM_cloud(points_pos_matrix, points_normal_matrix); + PM_cloud ref_cloud = construct_PM_cloud(ref_points_pos_matrix, ref_points_normal_matrix, ref_points_weight_matrix); + PM_cloud cloud = construct_PM_cloud(points_pos_matrix, points_normal_matrix, points_weight_matrix); PM_transform_params pm_transform_params = PM_transform_params::Identity(4,4); @@ -385,6 +401,16 @@ compute_registration_transformation(const PointRange1& range1, const PointRange2 of the iterator of `PointRange1` and whose value type is `geom_traits::Vector_3`} \cgalParamNEnd + \cgalParamNBegin{scalar_map} + \cgalParamDescription{a property map associating 1D values - scalars to the elements of the point set `point_set_1`} + \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type + of the iterator of `PointRange1` and whose value type is `geom_traits::FT`} + \cgalParamDefault{`CGAL::Constant_property_map` with the value = 1 for all scalars} + \cgalParamExtra{These scalars, sometimes called weights, can be provided through the `GenericDescriptorOutlierFilter` + of \ref thirdpartylibpointmatcher library, where the `descName = weights`. + See `outlier_filters` below and `registration_with_pointmatcher.cpp` for more details.} + \cgalParamNEnd + \cgalParamNBegin{point_set_filters} \cgalParamDescription{a chain of filters to be applied to the point set} \cgalParamType{a class model of `Range`. The value type of its iterator must be `ICP_config`.} @@ -510,6 +536,15 @@ compute_registration_transformation(const PointRange1& range1, const PointRange2 of the iterator of `PointRange2` and whose value type is `geom_traits::Vector_3`} \cgalParamNEnd + \cgalParamNBegin{scalar_map} + \cgalParamDescription{a property map associating 1D values - scalars to the elements of the point set `point_set_2`} + \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type + of the iterator of `PointRange2` and whose value type is `geom_traits::FT`} + \cgalParamDefault{`CGAL::Constant_property_map` with the value = 1 for all scalars} + \cgalParamExtra{These scalars, sometimes called weights, can be provided through the `GenericDescriptorOutlierFilter` + of \ref thirdpartylibpointmatcher library, where the `descName = weights`.} + \cgalParamNEnd + \cgalParamNBegin{point_set_filters} \cgalParamDescription{a chain of filters to be applied to the point set} \cgalParamType{a class model of `Range`. The value type of its iterator must be `ICP_config`.} @@ -563,6 +598,11 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point namespace PSP = CGAL::Point_set_processing_3; + // basic types + typedef typename PSP::GetK::Kernel Kernel; + typedef typename Kernel::FT Scalar; + typedef typename Kernel::Aff_transformation_3 Transformation; + // property map types typedef typename CGAL::GetPointMap::type PointMap1; typedef typename CGAL::GetPointMap::type PointMap2; @@ -576,14 +616,22 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point typename boost::property_traits::value_type> ::value), "The vector type of input ranges must be the same"); - typedef typename PSP::GetK::Kernel Kernel; - typedef typename Kernel::FT Scalar; - typedef typename Kernel::Aff_transformation_3 Transformation; + typedef typename std::iterator_traits::value_type key_type1; + typedef typename std::iterator_traits::value_type key_type2; + + typedef typename CGAL::Constant_property_map DefaultWeightMap1; + typedef typename CGAL::Constant_property_map DefaultWeightMap2; PointMap1 point_map1 = choose_parameter(get_parameter(np1, internal_np::point_map), PointMap1()); NormalMap1 normal_map1 = choose_parameter(get_parameter(np1, internal_np::normal_map), NormalMap1()); + auto weight_map1 = choose_parameter(get_parameter(np1, internal_np::scalar_map), DefaultWeightMap1(Scalar(1))); PointMap2 point_map2 = choose_parameter(get_parameter(np2, internal_np::point_map), PointMap2()); NormalMap2 normal_map2 = choose_parameter(get_parameter(np2, internal_np::normal_map), NormalMap2()); + auto weight_map2 = choose_parameter(get_parameter(np2, internal_np::scalar_map), DefaultWeightMap2(Scalar(1))); + + CGAL_static_assertion_msg((boost::is_same< typename boost::property_traits::value_type, + typename boost::property_traits::value_type> ::value), + "The scalar type of input ranges must be the same"); // initial transformation Transformation initial_transformation @@ -592,6 +640,7 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point return internal::compute_registration_transformation(point_set_1, point_set_2, point_map1, point_map2, normal_map1, normal_map2, + weight_map1, weight_map2, initial_transformation, internal::construct_icp(np1, np2)); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 5fd919df74d..e8bfe64b580 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -316,6 +316,7 @@ void split_along_edges(TriangleMesh& tm, std::set extra_border_hedges; for(std::size_t k=0; k> tm1; + PMP::clip(tm1, K::Plane_3(0,0,1,-1), CGAL::parameters::use_compact_clipper(false)); + assert(vertices(tm1).size()==753); + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + std::size_t nbv = vertices(tm1).size(); + PMP::clip(tm1, K::Plane_3(0,0,1,-1), CGAL::parameters::use_compact_clipper(true)); + assert(vertices(tm1).size()==nbv+2); // because of the plane diagonal + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + PMP::clip(tm1, K::Plane_3(0,0,1,-1), CGAL::parameters::use_compact_clipper(false).allow_self_intersections(true)); + assert(vertices(tm1).size()==753); + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + std::size_t nbv = vertices(tm1).size(); + PMP::clip(tm1, K::Plane_3(0,0,1,-1), CGAL::parameters::use_compact_clipper(true).allow_self_intersections(true)); + assert(vertices(tm1).size()==nbv+2); // because of the plane diagonal + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(false)); + assert(vertices(tm1).size()==0); + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(true)); + assert(vertices(tm1).size()==176); + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(false).allow_self_intersections(true)); + assert(vertices(tm1).size()==0); + } + + { + TriangleMesh tm1; + std::ifstream("data-coref/open_large_cube.off") >> tm1; + PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(true).allow_self_intersections(true)); + assert(vertices(tm1).size()==176); + } } template void test_split_plane() { - // test with a clipper mesh +//test with a splitter mesh Mesh tm1; std::ifstream input("data-coref/elephant.off"); input >> tm1; @@ -529,7 +587,45 @@ void test_split_plane() CGAL::clear(tm1); meshes.clear(); - //test with SI +//test with a non-closed splitter mesh (border edges in the plane) + input.open("data-coref/open_large_cube.off"); + input >> tm1; + + if(!input) + { + std::cerr<<"File not found. Aborting."<> tm1; + + if(!input) + { + std::cerr<<"File not found. Aborting."<> tm1; if(num_vertices(tm1) == 0) { @@ -735,12 +831,15 @@ void test_isocuboid() .allow_self_intersections(true)); PMP::split_connected_components(tm, meshes, params::all_default()); assert(meshes.size() == 4); - //if the order is not deterministc, put the num_vertices in a list and check - //if the list does contain all those numbers. - assert(vertices(meshes[0]).size() == 22); - assert(vertices(meshes[1]).size() == 23); - assert(vertices(meshes[2]).size() == 7); - assert(vertices(meshes[3]).size() == 4); + + std::set sizes; + for (int i=0; i<4; ++i) + sizes.insert(vertices(meshes[i]).size()); + + assert(sizes.count(22)==1); + assert(sizes.count(23)==1); + assert(sizes.count(7)==1); + assert(sizes.count(4)==1); CGAL::clear(tm); meshes.clear(); diff --git a/Polyhedron/include/CGAL/Polyhedron_3.h b/Polyhedron/include/CGAL/Polyhedron_3.h index 8c2fce47dfe..b948f2e6dcb 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_3.h @@ -110,7 +110,8 @@ public: // the degree of the vertex, i.e., edges emanating from this vertex std::size_t vertex_degree() const { - return this->halfedge()->vertex_degree(); + return this->halfedge()!=Halfedge_const_handle() + ? this->halfedge()->vertex_degree() : 0; } size_type degree() const { return vertex_degree(); } //backwards compatible diff --git a/Scripts/developer_scripts/run_testsuite_from_branch_name.sh b/Scripts/developer_scripts/run_testsuite_from_branch_name.sh index b5ce2554e68..33801202328 100644 --- a/Scripts/developer_scripts/run_testsuite_from_branch_name.sh +++ b/Scripts/developer_scripts/run_testsuite_from_branch_name.sh @@ -33,7 +33,7 @@ git fetch $USER_REPO git checkout $BRANCH_NAME git reset --hard $USER_REPO/$BRANCH_NAME #setup the list_test_packages -TMP_LIST=$(git diff --name-only cgal/$BASE_NAME...HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true) +TMP_LIST=$(git diff --name-only cgal/$BASE_NAME...HEAD |egrep -v /doc |egrep "\.h"\|"\.cpp" |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true) LIST_OF_PKGS="" for PKG in $(ls) ; do @@ -63,6 +63,9 @@ cd ${CGAL_ROOT} if [ -L CGAL-I ]; then rm CGAL-I; fi ln -s $PWD/CGAL-TEST/$DEST CGAL-I +if [ -d CGAL-I/cmake/platforms ]; then + rm -rf CGAL-I/cmake/platforms/* +fi echo "starting testsuite..." ./autotest_cgal -c diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 4a796a0ac5d..53331b8d709 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -480,8 +480,11 @@ public: return false; } - if (callback && !callback(0.)) + if (callback && !callback(0.)) { + clear_octrees(); + clear_shape_factories(); return false; + } // Reset data structures possibly used by former search m_extracted_shapes = @@ -580,8 +583,10 @@ public: m_shape_index, m_required_samples); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } } while (m_shape_index[first_sample] != -1 || !done); @@ -591,8 +596,10 @@ public: bool candidate_success = false; for(typename std::vector::iterator it = m_shape_factories.begin(); it != m_shape_factories.end(); it++) { - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } Shape *p = (Shape *) (*it)(); //compute the primitive and says if the candidate is valid p->compute(indices, @@ -659,8 +666,10 @@ public: Shape *best_candidate = get_best_candidate(candidates, m_num_available_points - num_invalid); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } // If search is done and the best candidate is too small, we are done. if (!keep_searching && best_candidate->m_score < m_options.min_points) @@ -683,8 +692,10 @@ public: best_candidate->connected_component(best_candidate->m_indices, m_options.cluster_epsilon); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } // check score against min_points and clear out candidates if too low if (best_candidate->indices_of_assigned_points().size() < m_options.min_points) { @@ -700,8 +711,10 @@ public: delete best_candidate; best_candidate = nullptr; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } // Trimming candidates list std::size_t empty = 0, occupied = 0; @@ -727,8 +740,10 @@ public: candidates.resize(empty); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } } else if (stop_probability((std::size_t) best_candidate->expected_value(), (m_num_available_points - num_invalid), generated_candidates, @@ -742,8 +757,10 @@ public: m_extracted_shapes->push_back( boost::shared_ptr(best_candidate)); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } //2. remove the points const std::vector &indices_points_best_candidate = @@ -777,8 +794,10 @@ public: failed_candidates = 0; best_expected = 0; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } std::vector subset_sizes(m_num_subsets); subset_sizes[0] = m_available_octree_sizes[0]; @@ -807,8 +826,10 @@ public: } } - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } std::size_t start = 0, end = candidates.size() - 1; while (start < end) { @@ -828,8 +849,10 @@ public: } else if (!keep_searching) ++generated_candidates; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear(num_invalid, candidates); return false; + } keep_searching = (stop_probability(m_options.min_points, m_num_available_points - num_invalid, @@ -841,13 +864,7 @@ public: || best_expected >= m_options.min_points); // Clean up remaining candidates. - for (std::size_t i = 0; i < candidates.size(); i++) - delete candidates[i]; - - candidates.resize(0); - - m_num_available_points -= num_invalid; - + clear_candidates(num_invalid, candidates); return true; } @@ -912,6 +929,24 @@ public: /// @} private: + void clear( + const std::size_t num_invalid, std::vector& candidates) { + + clear_octrees(); + clear_shape_factories(); + clear_candidates(num_invalid, candidates); + } + + void clear_candidates( + const std::size_t num_invalid, std::vector& candidates) { + + for (std::size_t i = 0; i < candidates.size(); i++) { + delete candidates[i]; + } + candidates.resize(0); + m_num_available_points -= num_invalid; + } + int select_random_octree_level() { auto upper_bound = static_cast(m_global_octree->maxLevel() + 1); return (int) get_default_random()(upper_bound); diff --git a/Skin_surface_3/package_info/Skin_surface_3/copyright b/Skin_surface_3/package_info/Skin_surface_3/copyright new file mode 100644 index 00000000000..71aca79bcd0 --- /dev/null +++ b/Skin_surface_3/package_info/Skin_surface_3/copyright @@ -0,0 +1 @@ +Rijksuniversiteit Groningen (Netherlands) diff --git a/Stream_support/doc/Stream_support/IOstream.txt b/Stream_support/doc/Stream_support/IOstream.txt index 0a979c0d106..085fe65127d 100644 --- a/Stream_support/doc/Stream_support/IOstream.txt +++ b/Stream_support/doc/Stream_support/IOstream.txt @@ -252,10 +252,10 @@ for drawing operations in many \cgal output streams. Each color is defined by a triple of integers `(r,g,b)` with 0 \f$ \le \f$ r,g,b \f$ \le \f$ 255, the so-called rgb-value of the color. -There are a 11 predefined `Color` constants available: -`BLACK`, `WHITE`, `GRAY`, `RED`, `GREEN`, -`DEEPBLUE`, `BLUE`, `PURPLE`, `VIOLET`, `ORANGE`, -and `YELLOW`. +There are a 11 predefined `Color` functions available: +`black()`, `white()`, `gray()`, `red()`, `green()`, +`deep_blue()`, `blue()`, `purple()`, `violet()`, `orange()`, +and `yellow()`. \subsection IOstreamStream Stream Support diff --git a/Stream_support/test/Stream_support/data/colored_tetra.ply b/Stream_support/test/Stream_support/data/colored_tetra.ply index 7ec622125d1..0512db6f502 100644 --- a/Stream_support/test/Stream_support/data/colored_tetra.ply +++ b/Stream_support/test/Stream_support/data/colored_tetra.ply @@ -18,8 +18,8 @@ property uchar green property uchar blue property int label element edge 6 -property int v0 -property int v1 +property int vertex1 +property int vertex2 property float confidence end_header 0 0 0 -0.5 -0.5 -0.5 255 255 0 0 diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index a57834da89c..26fc352c391 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -175,8 +175,12 @@ public: bool has_simplex_specific_property(internal::PLY_read_number* property, Edge_index) { const std::string& name = property->name(); + if(name == "vertex1" || name == "vertex2") + return true; +#ifndef CGAL_NO_DEPRECATED_CODE if(name == "v0" || name == "v1") return true; +#endif return false; } @@ -365,8 +369,8 @@ public: void process_line(PLY_element& element, Edge_index& ei) { IntType v0, v1; - element.assign(v0, "v0"); - element.assign(v1, "v1"); + element.assign(v0, "vertex1"); + element.assign(v1, "vertex2"); Halfedge_index hi = m_mesh.halfedge(m_map_v2v[std::size_t(v0)], m_map_v2v[std::size_t(v1)]); @@ -961,8 +965,8 @@ bool write_PLY(std::ostream& os, if(!eprinters.empty()) { os << "element edge " << sm.number_of_edges() << std::endl; - os << "property int v0" << std::endl; - os << "property int v1" << std::endl; + os << "property int vertex1" << std::endl; + os << "property int vertex2" << std::endl; os << oss.str(); } } diff --git a/Surface_mesh/test/Surface_mesh/colored_tetra.ply b/Surface_mesh/test/Surface_mesh/colored_tetra.ply index 7ec622125d1..0512db6f502 100644 --- a/Surface_mesh/test/Surface_mesh/colored_tetra.ply +++ b/Surface_mesh/test/Surface_mesh/colored_tetra.ply @@ -18,8 +18,8 @@ property uchar green property uchar blue property int label element edge 6 -property int v0 -property int v1 +property int vertex1 +property int vertex2 property float confidence end_header 0 0 0 -0.5 -0.5 -0.5 255 255 0 0 diff --git a/Surface_mesh_shortest_path/package_info/Surface_mesh_shortest_path/copyright.txt b/Surface_mesh_shortest_path/package_info/Surface_mesh_shortest_path/copyright similarity index 100% rename from Surface_mesh_shortest_path/package_info/Surface_mesh_shortest_path/copyright.txt rename to Surface_mesh_shortest_path/package_info/Surface_mesh_shortest_path/copyright diff --git a/Surface_mesh_topology/package_info/Surface_mesh_topology/copyright b/Surface_mesh_topology/package_info/Surface_mesh_topology/copyright new file mode 100644 index 00000000000..3c616b4b377 --- /dev/null +++ b/Surface_mesh_topology/package_info/Surface_mesh_topology/copyright @@ -0,0 +1 @@ +CNRS and LIRIS' Establishments (France) diff --git a/TDS_2/include/CGAL/Triangulation_data_structure_2.h b/TDS_2/include/CGAL/Triangulation_data_structure_2.h index 6f32473c744..e9aea5691c9 100644 --- a/TDS_2/include/CGAL/Triangulation_data_structure_2.h +++ b/TDS_2/include/CGAL/Triangulation_data_structure_2.h @@ -1997,13 +1997,16 @@ copy_tds(const TDS_src& tds_src, CGAL_triangulation_precondition( tds_src.is_vertex(vert)); clear(); - size_type n = tds_src.number_of_vertices(); set_dimension(tds_src.dimension()); - // Number of pointers to cell/vertex to copy per cell. - int dim = (std::max)(1, dimension() + 1); + if(tds_src.number_of_vertices() == 0) + return Vertex_handle(); - if(n == 0) {return Vertex_handle();} + // Number of pointers to face/vertex to copy per face. + const int dim = (std::max)(1, dimension() + 1); + + // Number of neighbors to set in each face (dim -1 has a single face) + const int nn = (std::max)(0, dimension() + 1); //initializes maps Unique_hash_map vmap; @@ -2025,7 +2028,7 @@ copy_tds(const TDS_src& tds_src, convert_face(*fit1, *fh); } - //link vertices to a cell + //link vertices to a face vit1 = tds_src.vertices_begin(); for ( ; vit1 != tds_src.vertices_end(); vit1++) { vmap[vit1]->set_face(fmap[vit1->face()]); @@ -2034,10 +2037,10 @@ copy_tds(const TDS_src& tds_src, //update vertices and neighbor pointers fit1 = tds_src.faces().begin(); for ( ; fit1 != tds_src.faces_end(); ++fit1) { - for (int j = 0; j < dim ; ++j) { + for (int j = 0; j < dim ; ++j) fmap[fit1]->set_vertex(j, vmap[fit1->vertex(j)] ); + for (int j = 0; j < nn ; ++j) fmap[fit1]->set_neighbor(j, fmap[fit1->neighbor(j)]); - } } // remove the post condition because it is false when copying the diff --git a/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h b/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h index 8a6682b6c75..b9e660d9d03 100644 --- a/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h +++ b/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h @@ -240,7 +240,7 @@ Triangulation_ds_face_base_2 :: set_neighbor(int i, Face_handle n) { CGAL_triangulation_precondition( i == 0 || i == 1 || i == 2); - CGAL_triangulation_precondition( this != &*n ); + CGAL_triangulation_precondition( this != n.operator->() ); N[i] = n; } diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index bd9323321ba..6b8445a4683 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -4041,32 +4041,27 @@ copy_tds(const TDS_src& tds, || tds.is_vertex(vert) ); clear(); - - size_type n = tds.number_of_vertices(); set_dimension(tds.dimension()); - if (n == 0) return Vertex_handle(); + if(tds.number_of_vertices() == 0) + return Vertex_handle(); // Number of pointers to cell/vertex to copy per cell. - int dim = (std::max)(1, dimension() + 1); + const int dim = (std::max)(1, dimension() + 1); - // Create the vertices. - std::vector TV(n); - size_type i = 0; - - for (typename TDS_src::Vertex_iterator vit = tds.vertices_begin(); - vit != tds.vertices_end(); ++vit) - TV[i++] = vit; - - CGAL_triangulation_assertion( i == n ); + // Number of neighbors to set + const int nn = (std::max)(0, dimension() + 1); + // Initializes maps Unique_hash_map< typename TDS_src::Vertex_handle,Vertex_handle > V; Unique_hash_map< typename TDS_src::Cell_handle,Cell_handle > F; - for (i=0; i <= n-1; ++i){ - Vertex_handle vh=create_vertex( convert_vertex(*TV[i]) ); - V[ TV[i] ] = vh; - convert_vertex(*TV[i],*vh); + // Create the vertices. + for (typename TDS_src::Vertex_iterator vit = tds.vertices_begin(); + vit != tds.vertices_end(); ++vit) { + Vertex_handle vh = create_vertex( convert_vertex(*vit) ); + V[vit] = vh; + convert_vertex(*vit,*vh); } // Create the cells. @@ -4087,7 +4082,7 @@ copy_tds(const TDS_src& tds, // Hook neighbor pointers of the cells. for (typename TDS_src::Cell_iterator cit2 = tds.cells().begin(); cit2 != tds.cells_end(); ++cit2) { - for (int j = 0; j < dim; j++) + for (int j = 0; j < nn; j++) F[cit2]->set_neighbor(j, F[cit2->neighbor(j)] ); } diff --git a/Three/package_info/Three/copyright.txt b/Three/package_info/Three/copyright similarity index 100% rename from Three/package_info/Three/copyright.txt rename to Three/package_info/Three/copyright diff --git a/Triangulation/package_info/Triangulation/copyright b/Triangulation/package_info/Triangulation/copyright new file mode 100644 index 00000000000..434d5723b62 --- /dev/null +++ b/Triangulation/package_info/Triangulation/copyright @@ -0,0 +1 @@ +INRIA Sophia-Antipolis (France) diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_2.h index c8c982b38bc..15caad00e68 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_triangulation_2.h @@ -132,9 +132,14 @@ _test_cls_triangulation_2( const Triangul & ) assert( T1.number_of_vertices() == 0 ); Triangul T3(T1); - Triangul T4 = T1; - T3.swap(T1); + assert(T3.tds().vertices().size() == T1.tds().vertices().size()); + assert(T3.tds().faces().size() == T1.tds().faces().size()); + Triangul T4 = T1; + assert(T4.tds().vertices().size() == T1.tds().vertices().size()); + assert(T4.tds().faces().size() == T1.tds().faces().size()); + + T3.swap(T1); /**************************/ /******* INSERTIONS *******/ @@ -162,6 +167,10 @@ _test_cls_triangulation_2( const Triangul & ) assert( T0_1.number_of_faces() == 0); assert( T0_1.is_valid() ); + Triangul T0_1b(T0_1); + assert(T0_1b.tds().vertices().size() == T0_1.tds().vertices().size()); + assert(T0_1b.tds().faces().size() == T0_1.tds().faces().size()); + // test insert_first() Triangul T0_2; Vertex_handle v0_2_0 = T0_2.insert_first(p0); @@ -184,6 +193,10 @@ _test_cls_triangulation_2( const Triangul & ) assert( T1_2.number_of_faces() == 0 ); assert( T1_2.is_valid() ); + Triangul T1_2b(T1_2); + assert(T1_2b.tds().vertices().size() == T1_2.tds().vertices().size()); + assert(T1_2b.tds().faces().size() == T1_2.tds().faces().size()); + // p1,p3,p2 [endpoints first] Triangul T1_3_0; Vertex_handle v1_3_0_1 = T1_3_0.insert(p1); assert( v1_3_0_1 != nullptr ); diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index 8c63a6cd09b..fe5b2d041b2 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -190,7 +190,21 @@ _test_cls_triangulation_3(const Triangulation &) //######################################################################## - /**************CONSTRUCTORS (1)*********************/ + /************** CONSTRUCTORS (1)********************/ + + Cls Tm1; + assert( Tm1.dimension() == -1 ); + assert( Tm1.number_of_vertices() == 0 ); + + Cls Tm3(Tm1); + assert(Tm3 == Tm1); + + Cls Tm4 = Tm1; + assert(Tm4 == Tm1); + + Tm3.swap(Tm1); + + /************** INSERTIONS *************************/ /************** and I/O ****************************/ std::cout << " Constructor " << std::endl; @@ -214,6 +228,9 @@ _test_cls_triangulation_3(const Triangulation &) assert(T0.number_of_vertices() == 1); assert(T0.is_valid()); + Cls T0d0(T0); + assert(T0 == T0d0); + if (! del) // to avoid doing the following tests for both Delaunay // and non Delaunay triangulations { @@ -228,6 +245,9 @@ _test_cls_triangulation_3(const Triangulation &) assert(T0.number_of_vertices() == 2); assert(T0.is_valid()); + Cls T0d1(T0); + assert(T0 == T0d1); + if (! del) // to avoid doing the following tests for both Delaunay // and non Delaunay triangulations { @@ -242,6 +262,9 @@ _test_cls_triangulation_3(const Triangulation &) assert(T0.number_of_vertices() == 3); assert(T0.is_valid()); + Cls T0d2(T0); + assert(T0 == T0d2); + if (! del) // to avoid doing the following tests for both Delaunay // and non Delaunay triangulations { @@ -256,6 +279,9 @@ _test_cls_triangulation_3(const Triangulation &) assert(T0.number_of_vertices() == 4); assert(T0.is_valid()); + Cls T0d3(T0); + assert(T0 == T0d3); + if (! del) // to avoid doing the following tests for both Delaunay // and non Delaunay triangulations { diff --git a/Voronoi_diagram_2/package_info/Voronoi_diagram_2/copyright b/Voronoi_diagram_2/package_info/Voronoi_diagram_2/copyright new file mode 100644 index 00000000000..ca00e0cdf39 --- /dev/null +++ b/Voronoi_diagram_2/package_info/Voronoi_diagram_2/copyright @@ -0,0 +1 @@ +Foundation for Research and Technology-Hellas (Greece) diff --git a/Weights/doc/Weights/PackageDescription.txt b/Weights/doc/Weights/PackageDescription.txt index fa3ba620891..1fc97c0ee1f 100644 --- a/Weights/doc/Weights/PackageDescription.txt +++ b/Weights/doc/Weights/PackageDescription.txt @@ -19,7 +19,9 @@ Models and functions that can be used to compute weights which have a simple ana \defgroup PkgWeightsRefUniformWeights Uniform Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is always equal to 1. @@ -33,7 +35,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefShepardWeights Shepard Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \frac{1}{d^a}\f$ @@ -61,7 +65,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefInverseDistanceWeights Inverse Distance Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \frac{1}{d}\f$ @@ -90,7 +96,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefThreePointFamilyWeights Three Point Family Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \frac{d_2^a A_1 - d^a B + d_1^a A_2}{A_1 A_2}\f$ @@ -129,7 +137,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefWachspressWeights Wachspress Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \frac{C}{A_1 A_2}\f$ @@ -160,7 +170,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefAuthalicWeights Authalic Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = 2 \frac{\cot\beta + \cot\gamma}{d^2}\f$ @@ -190,7 +202,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefMeanValueWeights Mean Value Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \pm 2 \sqrt{\frac{2 (d_1 d_2 - D)}{(d d_1 + D_1)(d d_2 + D_2)}}\f$ @@ -227,7 +241,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefTangentWeights Tangent Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = 2 \frac{t_1 + t_2}{d}\f$, where @@ -262,7 +278,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefDiscreteHarmonicWeights Discrete Harmonic Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = \frac{d_2^2 A_1 - d^2 B + d_1^2 A_2}{A_1 A_2}\f$ @@ -293,7 +311,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefCotangentWeights Cotangent Weight \ingroup PkgWeightsRefAnalytic -`#include ` +\verbatim +#include +\endverbatim This weight is computed as \f$w = 2 (\cot\beta + \cot\gamma)\f$ @@ -328,7 +348,9 @@ to polygons. These weights are then normalized in order to obtain barycentric co \defgroup PkgWeightsRefBarycentricWachspressWeights Wachspress Weights \ingroup PkgWeightsRefBarycentric -`#include ` +\verbatim +#include +\endverbatim Wachspress weights which can be computed for a query point with respect to the vertices of a strictly convex polygon. @@ -339,7 +361,9 @@ vertices of a strictly convex polygon. \defgroup PkgWeightsRefBarycentricMeanValueWeights Mean Value Weights \ingroup PkgWeightsRefBarycentric -`#include ` +\verbatim +#include +\endverbatim Mean value weights which can be computed for a query point with respect to the vertices of a simple polygon. @@ -350,7 +374,9 @@ vertices of a simple polygon. \defgroup PkgWeightsRefBarycentricDiscreteHarmonicWeights Discrete Harmonic Weights \ingroup PkgWeightsRefBarycentric -`#include ` +\verbatim +#include +\endverbatim Discrete Harmonic weights which can be computed for a query point with respect to the vertices of a strictly convex polygon. @@ -368,7 +394,9 @@ used to balance other weights. \defgroup PkgWeightsRefUniformRegionWeights Uniform Region Weight \ingroup PkgWeightsRefRegions -`#include ` +\verbatim +#include +\endverbatim This weight is always equal to 1. @@ -382,7 +410,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefTriangularRegionWeights Triangular Region Weight \ingroup PkgWeightsRefRegions -`#include ` +\verbatim +#include +\endverbatim This weight is the area of the shaded region in the figure below. The region is the triangle `[p, q, r]`. @@ -401,7 +431,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefBarycentricRegionWeights Barycentric Region Weight \ingroup PkgWeightsRefRegions -`#include ` +\verbatim +#include +\endverbatim This weight is the area of the shaded region in the figure below. The region is formed by the two midpoints of the edges incident to `q` and the barycenter of @@ -421,7 +453,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefVoronoiRegionWeights Voronoi Region Weight \ingroup PkgWeightsRefRegions -`#include ` +\verbatim +#include +\endverbatim This weight is the area of the shaded region in the figure below. The region is formed by the two midpoints of the edges incident to `q` and the circumcenter of @@ -443,7 +477,9 @@ a model of `AnalyticWeightTraits_3` for 3D points \defgroup PkgWeightsRefMixedVoronoiRegionWeights Mixed Voronoi Region Weight \ingroup PkgWeightsRefRegions -`#include ` +\verbatim +#include +\endverbatim This weight is the area of the shaded region in the figure below. The region is formed by the two midpoints of the edges incident to `q` and the circumcenter of