Merge remote-tracking branch 'origin/master' into Barycentric_coordinates_2-danston

This commit is contained in:
Dmitry Anisimov 2021-08-13 11:34:58 +02:00
commit 650fc04303
61 changed files with 589 additions and 1104 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -24,7 +24,8 @@ typedef std::vector<Point_2> Polyline_2;
// inserts a polyline into a graph
void insert(const std::vector<Point_2>& poly, Graph& graph, Point_vertex_map& pvmap)
{
vertex_descriptor u, v;
vertex_descriptor u = boost::graph_traits<Graph>::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()) {

View File

@ -606,6 +606,7 @@ namespace CartesianKernelFunctors {
template <typename K>
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 <typename K>

View File

@ -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 <CGAL/Cartesian.h>
@ -22,9 +18,7 @@
#include <CGAL/Circular_arc_traits.h>
#include <CGAL/Circular_arc_traits_tracer.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
@ -88,80 +82,7 @@ for(i=1;i<6;i++){
//bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2
// typedef CGAL::Quotient<CGAL::MP_Float> NT2;
typedef CGAL::Gmpq NT2;
typedef CGAL::Cartesian<NT2> Linear_k2;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
typedef CGAL::Circular_kernel_2 <Linear_k2, Algebraic_k2> CK2_;
typedef CGAL::Interval_nt_advanced NT3;
typedef CGAL::Cartesian<NT3> Linear_k3;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
typedef std::vector<LazyVarArc> LazyVarContainer;
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
bench.kernel("LazyK. VarTraits");
bench.ComputeArrayDxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(dxffilenames);
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
typedef CGAL::Filtered_hexagon_circular_kernel_2<CircularKernel> 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<CircularKernHexVarArc> CircularKernHexVarArcContainer;
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
bench.kernel("CK Hex VarTraits");
// bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
bench.kernel("LazyK Hex VarTraits") ;
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
@ -182,58 +103,7 @@ bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>()
// bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
bench.kernel("LLazyK BBox VarTraits") ;
bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
//bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
#else
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
#endif
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits");
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ;
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
/*--------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------*/
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;
};

View File

@ -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.

View File

@ -15,10 +15,6 @@
#include <CGAL/Circular_arc_traits.h>
#include <CGAL/Circular_arc_traits_tracer.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
#include <CGAL/Arrangement_2.h>
@ -141,75 +137,13 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]);
}
fin.close();
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Place for tests!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
// typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT4;
// typedef CGAL::Cartesian<NT4> Linear_k4;
// typedef CGAL::Algebraic_kernel_2_2<NT4> Algebraic_k4;
// typedef CGAL::Curved_kernel<Linear_k4,Algebraic_k4> CK4;
//
// #ifndef CGAL_CURVED_KERNEL_DEBUG
// typedef CGAL::Circular_arc_traits<CK4> CircularK_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<CK4> Traits0;
// typedef CGAL::Circular_arc_traits_tracer<Traits0> CircularK_CA_Traits;
// #endif
//
// typedef CK4::Circular_arc_2 CircularKArc;
// typedef std::vector<CircularKArc> CircularKArcContainer;
// bench.kernel("Circular kernel Circular arc traits");
//
// typedef CircularK_CA_Traits::Curve_2 Conic_arc_2;
// typedef CGAL::Arrangement_2<CircularK_CA_Traits> Pmwx;
// typedef CGAL::Arr_naive_point_location<Pmwx> 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<CGAL::MP_Float> NT1;
//typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT1;
typedef CGAL::Cartesian<NT1> Linear_k1;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT1> Algebraic_k1;
typedef CGAL::Circular_kernel_2<Linear_k1, Algebraic_k1> CircularKernel;
@ -240,208 +174,6 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]);
bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
// bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
// typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT2;
typedef CGAL::Cartesian<NT2> Linear_k2;
typedef CGAL::Algebraic_kernel_2_2<NT2> Algebraic_k2;
typedef CGAL::Curved_kernel<Linear_k2, Algebraic_k2> CK2_;
//typedef CGAL::Interval_nt<> NT2;
typedef CGAL::Interval_nt_advanced NT3;
typedef CGAL::Cartesian<NT3> Linear_k3;
typedef CGAL::Algebraic_kernel_2_2<NT3> Algebraic_k3;
typedef CGAL::Curved_kernel<Linear_k3,Algebraic_k3> CK3_;
typedef CGAL::Lazy_curved_kernel<CK2_,CK3_> LazyCurvedK;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<LazyCurvedK> LazyCurvedK_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
#endif
typedef LazyCurvedK::Circular_arc_2 LazyArc;
typedef std::vector<LazyArc> LazyArcContainer;
bench.kernel("Lazy curved kernel Circular arc traits") ;
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
typedef std::vector<LazyVarArc> LazyVarContainer;
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
bench.kernel("Lazy curved kernel Variant traits");
bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_hexagon_curved_kernel<CircularKernel> CircularKernelHexagon;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> CircularKernHex_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
#endif
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
bench.kernel("Circular kernel filtered hexagon Circular arc traits");
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
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<CircularKernHexVarArc> CircularKernHexVarArcContainer;
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
bench.kernel("Circular kernel filtered hexagon Variants traits");
//bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
#endif
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits");
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ;
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernel> BBCircularKernel ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircularKernel> BBCircularKernel_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<BBCircularKernel> Traits0_5;
typedef CGAL::Circular_arc_traits_tracer<Traits0_5> BBCircularKernel_CA_Traits;
#endif
typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc;
typedef std::vector<BBCircularKernelArc> BBCircularKernelArcContainer;
bench.kernel("Circular kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>();
typedef BBCircularKernel::Circular_arc_2 Circular_arc_6;
typedef BBCircularKernel::Line_arc_2 Line_arc_6;
typedef boost::variant<Circular_arc_6,Line_arc_6 > BBCircVarArc;
typedef std::vector<BBCircVarArc> BBCircVarContainer;
typedef CGAL::Variant_traits<BBCircularKernel,Line_arc_6,Circular_arc_6> BBCircVariantTraits;
bench.kernel("Circular kernel filtered bbox Variants traits") ;
// bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
#endif
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
bench.kernel("Lazy curved kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
bench.kernel("Lazy curved kernel filtered bbox Variants traits") ;
//bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
#else
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
#endif
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
bench.kernel("BBox Circular kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
bench.kernel("BBox Circular kernel filtered bbox Variants traits") ;
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
/*--------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------*/
if (i+1<15)
{
if (strcmp(Dxffilename[i+1],""))
@ -460,4 +192,3 @@ bench.infotable();
return 0;
}

View File

@ -11,7 +11,6 @@
#include <CGAL/intersections.h>
#include <CGAL/Circular_kernel_2.h>
#include <CGAL/Arr_circular_arc_traits_2.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Arr_naive_point_location.h>
@ -42,21 +41,6 @@ typedef CGAL::Arr_circular_line_arc_traits_2<CircularKernel> CircularK_Variant
typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc;
typedef std::vector<CircularKVarArc> CircularKVarArcContainer;
// LAZY KERNEL TYPEDEFS
typedef CGAL::Interval_nt_advanced NT3;
typedef CGAL::Cartesian<NT3> Linear_k3;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
typedef CGAL::Lazy_circular_kernel_2<CircularKernel,CK3_> LazyCurvedK;
typedef CGAL::Arr_circular_arc_traits_2<LazyCurvedK> LazyCurvedK_CA_Traits;
typedef LazyCurvedK::Circular_arc_2 LazyArc;
typedef std::vector<LazyArc> LazyArcContainer;
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
typedef std::vector<LazyVarArc> LazyVarContainer;
//~ typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK> LazyCurvedK_Variant_Traits;
// BBOX TYPEDEFS
typedef CGAL::Filtered_bbox_circular_kernel_2<CircularKernel>
@ -77,24 +61,6 @@ typedef std::vector<BBCircVarArc>
BBCircVarContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<BBCircularKernel> BBCircVariantTraits;
// BBOX(LAZY)
typedef CGAL::Filtered_bbox_circular_kernel_2<LazyCurvedK>
BBLazyKernel ;
typedef CGAL::Arr_circular_arc_traits_2<BBLazyKernel>
BBLazyKernel_CA_Traits;
typedef BBLazyKernel::Circular_arc_2
BBLazyKernelArc;
typedef std::vector<BBLazyKernelArc>
BBLazyKernelArcContainer;
typedef BBLazyKernel::Circular_arc_2
Circular_arc_lazybb;
typedef BBLazyKernel::Line_arc_2
Line_arc_lazybb;
typedef boost::variant<Circular_arc_lazybb,Line_arc_lazybb >
BBLazyVarArc;
typedef std::vector<BBLazyVarArc>
BBLazyVarContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<BBLazyKernel> BBLazyVariantTraits;
template <class CK,class Traits,class ArcContainer>
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<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(dxf_filename[j]);
if(i == 2) do_main<LazyCurvedK,LazyCurvedK_Variant_Traits, LazyVarContainer>(dxf_filename[j]);
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(dxf_filename[j]);
if(i == 4) do_main<BBLazyKernel,BBLazyVariantTraits, BBLazyVarContainer>(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<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(k);
if(i == 2) do_main<LazyCurvedK,LazyCurvedK_Variant_Traits, LazyVarContainer>(k);
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(k);
if(i == 4) do_main<BBLazyKernel,BBLazyVariantTraits, BBLazyVarContainer>(k);
if(i == 5) do_main<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>(k);
if(i == 6) do_main<LazyCurvedK,LazyCurvedK_CA_Traits, LazyArcContainer>(k);
if(i == 7) do_main<CircularKernel,CircularK_CA_Traits, CircularKArcContainer>(k);
if(i == 8) do_main<BBLazyKernel,BBLazyKernel_CA_Traits, BBLazyKernelArcContainer>(k);
}
} else std::cout << "INVALID PARAMETERS" << std::endl;

View File

@ -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 <CGAL/Cartesian.h>
#include <CGAL/Handle_for.h>
#include <CGAL/point_generators_2.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/intersections.h>
@ -21,11 +16,6 @@
#include <CGAL/Arr_circular_arc_traits_2.h>
//#include <CGAL/Circular_arc_traits_tracer.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
#endif
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
@ -184,123 +174,7 @@ Bench bench; //If you want create table with all datasets
bench.Compute_no_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
typedef CGAL::Cartesian<NT2> Linear_k2;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
typedef CGAL::Circular_kernel_2 <Linear_k2, Algebraic_k2> CK2_;
typedef CGAL::Interval_nt_advanced NT3;
typedef CGAL::Cartesian<NT3> Linear_k3;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
// #ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Arr_circular_arc_traits_2<LazyCurvedK> LazyCurvedK_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
// typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
// #endif
typedef LazyCurvedK::Circular_arc_2 LazyArc;
typedef std::vector<LazyArc> LazyArcContainer;
bench.kernel("LazyCircArc") ;
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
typedef std::vector<LazyVarArc> LazyVarContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK> LazyCurvedK_Variant_Traits;
bench.kernel("LazyKVar");
//bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
typedef CGAL::Filtered_hexagon_circular_kernel_2<CircularKernel> CircularKernelHexagon;
// #ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Arr_circular_arc_traits_2<CircularKernelHexagon> CircularKernHex_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
// typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
// #endif
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
bench.kernel("CK Hex CircArcTraits");
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
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<CircularKernHexVarArc> CircularKernHexVarArcContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<CircularKernelHexagon> CircularKernHex_Variant_Traits;
bench.kernel("CK Hex VarTraits");
// bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
typedef CGAL::Filtered_hexagon_circular_kernel_2<LazyCurvedK> LazyKernelHexagon;
// #ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Arr_circular_arc_traits_2<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
// typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
// #endif
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
bench.kernel("LazyK Hex CircArcTraits");
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<LazyKernelHexagon> HxLazyVariantTraits;
bench.kernel("LazyK Hex VarTraits") ;
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
@ -333,105 +207,6 @@ bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>()
bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX
typedef CGAL::Filtered_bbox_circular_kernel_2<LazyCurvedK> BBLazyCurvedK;
// #ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Arr_circular_arc_traits_2<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
// typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
// #endif
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
bench.kernel("LLazyK BBox CircArcTraits");
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
typedef CGAL::Arr_circular_line_arc_traits_2<BBLazyCurvedK> BBLazyVariantTraits;
bench.kernel("LLazyK BBox VarTraits") ;
//bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
#endif
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
#else
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
#endif
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits");
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ;
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
/*--------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------*/
// if (i+1<2)
// {
// try{
// if (strcmp(Dxffilename[i+1],""))
// {
// try{
// fin.open (Dxffilename[i]);
// }
// catch(...){
// std::cout<<"error"<<std::endl;
// }
// if (!fin.is_open())
// {
// std::cout<<"file "<< Dxffilename[i] << " is not found"<<std::endl;
// std::cout << "that's all" << std::endl;
// fin.close();
// break;
// }
// else
// {
// bench.newDxfFilename(Dxffilename[i+1]);
// }
// fin.close();
// }
// else
// {
// std::cout << "that's all" << std::endl;
// break;
// }
// }
// catch(...){std::cout << "error" << std::endl;}
// }
// }
return 0;
}

View File

@ -14,10 +14,6 @@
#include <CGAL/Circular_arc_traits.h>
#include <CGAL/Circular_arc_traits_tracer.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
#include <CGAL/Arrangement_2.h>
@ -225,4 +221,3 @@ int exit_status = 0;
return exit_status;
}

