#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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "benchmark.h" int main(int argc, char* argv[]) { typedef std::list Dxffilenames; Dxffilenames dxffilenames; char* Dxffilename[]={"myFirst.dxf","minimask0.dxf","minimask1.dxf","mask0.dxf","mask1.dxf","smallpainttrack.dxf","mask0_25.dxf","mask0_5.dxf","cad_l2.dxf","cad_l1.dxf","CIOnZDraw.dxf","che_mod1.dxf","elekonta.dxf","painttrack.dxf","netlist_signal_1.dxf","51.dxf"}; char* Htmlfilename; char* Texfilename; int i; i=0; Htmlfilename="benchmarks.html"; Texfilename="benchmarks.tex"; for(int n = 0; n < 3; n++){ dxffilenames.push_back(Dxffilename[n]); }; Bench bench(dxffilenames,Htmlfilename,Texfilename); for(i=1;i<6;i++){ /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!Circular_Kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef CIRCULAR_KERNEL_2 typedef CGAL::Quotient NT1; typedef CGAL::Cartesian Linear_k1; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; typedef CGAL::Circular_kernel_2 CircularKernel; typedef CircularKernel::Circular_arc_2 Circular_arc_2; typedef CircularKernel::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; bench.kernel("CK VarTraits"); bench.ComputeArrayDxf(dxffilenames); //bench.Compute_dxf(Dxffilename[i]); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef LAZY_CURVED_KERNEL_2 // typedef CGAL::Quotient NT2; typedef CGAL::Gmpq NT2; typedef CGAL::Cartesian Linear_k2; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k2; typedef CGAL::Circular_kernel_2 CK2_; typedef CGAL::Interval_nt_advanced NT3; typedef CGAL::Cartesian Linear_k3; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k3; typedef CGAL::Circular_kernel_2 CK3_; typedef CGAL::Lazy_curved_kernel LazyCurvedK; typedef LazyCurvedK::Circular_arc_2 Circular_arc_3; typedef LazyCurvedK::Line_arc_2 Line_arc_3; typedef boost::variant LazyVarArc; typedef std::vector LazyVarContainer; typedef CGAL::Variant_traits LazyCurvedK_Variant_Traits; bench.kernel("LazyK. VarTraits"); bench.ComputeArrayDxf(dxffilenames); //bench.Compute_dxf(Dxffilename[i]); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON typedef CGAL::Filtered_hexagon_curved_kernel CircularKernelHexagon; typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4; typedef CircularKernelHexagon::Line_arc_2 Line_arc_4; typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc; typedef std::vector CircularKernHexVarArcContainer; typedef CGAL::Variant_traits CircularKernHex_Variant_Traits; bench.kernel("CK Hex VarTraits"); // bench.Compute(Dxffilename[i]); bench.Compute_no_dxf(); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON typedef CGAL::Filtered_hexagon_curved_kernel LazyKernelHexagon; typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5; typedef LazyKernelHexagon::Line_arc_2 Line_arc_5; typedef boost::variant HxLazyVarArc; typedef std::vector HxLazyVarContainer; typedef CGAL::Variant_traits HxLazyVariantTraits; bench.kernel("LazyK Hex VarTraits") ; //bench.Compute(Dxffilename[i]); bench.Compute_no_dxf(); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef CIRCULAR_KERNEL_2_FILTERED_BBOX typedef CGAL::Filtered_bbox_curved_kernel BBCircularKernel ; typedef BBCircularKernel::Circular_arc_2 Circular_arc_6; typedef BBCircularKernel::Line_arc_2 Line_arc_6; typedef boost::variant BBCircVarArc; typedef std::vector BBCircVarContainer; typedef CGAL::Variant_traits BBCircVariantTraits; bench.kernel("CK BBox VarTraits") ; bench.Compute(Dxffilename[i]); // bench.Compute_no_dxf(); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ #ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX typedef CGAL::Filtered_bbox_curved_kernel BBLazyCurvedK; typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7; typedef BBLazyCurvedK::Line_arc_2 Line_arc_7; typedef boost::variant BBLazyVarArc; typedef std::vector< BBLazyVarArc> BBLazyVarContainer; typedef CGAL::Variant_traits BBLazyVariantTraits; bench.kernel("LLazyK BBox VarTraits") ; bench.Compute(Dxffilename[i]); //bench.Compute_no_dxf(); #endif /*------------------------------------------------------------------------------------------------------------------------- !!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------------------------------------------------------------*/ /* typedef CGAL::Filtered_bbox_curved_kernel BBCircKHexagon ; #ifndef CGAL_CURVED_KERNEL_DEBUG typedef CGAL::Circular_arc_traits BBCircKHexagonCATraits; #else typedef CGAL::Circular_arc_traits Traits0_7; typedef CGAL::Circular_arc_traits_tracer BBCircKHexagonCATraits; #endif typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc; typedef std::vector BBCircKHexagonArcCont; bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits"); bench.Compute_no_dxf(); typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8; typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8; typedef boost::variant BBCircularKernelHexagonVarArc; typedef std::vector BBCircularKernelHexagonVarContainer; typedef CGAL::Variant_traits BBCircularKernelHexagonVariantTraits; bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ; //bench.Compute(Dxffilename[i]); bench.Compute_no_dxf();*/ /*-------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------*/ dxffilenames.erase(dxffilenames.begin(),dxffilenames.end()); if (i<5){ for(int n = 3*(i+1)-3; n < 3*(i+1); n++){ dxffilenames.push_back(Dxffilename[n]); }; bench.newDxfArray(dxffilenames); } } return 0; };