diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h index 0fb312b3101..7c9a7471390 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h @@ -49,6 +49,14 @@ public: Iso_cuboidC3() {} + Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int) + : base(p, q) + { + CGAL_kernel_assertion(p.x()<=q.x()); + CGAL_kernel_assertion(p.y()<=q.y()); + CGAL_kernel_assertion(p.z()<=q.z()); + } + Iso_cuboidC3(const Point_3 &p, const Point_3 &q) { Construct_point_3 construct_point_3; diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h index f04a4b98930..644fd696435 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h @@ -46,10 +46,14 @@ public: Iso_rectangleC2() {} - Iso_rectangleC2(const Point_2 &p, const Point_2 &q) - : base(p,q) - {} + // Iso_rectangleC2(const Point_2 &p, const Point_2 &q) + // : base(p, q) {} + Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int) + : base(p, q) + { + CGAL_kernel_assertion(p<=q); + } const Point_2 & min() const { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 38db483ee93..c0add72f6c1 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -1952,6 +1952,14 @@ namespace CartesianKernelFunctors { typedef Iso_rectangle_2 result_type; typedef Arity_tag< 2 > Arity; + Iso_rectangle_2 + operator()(const Point_2& p, const Point_2& q, int) const + { + CGAL_kernel_assertion(p.x()<=q.x()); + CGAL_kernel_assertion(p.y()<=q.y()); + return Rep(p, q, 0); + } + Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q) const { @@ -1962,7 +1970,7 @@ namespace CartesianKernelFunctors { else { miny = q.y(); maxy = p.y(); } return Rep(Point_2(minx, miny), - Point_2(maxx, maxy)); + Point_2(maxx, maxy), 0); } Iso_rectangle_2 @@ -1974,7 +1982,7 @@ namespace CartesianKernelFunctors { CGAL_kernel_assertion(!less_x(right, left)); CGAL_kernel_assertion(!less_y(top, bottom)); return Rep(Point_2(left.x(), bottom.y()), - Point_2(right.x(), top.y())); + Point_2(right.x(), top.y()), 0); } Iso_rectangle_2 @@ -1984,7 +1992,7 @@ namespace CartesianKernelFunctors { CGAL_kernel_precondition(min_hx <= max_hx); CGAL_kernel_precondition(min_hy <= max_hy); return Rep(Point_2(min_hx, min_hy), - Point_2(max_hx, max_hy)); + Point_2(max_hx, max_hy), 0); } Iso_rectangle_2 @@ -1993,9 +2001,9 @@ namespace CartesianKernelFunctors { { if (hw == 1) return Rep(Point_2(min_hx, min_hy), - Point_2(max_hx, max_hy)); + Point_2(max_hx, max_hy), 0); return Rep(Point_2(min_hx/hw, min_hy/hw), - Point_2(max_hx/hw, max_hy/hw)); + Point_2(max_hx/hw, max_hy/hw), 0); } }; diff --git a/Cartesian_kernel/include/CGAL/Cartesian_converter.h b/Cartesian_kernel/include/CGAL/Cartesian_converter.h index 11778200dae..17f4932ad07 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian_converter.h +++ b/Cartesian_kernel/include/CGAL/Cartesian_converter.h @@ -247,7 +247,7 @@ public: operator()(const typename K1::Iso_rectangle_2 &a) const { typedef typename K2::Iso_rectangle_2 Iso_rectangle_2; - return Iso_rectangle_2(operator()(a.min()), operator()(a.max())); + return Iso_rectangle_2(operator()(a.min()), operator()(a.max()), 0); } @@ -332,7 +332,7 @@ public: operator()(const typename K1::Iso_cuboid_3 &a) const { typedef typename K2::Iso_cuboid_3 Iso_cuboid_3; - return Iso_cuboid_3(operator()(a.min()), operator()(a.max())); + return Iso_cuboid_3(operator()(a.min()), operator()(a.max()), 0); } std::pair diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h index 76b7d14d6cc..23d2528f3f7 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h @@ -46,6 +46,14 @@ public: Iso_cuboidH3() {} + Iso_cuboidH3(const Point_3& p, const Point_3& q, int) + : base(p, q) + { + CGAL_kernel_assertion(p.x()<=q.x()); + CGAL_kernel_assertion(p.y()<=q.y()); + CGAL_kernel_assertion(p.z()<=q.z()); + } + Iso_cuboidH3(const Point_3& p, const Point_3& q); Iso_cuboidH3(const Point_3& left, const Point_3& right, diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h index 5d7fd7623b2..ddd6251ec78 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h @@ -17,10 +17,10 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Stefan Schirra - + #ifndef CGAL_ISO_RECTANGLEH2_H #define CGAL_ISO_RECTANGLEH2_H @@ -48,13 +48,16 @@ public: Iso_rectangleH2() {} - Iso_rectangleH2(const Point_2& p, const Point_2& q) - : base(p,q) - {} + Iso_rectangleH2(const Point_2& p, const Point_2& q, int) + : base(p, q) + { + CGAL_kernel_assertion(p.x()<=q.x()); + CGAL_kernel_assertion(p.y()<=q.y()); + } const Point_2 & min() const; const Point_2 & max() const; - + Bounded_side bounded_side(const Point_2& p) const; }; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 7c8cd87c07a..7520be0694f 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -2520,6 +2520,14 @@ namespace HomogeneousKernelFunctors { typedef Iso_rectangle_2 result_type; typedef Arity_tag< 2 > Arity; + Iso_rectangle_2 + operator()(const Point_2& p, const Point_2& q, int) const + { + CGAL_kernel_assertion(p.x()<=q.x()); + CGAL_kernel_assertion(p.y()<=q.y()); + return Rep(p, q, 0); + } + Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q) const { @@ -2530,7 +2538,7 @@ namespace HomogeneousKernelFunctors { { if ( px_g_qx && py_g_qy ) { - return Rep(q, p); + return Rep(q, p, 0); } else { @@ -2538,17 +2546,17 @@ namespace HomogeneousKernelFunctors { { return Rep( Point_2(q.hx()*p.hw(), p.hy()*q.hw(), q.hw()*p.hw() ), - Point_2(p.hx()*q.hw(), q.hy()*p.hw(), q.hw()*p.hw() )); + Point_2(p.hx()*q.hw(), q.hy()*p.hw(), q.hw()*p.hw() ), 0); } if ( py_g_qy ) { return Rep( Point_2(p.hx()*q.hw(), q.hy()*p.hw(), q.hw()*p.hw() ), - Point_2(q.hx()*p.hw(), p.hy()*q.hw(), q.hw()*p.hw() )); + Point_2(q.hx()*p.hw(), p.hy()*q.hw(), q.hw()*p.hw() ), 0); } } } - return Rep(p, q); + return Rep(p, q, 0); } Iso_rectangle_2 @@ -2564,7 +2572,7 @@ namespace HomogeneousKernelFunctors { left.hw() * bottom.hw()), Point_2(right.hx() * top.hw(), top.hy() * right.hw(), - right.hw() * top.hw())); + right.hw() * top.hw()), 0); } Iso_rectangle_2 @@ -2574,7 +2582,7 @@ namespace HomogeneousKernelFunctors { CGAL_kernel_precondition(min_hx <= max_hx); CGAL_kernel_precondition(min_hy <= max_hy); return Rep(Point_2(min_hx, min_hy), - Point_2(max_hx, max_hy)); + Point_2(max_hx, max_hy), 0); } Iso_rectangle_2 @@ -2582,7 +2590,7 @@ namespace HomogeneousKernelFunctors { const RT& max_hx, const RT& max_hy, const RT& hw) const { return Rep(Point_2(min_hx, min_hy, hw), - Point_2(max_hx, max_hy, hw)); + Point_2(max_hx, max_hy, hw), 0); } }; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h b/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h index b27325b9caf..876354234b6 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous_converter.h @@ -157,7 +157,7 @@ public: operator()(const typename K1::Iso_rectangle_2 &a) const { return k.construct_iso_rectangle_2_object()(operator()(a.min()), - operator()(a.max())); + operator()(a.max()), 0); } @@ -239,7 +239,7 @@ public: operator()(const typename K1::Iso_cuboid_3 &a) const { return k.construct_iso_cuboid_3_object()(operator()(a.min()), - operator()(a.max())); + operator()(a.max()), 0); } private: diff --git a/Kernel_23/include/CGAL/Iso_cuboid_3.h b/Kernel_23/include/CGAL/Iso_cuboid_3.h index c47f372b6b9..4506bfb3dab 100644 --- a/Kernel_23/include/CGAL/Iso_cuboid_3.h +++ b/Kernel_23/include/CGAL/Iso_cuboid_3.h @@ -55,6 +55,9 @@ public: Iso_cuboid_3(const Point_3& p, const Point_3& q) : Rep(typename R::Construct_iso_cuboid_3()(p,q).rep()) {} + Iso_cuboid_3(const Point_3& p, const Point_3& q, int) + : Rep(typename R::Construct_iso_cuboid_3()(p, q, 0).rep()) {} + Iso_cuboid_3(const Point_3 &left, const Point_3 &right, const Point_3 &bottom, const Point_3 &top, const Point_3 &far_, const Point_3 &close) diff --git a/Kernel_23/include/CGAL/Iso_rectangle_2.h b/Kernel_23/include/CGAL/Iso_rectangle_2.h index e96306a9dd8..bb9cedbd726 100644 --- a/Kernel_23/include/CGAL/Iso_rectangle_2.h +++ b/Kernel_23/include/CGAL/Iso_rectangle_2.h @@ -54,8 +54,11 @@ public: Iso_rectangle_2(const Rep& r) : Rep(r) {} + Iso_rectangle_2(const Point_2 &p, const Point_2 &q, int) + : Rep(typename R::Construct_iso_rectangle_2()(p, q, 0).rep()) {} + Iso_rectangle_2(const Point_2 &p, const Point_2 &q) - : Rep(typename R::Construct_iso_rectangle_2()(p,q).rep()) {} + : Rep(typename R::Construct_iso_rectangle_2()(p, q).rep()) {} Iso_rectangle_2(const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) diff --git a/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h b/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h index 54a2f1bfdac..c109a515a57 100644 --- a/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h +++ b/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h @@ -1150,6 +1150,10 @@ public: typedef Iso_cuboid_3 result_type; typedef Arity_tag< 2 > Arity; + Iso_cuboid_3 + operator()(const Point_3&, const Point_3&, int) const + { return Iso_cuboid_3(); } + Iso_cuboid_3 operator()(const Point_3&, const Point_3&) const { return Iso_cuboid_3(); } @@ -1170,6 +1174,10 @@ public: typedef Iso_rectangle_2 result_type; typedef Arity_tag< 2 > Arity; + Iso_rectangle_2 + operator()(const Point_2&, const Point_2&, int) const + { return Iso_rectangle_2(); } + Iso_rectangle_2 operator()(const Point_2&, const Point_2&) const { return Iso_rectangle_2(); } diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 8dea12f371d..d0571472cd5 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -708,6 +708,10 @@ namespace CommonKernelFunctors { typedef Iso_cuboid_3 result_type; typedef Arity_tag< 2 > Arity; + Iso_cuboid_3 + operator()(const Point_3& p, const Point_3& q, int) const + { return Rep(p, q, 0); } + Iso_cuboid_3 operator()(const Point_3& p, const Point_3& q) const { return Rep(p, q); } diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_cuboid_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_cuboid_3.h index e6b985f5dc9..966b968b1c3 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_cuboid_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_cuboid_3.h @@ -61,6 +61,7 @@ _test_cls_iso_cuboid_3(const R& ) CGAL::Point_3 p13(n4, n1, n3 ); // ( 4, 1, 3) CGAL::Iso_cuboid_3 r1( p1, p3); + CGAL::Iso_cuboid_3 r1_( p1, p3, 0); CGAL::Iso_cuboid_3 r2( p3, p1); CGAL::Iso_cuboid_3 r3( p2, p5); CGAL::Iso_cuboid_3 r4( p5, p2); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_rectangle_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_rectangle_2.h index a67da7ffb6b..1e0686f5491 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_rectangle_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_iso_rectangle_2.h @@ -55,6 +55,7 @@ _test_cls_iso_rectangle_2(const R& ) CGAL::Point_2 p9(-n3, n7); // (-3, 7) CGAL::Iso_rectangle_2 r1( p1, p3); + CGAL::Iso_rectangle_2 r1_( p1, p3, 0); CGAL::Iso_rectangle_2 r2( p3, p1); CGAL::Iso_rectangle_2 r3( p2, p5); CGAL::Iso_rectangle_2 r4( p5, p2); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h index ad6cb0a806c..1f0cd11ea2e 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_2.h @@ -174,7 +174,8 @@ test_new_2(const R& rep) typename R::Construct_iso_rectangle_2 construct_iso_rectangle = rep.construct_iso_rectangle_2_object(); Iso_rectangle_2 rec2 = construct_iso_rectangle(p4,p5); - Iso_rectangle_2 rec3 = construct_iso_rectangle(p4,p4,p5,p5); + rec2 = construct_iso_rectangle(p2,p3,0); + rec2 = construct_iso_rectangle(p4,p4,p5,p5); typename R::Construct_object_2 construct_object = rep.construct_object_2_object(); @@ -600,11 +601,10 @@ test_new_2(const R& rep) use(d4); use(d5); use(c4); use(c11); use(r4); use(l7); use(r5); use(v7); use(v8); use(v9); - use(rec3); use(tmp9); use(tmp10); use(tmp11); use(tmp12); use(tmp12a); use(tmp14); use(tmp14a); use(tmp15); use(tmp16); use(tmp16); use(tmp17); use(tmp19); use(tmp19a); use(tmp22a); - use(tmp22b); use(tmp23); + use(tmp22b); use(tmp22c); use(tmp23); use(tmp58); use(tmp57); use(tmp56); use(tmp55); use(tmp54); use(tmp53b); use(tmp53a); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h index 7b590919460..e3b41b57bf8 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h @@ -213,7 +213,8 @@ test_new_3(const R& rep) typename R::Construct_iso_cuboid_3 construct_iso_cuboid = rep.construct_iso_cuboid_3_object(); Iso_cuboid_3 iso1 = construct_iso_cuboid(p3,p6); - Iso_cuboid_3 iso2 = construct_iso_cuboid(p3,p3,p6,p6,p4,p4); + iso1 = construct_iso_cuboid(p2,p3,0); + iso1 = construct_iso_cuboid(p3,p3,p6,p6,p4,p4); typename R::Construct_object_3 construct_object = rep.construct_object_3_object(); @@ -708,7 +709,7 @@ test_new_3(const R& rep) use(l6); use(d4); use(d5); use(d6); use(d7); use(r1); use(h1); use(h4); use(h5); use(h6); use(sp4); use(sp5); use(sp6); use(sp7); use(sp8); - use(t1); use(th1); use(iso2); + use(t1); use(th1); use(tmp3); use(tmp3a); use(tmp9); use(tmp14a); use(tmp5); use(tmp6); use(tmp7); use(tmp71); use(sp1a); use(tmp72);