View File

@ -13,10 +13,6 @@
#include <CGAL/Circular_arc_traits.h>
#include <CGAL/Circular_arc_traits_tracer.h>
#include <CGAL/Lazy_circular_kernel_2.h>
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
#include <CGAL/Arrangement_2.h>
@ -169,207 +165,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true);
// bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
typedef CGAL::Cartesian<NT2> Linear_k2;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
typedef CGAL::Circular_kernel_2<Linear_k2, Algebraic_k2> CK2_;
//typedef CGAL::Interval_nt<> NT2;
typedef CGAL::Interval_nt_advanced NT3;
typedef CGAL::Cartesian<NT3> Linear_k3;
typedef CGAL::Algebraic_kernel_2_2<NT3> Algebraic_k3;
typedef CGAL::Curved_kernel<Linear_k3,Algebraic_k3> CK3_;
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
// #ifndef CGAL_CURVED_KERNEL_DEBUG
// typedef CGAL::Circular_arc_traits<LazyCurvedK> LazyCurvedK_CA_Traits;
// #else
// typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
// typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
// #endif
//
// typedef LazyCurvedK::Circular_arc_2 LazyArc;
// typedef std::vector<LazyArc> LazyArcContainer;
//
// bench.kernel("Lazy curved kernel Circular arc traits") ;
//
// bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
typedef std::vector<LazyVarArc> LazyVarContainer;
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
bench.kernel("Lazy curved kernel Variant traits");
// bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
// bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
asdashhhhhhhhhhhhfhjhdghdf
typedef CGAL::Filtered_hexagon_curved_kernel<CircularKernel> CircularKernelHexagon;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> CircularKernHex_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
#endif
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
bench.kernel("Circular kernel filtered hexagon Circular arc traits");
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
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<CircularKernHexVarArc> CircularKernHexVarArcContainer;
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
bench.kernel("Circular kernel filtered hexagon Variants traits");
bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
// bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
*/
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
#endif
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits");
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ;
bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
//bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
*/
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernel> BBCircularKernel ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircularKernel> BBCircularKernel_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<BBCircularKernel> Traits0_5;
typedef CGAL::Circular_arc_traits_tracer<Traits0_5> BBCircularKernel_CA_Traits;
#endif
typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc;
typedef std::vector<BBCircularKernelArc> BBCircularKernelArcContainer;
bench.kernel("Circular kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>();
typedef BBCircularKernel::Circular_arc_2 Circular_arc_6;
typedef BBCircularKernel::Line_arc_2 Line_arc_6;
typedef boost::variant<Circular_arc_6,Line_arc_6 > BBCircVarArc;
typedef std::vector<BBCircVarArc> BBCircVarContainer;
typedef CGAL::Variant_traits<BBCircularKernel,Line_arc_6,Circular_arc_6> BBCircVariantTraits;
bench.kernel("Circular kernel filtered bbox Variants traits") ;
bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
// bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
*/
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
#else
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
#endif
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
bench.kernel("Lazy curved kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
bench.kernel("Lazy curved kernel filtered bbox Variants traits") ;
bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
//bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
*/
/*-------------------------------------------------------------------------------------------------------------------------
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------------------------------------------------------------*/
/*
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
#ifndef CGAL_CURVED_KERNEL_DEBUG
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
#else
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
#endif
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
bench.kernel("BBox Circular kernel filtered bbox Circular arc traits");
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
bench.kernel("BBox Circular kernel filtered bbox Variants traits") ;
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
/*--------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------*/
if (i+1<15)
{
if (strcmp(Dxffilename[i+1],""))
@ -388,4 +184,3 @@ bench.infotable();
return 0;
}

View File

@ -44,28 +44,20 @@ namespace CGAL {
namespace internal {
#ifdef CGAL_USE_GMP
typedef CGAL::Gmpq NT1;
typedef CGAL::Gmpq NT;
#else
typedef Quotient<MP_Float> NT1;
typedef Quotient<MP_Float> NT;
#endif
typedef Cartesian<NT1> Linear_k1;
typedef Algebraic_kernel_for_circles_2_2<NT1> Algebraic_k1;
typedef Circular_kernel_2<Linear_k1, Algebraic_k1> CK1;
// typedef CGAL::Interval_nt_advanced NT2;
// typedef CGAL::Cartesian<NT2> Linear_k2;
// typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
// typedef CGAL::Circular_kernel_2<Linear_k2,Algebraic_k2> CK2;
// typedef CGAL::Lazy_circular_kernel_2<CK1,CK2>
// Exact_circular_kernel_2;
typedef Cartesian<NT> Linear_k;
typedef Algebraic_kernel_for_circles_2_2<NT> Algebraic_k;
typedef Circular_kernel_2<Linear_k, Algebraic_k> CK;
} // namespace internal
typedef Filtered_bbox_circular_kernel_2<internal::CK1> Exact_circular_kernel_2;
typedef Filtered_bbox_circular_kernel_2<internal::CK> Exact_circular_kernel_2;
} //namespace CGAL

View File

@ -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")

View File

@ -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 <CGAL/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/Circular_kernel_intersections.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
#include <CGAL/Circular_kernel_2.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel Linear_k1;
typedef CGAL::Algebraic_kernel_for_circles_2_2<Linear_k1::FT> Algebraic_k1;
typedef CGAL::Circular_kernel_2<Linear_k1, Algebraic_k1> CK;
CK ck;
#include <CGAL/_test_circles_predicates.h>
#include <CGAL/_test_circles_constructions.h>
#include <CGAL/_test_circles_extention.h>
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;
}

View File

@ -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}

View File

@ -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

View File

@ -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 <type, name>
dict_map = defaultdict(dict)#map <name, map<member type, member name>>
#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<member type, member name>
#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]

View File

@ -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

View File

@ -810,6 +810,7 @@ namespace HomogeneousKernelFunctors {
template <typename K>
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);

View File

@ -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)
-----------

View File

@ -852,7 +852,7 @@ const CGAL::Point_3<Kernel>& 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 <typename Kernel>
Comparison_result compare_slope(const CGAL::Segment_2<Kernel> &s1,
const CGAL::Segment_2<Kernel> &s2);
const CGAL::Segment_2<Kernel> &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 <typename Kernel>
Comparison_result compare_slope(const CGAL::Point_2<Kernel> &s1s,
const CGAL::Point_2<Kernel> &s1t,
const CGAL::Point_2<Kernel> &s2s,
const CGAL::Point_2<Kernel> &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.

View File

@ -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 */

View File

@ -347,6 +347,15 @@ compare_slope(const Segment_2<K> &s1, const Segment_2<K> &s2)
return internal::compare_slope(s1, s2, K());
}
template < class K >
inline
typename K::Comparison_result
compare_slope(const Point_2<K> &s1s, const Point_2<K> &s1t,
const Point_2<K> &s2s, const Point_2<K> &s2t)
{
return internal::compare_slope(s1s, s1t, s2s, s2t, K());
}
#ifndef CGAL_NO_DEPRECATED_CODE
// kept for backward compatibility

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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());
}

View File

@ -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<Tr>& 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());
}
};

View File

@ -15,7 +15,7 @@
#include <CGAL/license/Mesh_2.h>
#include <CGAL/Meshes/Triangulation_mesher_level_traits_2.h>
#include <CGAL/Mesh_2/Face_badness.h>
#include <CGAL/Double_map.h>
#include <CGAL/boost/iterator/transform_iterator.hpp>
@ -81,7 +81,7 @@ protected: // --- PROTECTED TYPES ---
typedef CGAL::Double_map<Face_handle, Quality, Face_compare> Bad_faces;
protected:
// --- PROTECTED MEMBER DATAS ---
// --- PROTECTED MEMBER DATA ---
Criteria& criteria; /**<The meshing criteria */
Previous& previous;
@ -178,6 +178,15 @@ public:
/** Returns the circumcenter of the face. */
Point refinement_point_impl(const Face_handle& f) const
{
#ifdef CGAL_MESH_2_DEBUG_REFINEMENT_POINTS
std::cerr << "refinement_point_impl("
<< "#" << f->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);
}

View File

@ -0,0 +1 @@
Max-Planck-Institute Saarbruecken (Germany)

View File

@ -21,6 +21,17 @@ typedef std::pair<Point_3, Vector_3> Pwn;
typedef CGAL::First_of_pair_property_map<Pwn> Point_map;
typedef CGAL::Second_of_pair_property_map<Pwn> 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)
@ -67,11 +78,13 @@ int main(int argc, const char** argv)
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<ICP_config> 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<ICP_config> 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<K::Aff_transformation_3, bool> 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.

View File

@ -21,6 +21,7 @@
#include <CGAL/boost/graph/Named_function_parameters.h>
#include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/aff_transformation_tags.h>
#include <CGAL/property_map.h>
#include <boost/type_traits/is_same.hpp>
@ -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<ICP_config> 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<typename Scalar,
typename PointRange,
typename PointMap,
typename VectorMap,
typename ScalarMap,
typename PM_matrix>
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 Kernel,
class PointMap1,
class PointMap2,
class VectorMap1,
class VectorMap2>
class VectorMap2,
class ScalarMap1,
class ScalarMap2>
std::pair<typename Kernel::Aff_transformation_3, bool>
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<typename Kernel::FT> 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<Scalar>(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<Scalar>(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<PointRange1, NamedParameters1>::Kernel Kernel;
typedef typename Kernel::FT Scalar;
typedef typename Kernel::Aff_transformation_3 Transformation;
// property map types
typedef typename CGAL::GetPointMap<PointRange1, NamedParameters1>::type PointMap1;
typedef typename CGAL::GetPointMap<PointRange2, NamedParameters2>::type PointMap2;
@ -576,14 +616,22 @@ compute_registration_transformation (const PointRange1& point_set_1, const Point
typename boost::property_traits<NormalMap2>::value_type> ::value),
"The vector type of input ranges must be the same");
typedef typename PSP::GetK<PointRange1, NamedParameters1>::Kernel Kernel;
typedef typename Kernel::FT Scalar;
typedef typename Kernel::Aff_transformation_3 Transformation;
typedef typename std::iterator_traits<typename PointRange1::iterator>::value_type key_type1;
typedef typename std::iterator_traits<typename PointRange2::iterator>::value_type key_type2;
typedef typename CGAL::Constant_property_map<key_type1, Scalar> DefaultWeightMap1;
typedef typename CGAL::Constant_property_map<key_type2, Scalar> 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<decltype(weight_map1)>::value_type,
typename boost::property_traits<decltype(weight_map2)>::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<Kernel>(point_set_1, point_set_2,
point_map1, point_map2,
normal_map1, normal_map2,
weight_map1, weight_map2,
initial_transformation,
internal::construct_icp<Scalar>(np1, np2));
}

View File

@ -316,6 +316,7 @@ void split_along_edges(TriangleMesh& tm,
std::set<halfedge_descriptor> extra_border_hedges;
for(std::size_t k=0; k<nb_shared_edges; ++k)
{
if (is_border(shared_edges[k], tm)) continue;
for(halfedge_descriptor h : halfedges_around_target(target(shared_edges[k], tm), tm))
if(is_border(h, tm))
extra_border_hedges.insert(h);
@ -334,6 +335,7 @@ void split_along_edges(TriangleMesh& tm,
// now duplicate the edge and set its pointers
for(std::size_t k=0; k<nb_shared_edges; ++k)
{
if (is_border(shared_edges[k], tm)) continue;
halfedge_descriptor h = halfedge(shared_edges[k], tm);
face_descriptor fh = face(h, tm);
//add edge

View File

@ -132,6 +132,24 @@ namespace Polygon_mesh_processing {
* \cgalParamExtra{The map is updated during the remeshing process while new faces are created.}
* \cgalParamNEnd
*
* \cgalParamNBegin{do_split}
* \cgalParamDescription{whether edges that are too long with respect to the given sizing are split}
* \cgalParamType{Boolean}
* \cgalParamDefault{`true`}
* \cgalParamNEnd
*
* \cgalParamNBegin{do_collapse}
* \cgalParamDescription{whether edges that are too short with respect to the given sizing are collapsed}
* \cgalParamType{Boolean}
* \cgalParamDefault{`true`}
* \cgalParamNEnd
*
* \cgalParamNBegin{do_flip}
* \cgalParamDescription{whether edge flips are performed to improve shape and valence}
* \cgalParamType{Boolean}
* \cgalParamDefault{`true`}
* \cgalParamNEnd
*
* \cgalParamNBegin{number_of_relaxation_steps}
* \cgalParamDescription{the number of iterations of tangential relaxation that are performed
* at each iteration of the remeshing process}

View File

@ -497,12 +497,70 @@ void test()
PMP::clip(tm1, K::Plane_3(0,-1,0,0));
assert(vertices(tm1).size() == 7);
}
{
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()==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 <class Mesh>
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."<<std::endl;
assert(false);
return ;
}
input.close();
PMP::split(tm1,K::Plane_3(0,0,1,-1));
PMP::split_connected_components(tm1, meshes, params::all_default());
assert(meshes.size() == 281);
CGAL::clear(tm1);
meshes.clear();
//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."<<std::endl;
assert(false);
return ;
}
input.close();
PMP::split(tm1,K::Plane_3(0,-1,0,0.3));
PMP::split_connected_components(tm1, meshes, params::all_default());
assert(meshes.size() == 2);
CGAL::clear(tm1);
meshes.clear();
//test with SI
std::ifstream("data-clip/tet_si_to_split.off") >> 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<std::size_t> 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();

View File

@ -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

View File

@ -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

View File

@ -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<Shape *(*)()>::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<Shape>(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<std::size_t> &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<std::size_t> 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<Shape *>& candidates) {
clear_octrees();
clear_shape_factories();
clear_candidates(num_invalid, candidates);
}
void clear_candidates(
const std::size_t num_invalid, std::vector<Shape *>& 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<unsigned int>(m_global_octree->maxLevel() + 1);
return (int) get_default_random()(upper_bound);

View File

@ -0,0 +1 @@
Rijksuniversiteit Groningen (Netherlands)

View File

@ -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 <I>rgb-value</I> 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

View File

@ -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

View File

@ -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();
}
}

View File

@ -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

View File

@ -0,0 +1 @@
CNRS and LIRIS' Establishments (France)

View File

@ -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<typename TDS_src::Vertex_handle,Vertex_handle> 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,11 +2037,11 @@ 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
// TDS of a regular triangulation because of hidden vertices

View File

@ -240,7 +240,7 @@ Triangulation_ds_face_base_2<TDS> ::
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;
}

View File

@ -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<typename TDS_src::Vertex_handle> 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)] );
}

View File

@ -0,0 +1 @@
INRIA Sophia-Antipolis (France)

View File

@ -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 );

View File

@ -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
{

View File

@ -0,0 +1 @@
Foundation for Research and Technology-Hellas (Greece)

View File

@ -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 <CGAL/Weights/uniform_weights.h>`
\verbatim
#include <CGAL/Weights/uniform_weights.h>
\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 <CGAL/Weights/shepard_weights.h>`
\verbatim
#include <CGAL/Weights/shepard_weights.h>
\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 <CGAL/Weights/inverse_distance_weights.h>`
\verbatim
#include <CGAL/Weights/inverse_distance_weights.h>
\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 <CGAL/Weights/three_point_family_weights.h>`
\verbatim
#include <CGAL/Weights/three_point_family_weights.h>
\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 <CGAL/Weights/wachspress_weights.h>`
\verbatim
#include <CGAL/Weights/wachspress_weights.h>
\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 <CGAL/Weights/authalic_weights.h>`
\verbatim
#include <CGAL/Weights/authalic_weights.h>
\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 <CGAL/Weights/mean_value_weights.h>`
\verbatim
#include <CGAL/Weights/mean_value_weights.h>
\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 <CGAL/Weights/tangent_weights.h>`
\verbatim
#include <CGAL/Weights/tangent_weights.h>
\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 <CGAL/Weights/discrete_harmonic_weights.h>`
\verbatim
#include <CGAL/Weights/discrete_harmonic_weights.h>
\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 <CGAL/Weights/cotangent_weights.h>`
\verbatim
#include <CGAL/Weights/cotangent_weights.h>
\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 <CGAL/Weights/wachspress_weights.h>`
\verbatim
#include <CGAL/Weights/wachspress_weights.h>
\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 <CGAL/Weights/mean_value_weights.h>`
\verbatim
#include <CGAL/Weights/mean_value_weights.h>
\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 <CGAL/Weights/discrete_harmonic_weights.h>`
\verbatim
#include <CGAL/Weights/discrete_harmonic_weights.h>
\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 <CGAL/Weights/uniform_region_weights.h>`
\verbatim
#include <CGAL/Weights/uniform_region_weights.h>
\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 <CGAL/Weights/triangular_region_weights.h>`
\verbatim
#include <CGAL/Weights/triangular_region_weights.h>
\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 <CGAL/Weights/barycentric_region_weights.h>`
\verbatim
#include <CGAL/Weights/barycentric_region_weights.h>
\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 <CGAL/Weights/voronoi_region_weights.h>`
\verbatim
#include <CGAL/Weights/voronoi_region_weights.h>
\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 <CGAL/Weights/mixed_voronoi_region_weights.h>`
\verbatim
#include <CGAL/Weights/mixed_voronoi_region_weights.h>
\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