Merge pull request #6408 from efifogel/Aos_2-geodesic_traits-efif

Aos 2 geodesic traits efif

# Conflicts:
#	Installation/CHANGES.md
This commit is contained in:
Laurent Rineau 2022-04-06 09:12:02 +02:00
commit 7d4a8e5469
27 changed files with 538 additions and 494 deletions

View File

@ -3820,12 +3820,14 @@ asymmetry is also reflected in the predicates listed below. They help
determining the order of curve-ends lying on the boundary of the
parameter space with respect to regular points and among each other.
The concept `ArrangementVerticalSideTraits_2` requires the following
The concepts `ArrangementClosedLeftTraits_2`,
`ArrangementClosedRightTraits_2`, and
`ArrangementIdentifiedVerticalTraits_2` require the following
additional predicate:
<DL>
<DT>\link ArrangementVerticalSideTraits_2::Compare_y_on_boundary_2 <B>`Compare_y_on_boundary_2`</B>\endlink:
<DT>\link ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2 <B>`Compare_y_on_boundary_2`</B>\endlink:
<DD>Given two points \f$p_1=(x_{p_1},y_{p_1})\f$ and
\f$p_2=(x_{p_2},y_{p_2})\f$, such that at least one of them lies on a
@ -3839,6 +3841,12 @@ this overloaded version is required only for the concepts
`ArrangementClosedLeftTraits_2`, `ArrangementClosedRightTraits_2`, and
`ArrangementIdentifiedVerticalTraits_2`.
</DL>
The concept `ArrangementVerticalSideTraits_2` requires the following additional predicate:
<DL>
<DT>\link ArrangementVerticalSideTraits_2::Compare_y_near_boundary_2 <B>`Compare_y_near_boundary_2`</B>\endlink:
<DD>
@ -3971,7 +3979,7 @@ boundary-side, \f$p\f$ is located far to the top in a similar manner.
</DL>
The concept `ArrangementIdentifiedVerticalTraits_2` requires the following
predicate:
additional predicate:
<DL>
@ -3991,7 +3999,7 @@ boundary.
</DL>
Similarly, the concept `ArrangementIdentifiedHorizontalTraits_2`
requires the following predicate:
requires the following additional predicate:
<DL>

View File

@ -0,0 +1,74 @@
namespace ArrTraits {
/*! \ingroup PkgArrangementOnSurface2ConceptsFunctionObjects
* \cgalConcept
*
* \cgalRefines AdaptableFunctor
*
* \cgalHasModel ArrangementHorizontalSideTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_x_on_boundary_2
*/
class CompareXOnBoundaryOfCurveEnd_2 {
public:
/// \name Operations
/// A model of this concept must provide:
/// @{
/*! Given a point `p`, an \f$x\f$-monotone curve `xcv`, and an
* enumeration `ce` that specifies either the minimum or the maximum end of
* the curve where the curve has a vertical asymptote, compares the \f$
* x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the
* curve at its specificed end. The variable `xcv` identifies the parametric
* curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval
* with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an
* open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$
* x\f$-coordinate of `p` and \f$ \lim_{t \rightarrow d} x(t)\f$. Returns
* `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink (`xcv`, `ce`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c\f$ has a vertical asymptote
* at its \f$ d\f$-end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv`, `ce`) = `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::Point_2& p,
const ArrTraits::X_monotone_curve_2& xcv,
CGAL::Arr_curve_end ce);
/*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1`
* and `ce2` that specify either the minimum or the maximum ends of `xcv1` and
* `xcv2`, respectively, where the curves have vertical asymptotes, compares the
* \f$ x\f$-coordinates of the limits of the curves at their specificed
* ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$
* c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$,
* respectively, defined over open or half-open intervals with endpoints \f$
* 0\f$ and \f$ 1\f$. The indices `ce1` and `ce2` identify open ends \f$ d_1
* \in\{0,1\}\f$ and \f$ d_2 \in\{0,1\}\f$ of \f$ c_1\f$ and \f$ c_2\f$,
* respectively. Formally, compares \f$ \lim_{t \rightarrow d_1} x_1(t)\f$ and
* \f$\lim_{t \rightarrow d_2} x_2(t)\f$. Returns `CGAL::SMALLER`,
* `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv1`, `ce1`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv2`, `ce2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_1\f$ has a vertical
* asymptote at its respective end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv1`, `ce1`) = `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_2\f$ has a vertical asymptote
* at its respective end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv2`, `ce2`) = `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1,
CGAL::Arr_curve_end ce1,
const ArrTraits::X_monotone_curve_2& xcv2,
CGAL::Arr_curve_end ce2);
/// @}
}; /* end ArrTraits::CompareXOnBoundaryOfCurveEnd_2 */
}

View File

@ -5,9 +5,9 @@ namespace ArrTraits {
*
* \cgalRefines AdaptableFunctor
*
* \cgalHasModel ArrangementHorizontalSideTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementClosedBottomTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementClosedTopTraits_2::Compare_x_on_boundary_2
* \cgalHasModel ArrangementIdentifiedHorizontalTraits_2::Compare_x_on_boundary_2
*/
class CompareXOnBoundary_2 {
public:
@ -16,59 +16,21 @@ public:
/// A model of this concept must provide:
/// @{
/*! Given a point `p`, an \f$x\f$-monotone curve `xcv`, and an
* enumeration `ce` that specifies either the minimum or the maximum end of
* the curve where the curve has a vertical asymptote, compares the \f$
* x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the
* curve at its specificed end. The variable `xcv` identifies the parametric
* curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval
* with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an
* open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$
* x\f$-coordinate of `p` and \f$ \lim_{t \rightarrow d} x(t)\f$. Returns
/*! Given two points `p1` and `p2`, such that either `p1` or `p2` (or both)
* lie on the bottom or top boundary of the parameter space, compares the \f$
* x\f$-coordinate of `p1` and the \f$x\f$-coordinate of `p2`. Returns
* `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink (`xcv`, `ce`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c\f$ has a vertical asymptote
* at its \f$ d\f$-end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv`, `ce`) = `CGAL::ARR_INTERIOR`.
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2
* `Parameter_space_in_y_2`\endlink (`p1`) \f$\neq\f$ `CGAL::ARR_INTERIOR` or
* \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2
* `Parameter_space_in_y_2`\endlink (`p2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::Point_2& p,
const ArrTraits::X_monotone_curve_2& xcv,
CGAL::Arr_curve_end ce);
/*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1`
* and `ce2` that specify either the minimum or the maximum ends of `xcv1` and
* `xcv2`, respectively, where the curves have vertical asymptotes, compares the
* \f$ x\f$-coordinates of the limits of the curves at their specificed
* ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$
* c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$,
* respectively, defined over open or half-open intervals with endpoints \f$
* 0\f$ and \f$ 1\f$. The indices `ce1` and `ce2` identify open ends \f$ d_1
* \in\{0,1\}\f$ and \f$ d_2 \in\{0,1\}\f$ of \f$ c_1\f$ and \f$ c_2\f$,
* respectively. Formally, compares \f$ \lim_{t \rightarrow d_1} x_1(t)\f$ and
* \f$\lim_{t \rightarrow d_2} x_2(t)\f$. Returns `CGAL::SMALLER`,
* `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv1`, `ce1`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre \link ArrangementHorizontalSideTraits_2::Parameter_space_in_y_2 `Parameter_space_in_y_2`\endlink(`xcv2`, `ce2`) \f$\neq\f$ `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_1\f$ has a vertical
* asymptote at its respective end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv1`, `ce1`) = `CGAL::ARR_INTERIOR`.
*
* \pre If the parameter space is unbounded, \f$c_2\f$ has a vertical asymptote
* at its respective end; that is,
* \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2 `Parameter_space_in_x_2`\endlink(`xcv2`, `ce2`) = `CGAL::ARR_INTERIOR`.
*/
Comparison_result operator()(const ArrTraits::X_monotone_curve_2& xcv1,
CGAL::Arr_curve_end ce1,
const ArrTraits::X_monotone_curve_2& xcv2,
CGAL::Arr_curve_end ce2);
Comparison_result operator()(const ArrTraits::Point_2& p1,
const ArrTraits::Point_2& p2);
/// @}
}; /* end ArrTraits::CompareXOnBoundary_2 */
}; /* end ArrTraits::CompareXOnBoundaryOfCurveEnd_2 */
}

View File

@ -8,6 +8,8 @@ namespace ArrTraits {
* \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2
*/
class CompareYOnBoundary_2 {
public:
@ -16,9 +18,10 @@ public:
/// A model of this concept must provide:
/// @{
/*! Given two points `p1` and `p2` returns `CGAL::SMALLER`, `CGAL::EQUAL`, or
* `CGAL::LARGER` according to the lexicographic \f$xy\f$-order of the points
* `p1` and `p2`.
/*! Given two points `p1` and `p2`, such that either `p1` or `p2` (or both)
* lie on the bottom or top boundary of the parameter space, compares the \f$
* y\f$-coordinate of `p1` and the \f$y\f$-coordinate of `p2`. Returns
* `CGAL::SMALLER`, `CGAL::EQUAL`, or `CGAL::LARGER` accordingly.
*
* \pre \link ArrangementVerticalSideTraits_2::Parameter_space_in_x_2
* `Parameter_space_in_x_2`\endlink (`p1`) \f$\neq\f$ `CGAL::ARR_INTERIOR` or

View File

@ -34,7 +34,13 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// @}
/// \name Accessing Functor Objects
/// @{
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
/// @}
}

View File

@ -1,42 +0,0 @@
/*! \ingroup PkgArrangementOnSurface2ConceptsTraits
* \cgalConcept
*
* `ArrangementClosedIdentifiedVerticalTraits_2` is an abstract concept. It
* generalizes the concepts `ArrangementClosedLeftTraits_2`,
* `ArrangementClosedRightTraits_2`, and
* `ArrangementIdentifiedVerticalTraits_2`. (An "abstract" concept is a concept
* that is useless on its own.) Only a combination of this concept and one or
* more concepts that handle curves that either reach or approach the remaining
* boundary sides (that is, borrom and top) are purposeful, and can have models.
*
* \cgalRefines `ArrangementBasicTraits_2`
*
* \cgalHasModel `CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, X, Y>`
*
* \sa `ArrangementVerticalSideTraits_2`
*/
class ArrangementVerticalSideTraits_2 {
public:
/// \name Categories
/// @{
/// @}
/// \name Types
/// @{
/// @}
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// @}
/// \name Accessing Functor Objects
/// @{
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
/// @}
}; /* end ArrangementHorizontalSideTraits_2 */

View File

@ -35,7 +35,13 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// @}
/// \name Accessing Functor Objects
/// @{
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
/// @}
}
};

View File

@ -34,7 +34,13 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// @}
/// \name Accessing Functor Objects
/// @{
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
/// @}
}
};

View File

@ -34,7 +34,13 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// @}
/// \name Accessing Functor Objects
/// @{
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
/// @}
}

View File

@ -36,7 +36,7 @@ public:
/// models the concept `ArrTraits::ParameterSpaceInY_2`.
typedef unspecified_type Parameter_space_in_y_2;
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
/// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::CompareXNearBoundary_2`.

View File

@ -34,6 +34,9 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::IsOnXIdentification_2`.
typedef unspecified_type Is_on_x_identification_2;
@ -42,5 +45,6 @@ public:
/// \name Accessing Functor Objects
/// @{
Is_on_x_identification_2 is_on_x_identification_2_object() const;
Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const;
/// @}
}

View File

@ -34,6 +34,9 @@ public:
/// \name Functor Types
/// @{
/// models the concept `ArrTraits::CompareYOnBoundary_2`.
typedef unspecified_type Compare_y_on_boundary_2;
/// models the concept `ArrTraits::IsOnYIdentification_2`.
typedef unspecified_type Is_on_y_identification_2;
@ -41,6 +44,7 @@ public:
/// \name Accessing Functor Objects
/// @{
Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const;
Is_on_y_identification_2 is_on_y_identification_2_object() const;
/// @}
}

View File

@ -96,10 +96,10 @@ public:
*/
typedef unspecified_type Parameter_space_in_y_2;
/*! models the concept `ArrTraits::CompareXOnBoundary_2`. Required only if
* the traits class supports unbounded curves that approach the bottom or the
* top sides (the `Bottom_side_category` or the `Top_side_category` categories
* are convertible to `CGAL::Arr_open_side_tag`).
/*! models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`. Required
* only if the traits class supports unbounded curves that approach the bottom
* or the top sides (the `Bottom_side_category` or the `Top_side_category`
* categories are convertible to `CGAL::Arr_open_side_tag`).
*/
typedef unspecified_type Compare_x_on_boundary_2;

View File

@ -51,7 +51,7 @@ public:
/// models the concept `ArrTraits::ParameterSpaceInX_2`.
typedef unspecified_type Parameter_space_in_x_2;
/// models the concept `ArrTraits::CompareXOnBoundary_2`.
/// models the concept `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`.
typedef unspecified_type Compare_x_on_boundary_2;
/// models the concept `ArrTraits::CompareXNearBoundary_2`.

View File

@ -123,7 +123,6 @@ implemented as peripheral classes or as free (global) functions.
- `ArrangementTraits_2`
- `ArrangementHorizontalSideTraits_2`
- `ArrangementVerticalSideTraits_2`
- `ArrangementClosedIdentifiedVerticalTraits_2`
- `ArrangementIdentifiedVerticalTraits_2`
- `ArrangementIdentifiedHorizontalTraits_2`
- `ArrangementOpenBoundaryTraits_2`
@ -177,6 +176,7 @@ implemented as peripheral classes or as free (global) functions.
- `ArrTraits::CompareYOnBoundary_2`
- `ArrTraits::CompareXNearBoundary_2`
- `ArrTraits::CompareYNearBoundary_2`
- `ArrTraits::CompareXOnBoundaryOfCurveEnd_2`
- `ArrTraits::Intersect_2`
- `ArrTraits::Split_2`
- `ArrTraits::AreMergeable_2`

View File

@ -1194,11 +1194,10 @@ public:
*/
Comparison_result operator()(const X_monotone_curve_2& xc1,
const X_monotone_curve_2& xc2,
const Point_2&
CGAL_precondition_code(p)) const
const Point_2& p) const
{
CGAL_precondition(!xc1.is_degenerate());
CGAL_precondition(!xc2.is_degenerate());
CGAL_precondition(! xc1.is_degenerate());
CGAL_precondition(! xc2.is_degenerate());
CGAL_precondition(p == xc1.right());
CGAL_precondition(p == xc2.right());
@ -1212,6 +1211,7 @@ public:
// Compare the y-coord. at the x-coord of the most right left-endpoint.
const Point_2& l1 = xc1.left();
const Point_2& l2 = xc2.left();
if (!l1.is_no_boundary()) {
// use l2 and xc1:
Oriented_side os = m_traits.oriented_side(xc1.normal(), l2);
@ -1220,7 +1220,32 @@ public:
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
}
if (!l2.is_no_boundary()) {
// if p and r1 are antipodal, compare the plane normals
const Kernel& kernel = m_traits;
auto opposite_3 = kernel.construct_opposite_direction_3_object();
Direction_3 opposite_p = opposite_3(p);
if (kernel.equal_3_object()(opposite_p, Direction_3(l1)) ||
kernel.equal_3_object()(opposite_p, Direction_3(l2)))
{
Sign xsign = Traits::x_sign(p);
Sign ysign = Traits::y_sign(p);
Project project = (xsign == ZERO) ?
((ysign == POSITIVE) ? Traits::project_minus_xz : Traits::project_xz) :
((xsign == POSITIVE) ? Traits::project_yz : Traits::project_minus_yz);
Direction_2 n1 = project(xc1.normal());
Direction_2 n2 = project(xc2.normal());
auto opposite_2 = kernel.construct_opposite_direction_2_object();
if (! xc1.is_directed_right()) n1 = opposite_2(n1);
if (! xc2.is_directed_right()) n2 = opposite_2(n2);
if (kernel.equal_2_object()(n1, n2)) return EQUAL;
const Direction_2 d(1, 0);
return (kernel.counterclockwise_in_between_2_object()(n1, d, n2)) ?
LARGER: SMALLER;
}
if (! l2.is_no_boundary()) {
// use l1 and xc2:
Oriented_side os = m_traits.oriented_side(xc2.normal(), l1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
@ -1229,7 +1254,8 @@ public:
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
}
if (m_traits.compare_xy(l1, l2) == SMALLER) {
Comparison_result res = m_traits.compare_xy(l1, l2);
if (res == SMALLER) {
// use l2 and xc1:
Oriented_side os = m_traits.oriented_side(xc1.normal(), l2);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
@ -1237,12 +1263,16 @@ public:
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
}
// use l1 and xc2:
Oriented_side os = m_traits.oriented_side(xc2.normal(), l1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xc2.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
if (res == LARGER) {
// use l1 and xc2:
Oriented_side os = m_traits.oriented_side(xc2.normal(), l1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xc2.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
}
// res == equal
return EQUAL;
}
};
@ -1283,8 +1313,8 @@ public:
const X_monotone_curve_2& xc2,
const Point_2& p) const
{
CGAL_precondition(!xc1.is_degenerate());
CGAL_precondition(!xc2.is_degenerate());
CGAL_precondition(! xc1.is_degenerate());
CGAL_precondition(! xc2.is_degenerate());
// CGAL_precondition(p == xc1.left());
// CGAL_precondition(p == xc2.left());
@ -1296,10 +1326,35 @@ public:
// Non of the arcs is verticel. Thus, non of the endpoints coincide with
// a pole.
// Compare the y-coord. at the x-coord of the most left right-endpoint.
const Point_2& r1 = xc1.right();
const Point_2& r2 = xc2.right();
if (!r1.is_no_boundary()) {
// if p and r1 are antipodal, compare the plane normals
const Kernel& kernel = m_traits;
auto opposite_3 = kernel.construct_opposite_direction_3_object();
Direction_3 opposite_p = opposite_3(p);
if (kernel.equal_3_object()(opposite_p, Direction_3(r1)) ||
kernel.equal_3_object()(opposite_p, Direction_3(r2)))
{
Sign xsign = Traits::x_sign(p);
Sign ysign = Traits::y_sign(p);
Project project = (xsign == ZERO) ?
((ysign == POSITIVE) ? Traits::project_minus_xz : Traits::project_xz) :
((xsign == POSITIVE) ? Traits::project_yz : Traits::project_minus_yz);
Direction_2 n1 = project(xc1.normal());
Direction_2 n2 = project(xc2.normal());
auto opposite_2 = kernel.construct_opposite_direction_2_object();
if (! xc1.is_directed_right()) n1 = opposite_2(n1);
if (! xc2.is_directed_right()) n2 = opposite_2(n2);
if (kernel.equal_2_object()(n1, n2)) return EQUAL;
const Direction_2 d(1, 0);
return (kernel.counterclockwise_in_between_2_object()(n1, d, n2)) ?
SMALLER : LARGER;
}
// Compare the y-coord. at the x-coord of the most left right-endpoint.
if (! r1.is_no_boundary()) {
// use r2 and xc1:
Oriented_side os = m_traits.oriented_side(xc1.normal(), r2);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
@ -1307,7 +1362,7 @@ public:
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
}
if (!r2.is_no_boundary()) {
if (! r2.is_no_boundary()) {
// use r1 and xc2:
Oriented_side os = m_traits.oriented_side(xc2.normal(), r1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
@ -1333,32 +1388,7 @@ public:
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
}
// res == equal
// if p and r1 are antipodal, compare the plane normals
const Kernel& kernel = m_traits;
typename Kernel::Construct_opposite_direction_3 opposite_3 =
kernel.construct_opposite_direction_3_object();
// VC 10 does not like the following:
// if (!kernel.equal_3_object()(opposite_3(p), r1)) return EQUAL;
Direction_3 tmp1 = opposite_3(p); // pacify msvc 10
if (!kernel.equal_3_object()(tmp1, Direction_3(r1)))
return EQUAL;
Sign xsign = Traits::x_sign(p);
Sign ysign = Traits::y_sign(p);
Project project = (xsign == ZERO) ?
((ysign == POSITIVE) ? Traits::project_minus_xz : Traits::project_xz) :
((xsign == POSITIVE) ? Traits::project_yz : Traits::project_minus_yz);
Direction_2 n1 = project(xc1.normal());
Direction_2 n2 = project(xc2.normal());
typename Kernel::Construct_opposite_direction_2 opposite_2 =
kernel.construct_opposite_direction_2_object();
if (!xc1.is_directed_right()) n1 = opposite_2(n1);
if (!xc2.is_directed_right()) n2 = opposite_2(n2);
if (kernel.equal_2_object()(n1, n2)) return EQUAL;
const Direction_2 d(1, 0);
return (kernel.counterclockwise_in_between_2_object()(n1, d, n2)) ?
SMALLER : LARGER;
return EQUAL;
}
};
@ -1397,8 +1427,7 @@ public:
typename Kernel::Equal_3 equal_3 = kernel.equal_3_object();
if (xc1.is_full() || xc2.is_full()) {
if (!xc1.is_full() || !xc2.is_full()) return false;
typename Kernel::Construct_opposite_direction_3 opposite_3 =
kernel.construct_opposite_direction_3_object();
auto opposite_3 = kernel.construct_opposite_direction_3_object();
return (equal_3(xc1.normal(), xc2.normal()) ||
equal_3(opposite_3(xc1.normal()), xc2.normal()));
}
@ -1764,113 +1793,118 @@ public:
* \param ce the arc end indicator.
* \return the second comparison result.
* \pre the ce ends of the arcs xcv1 and xcv2 lie either on the left
* boundary or on the right boundary of the parameter space (implying
* that they cannot be vertical).
* boundary or on the right boundary of the parameter space.
* \pre the curves cannot reach a pole
* There is no horizontal identification curve!
*/
Comparison_result operator()(const X_monotone_curve_2& xcv1,
const X_monotone_curve_2& xcv2,
Arr_curve_end ce) const
{
CGAL_precondition(!xcv1.is_degenerate());
CGAL_precondition(!xcv2.is_degenerate());
CGAL_precondition(! xcv1.is_degenerate());
CGAL_precondition(! xcv2.is_degenerate());
CGAL_precondition((ce != ARR_MIN_END) ||
(xcv1.left().is_mid_boundary() &&
xcv2.left().is_mid_boundary()));
CGAL_precondition((ce != ARR_MAX_END) ||
(xcv1.right().is_mid_boundary() &&
xcv2.right().is_mid_boundary()));
// If the curves lie on the same plane return EQUAL.
const Kernel& kernel = m_traits;
const Direction_3& n1 = xcv1.normal();
const Direction_3& n2 = xcv2.normal();
if (xcv1.is_directed_right() == xcv2.is_directed_right()) {
if (kernel.equal_3_object()(n1, n2)) return EQUAL;
}
else {
auto opposite_3 = kernel.construct_opposite_direction_3_object();
auto opposite_n2 = opposite_3(n2);
if (kernel.equal_3_object()(n1, opposite_n2)) return EQUAL;
}
// The curves do not lie on the same plane!
const Point_2& l1 = xcv1.left();
const Point_2& r1 = xcv1.right();
const Point_2& l2 = xcv2.left();
const Point_2& r1 = xcv1.right();
const Point_2& r2 = xcv2.right();
// If xcv1 is vertical, xcv1 coincides with the discontinuity arc:
if (xcv1.is_vertical()) {
CGAL_precondition(!l1.is_no_boundary());
CGAL_precondition(!r1.is_no_boundary());
}
// If xcv2 is vertical, xcv2 coincides with the discontinuity arc:
if (xcv2.is_vertical()) {
CGAL_precondition(!l2.is_no_boundary());
CGAL_precondition(!r2.is_no_boundary());
}
if (ce == ARR_MIN_END) {
// Handle the south pole. It has the smallest y coords:
if (l1.is_min_boundary())
return (l2.is_min_boundary()) ? EQUAL : SMALLER;
if (l2.is_min_boundary()) return LARGER;
// None of xcv1 and xcv2 endpoints coincide with a pole:
Comparison_result cr = m_traits.compare_y(l1, l2);
if (cr != EQUAL) return cr;
// If Both arcs are vertical, they overlap:
if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
if (xcv1.is_vertical()) return LARGER;
if (xcv2.is_vertical()) return SMALLER;
// Non of the arcs is verticel. Thus, non of the endpoints coincide
// with a pole.
// Compare the y-coord. at the x-coord of the most left right-endpoint.
CGAL_assertion(r1.is_no_boundary());
CGAL_assertion(r2.is_no_boundary());
// There are 4 cases based on the sign of the z component of the normals
// Compute the sign of the x-component of the normal cross product.
// There is no point computing the intermediate cross product:
// auto cross_prod = kernel.construct_cross_product_vector_3_object();
// Vector_3 v = cross_prod(n1.vector(), n2.vector());
// CGAL::Sign xsign = CGAL::sign(v.x());
// This predicate is not yet supported; thus, compute directly:
CGAL::Sign xsign = CGAL::sign(n1.dy() * n2.dz() - n1.dz() * n2.dy());
if (m_traits.compare_xy(r1, r2) == LARGER) {
// use r2 and xcv1:
Oriented_side os =
m_traits.oriented_side(xcv1.normal(), r2);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xcv1.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
// std::cout << "sign(n1.z): " << CGAL::sign(n1.dz()) << std::endl;
// std::cout << "sign(n2.z): " << CGAL::sign(n2.dz()) << std::endl;
// std::cout << "x sign: " << xsign << std::endl;
if (CGAL::sign(n1.dz()) == POSITIVE) {
if (CGAL::sign(n2.dz()) == POSITIVE) {
// pos pos
return (xsign == POSITIVE) ? LARGER : SMALLER;
}
// pos neg
return (xsign == POSITIVE) ? SMALLER : LARGER;
}
// use r1 and xcv2:
Oriented_side os = m_traits.oriented_side(xcv2.normal(), r1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xcv2.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
if (CGAL::sign(n2.dz()) == POSITIVE) {
// neg pos
return (xsign == POSITIVE) ? SMALLER : LARGER;
}
// neg neg
return (xsign == POSITIVE) ? LARGER : SMALLER;
}
// ce == ARR_MAX_END
// Handle the north pole. It has the largest y coords:
if (r1.is_max_boundary()) return (r2.is_max_boundary()) ? EQUAL : LARGER;
if (r2.is_max_boundary()) return SMALLER;
// None of xcv1 and xcv2 endpoints coincide with a pole:
Direction_2 r1_xy = Traits::project_xy(r1);
Comparison_result cr = m_traits.compare_y(r1, r2);
if (cr != EQUAL) return cr;
// If Both arcs are vertical, they overlap:
if (xcv1.is_vertical() && xcv2.is_vertical()) return EQUAL;
if (xcv1.is_vertical()) return LARGER;
if (xcv2.is_vertical()) return SMALLER;
// Compare to the left:
Direction_2 p_r1 = Traits::project_xy(r1);
cr = m_traits.compare_y(r1, r2);
if (cr != EQUAL) return cr;
// There are 4 cases based on the sign of the z component of the normals
// Compute the sign of the x-component of the normal cross product.
// There is no point computing the intermediate cross product:
// auto cross_prod = kernel.construct_cross_product_vector_3_object();
// Vector_3 v = cross_prod(n1.vector(), n2.vector());
// CGAL::Sign xsign = CGAL::sign(v.x());
// This predicate is not yet supported; thus, compute directly:
CGAL::Sign xsign = CGAL::sign(n1.dy() * n2.dz() - n1.dz() * n2.dy());
// Non of the arcs is verticel. Thus, non of the endpoints coincide with
// a pole.
// Compare the y-coord. at the x-coord of the most right left-endpoint.
CGAL_assertion(l1.is_no_boundary());
CGAL_assertion(l2.is_no_boundary());
// std::cout << "sign(n1.z): " << CGAL::sign(n1.dz()) << std::endl;
// std::cout << "sign(n2.z): " << CGAL::sign(n2.dz()) << std::endl;
// std::cout << "x sign: " << xsign << std::endl;
if (m_traits.compare_xy(l1, l2) == SMALLER) {
// use l2 and xcv1:
Oriented_side os = m_traits.oriented_side(xcv1.normal(), l2);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xcv1.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER) :
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER);
if (CGAL::sign(n1.dz()) == POSITIVE) {
if (CGAL::sign(n2.dz()) == POSITIVE) {
// pos pos
return (xsign == POSITIVE) ? SMALLER : LARGER;
}
// pos neg
return (xsign == POSITIVE) ? LARGER: SMALLER;
}
// use l1 and xcv2:
Oriented_side os = m_traits.oriented_side(xcv2.normal(), l1);
return (os == ON_ORIENTED_BOUNDARY) ? EQUAL :
(xcv2.is_directed_right()) ?
((os == ON_NEGATIVE_SIDE) ? SMALLER : LARGER) :
((os == ON_NEGATIVE_SIDE) ? LARGER : SMALLER);
if (CGAL::sign(n2.dz()) == POSITIVE) {
// neg pos
return (xsign == POSITIVE) ? LARGER : SMALLER;
}
// neg neg
return (xsign == POSITIVE) ? SMALLER : LARGER;
}
};
@ -2318,31 +2352,22 @@ public:
if (equal(l1, r2)) {
// 1. l1 = r2 < r1 < l2 < l1 | One intersection
// 2. l1 = r2 < r1 = l2 < l1 | Two intersections
// 3. l1 = r2 < l2 < r1 < l1 | One intersection and one overlap
// 3. l1 = r2 < l2 < r1 < l1 | One overlap
// 4. l1 = r2 < l2 < r1 = l1 | One overlap (handled above)
// 5. l1 = r2 < r1 < l2 = l1 | One overlap (handled above)
if (in_between(r1, r2, l2)) {
// If the intersection point lies on the identification curve, this
// intersection point should be ignored (see below). However, it
// cannot occur.
// Case 1.
*oi++ = Intersection_result(Intersection_point(l1_3, 1));
return oi;
}
if (equal(r1, l2)) {
// Case 2. This can happen only if one of the intersection points
// lies on the identification curve, and this points should be
// ignored.
if (! m_traits.is_on_y_identification_2_object()(l1_3)) {
*oi++ = Intersection_result(Intersection_point(l1_3, 1));
return oi;
}
CGAL_assertion(! m_traits.is_on_y_identification_2_object()(l2_3));
// Case 2.
*oi++ = Intersection_result(Intersection_point(l1_3, 1));
*oi++ = Intersection_result(Intersection_point(l2_3, 1));
return oi;
}
CGAL_assertion(in_between(r1, l2, r2));
// Case 3. This can happen only the intersection point lies on the
// identification curve; in this case this point should be ignored.
CGAL_assertion(m_traits.is_on_y_identification_2_object()(l1_3));
// Case 3.
X_monotone_curve_2 xc(l2_3, r1_3, normal, vertical, true);
*oi++ = Intersection_result(xc);
return oi;
@ -2352,19 +2377,15 @@ public:
if (equal(r1, l2)) {
// 1. l1 < r1 = l2 < r2 < l1 | One intersection
// 2. l1 < r1 = l2 < r2 = l1 | Two intersections (handled above)
// 3. l1 < r2 < r1 = l2 < l1 | One intersection and one overlap
// 3. l1 < r2 < r1 = l2 < l1 | One overlap
// 4. l1 < r2 = r1 = l2 < l1 | One overlap (handled above)
// 5. l1 < l1 = r1 = l2 < r2 | One overlap (handled above)
if (in_between(r2, r1, l1)) {
// If the intersection point lies on the identification curve, this
// intersection point should be ignored (see below). However, it
// cannot occur.
// Case 1.
*oi++ = Intersection_result(Intersection_point(l2_3, 1));
return oi;
}
// Case 3. This can happen only the intersection point lies on the
// identification curve; in this case this point should be ignored.
CGAL_assertion(in_between(r2, l1, r1));
CGAL_assertion(m_traits.is_on_y_identification_2_object()(l2_3));
// Case 3.
X_monotone_curve_2 xc(l1_3, r2_3, normal, vertical, true);
*oi++ = Intersection_result(xc);
return oi;
@ -2552,10 +2573,8 @@ public:
if (equal_3(normal1, normal2) || equal_3(opposite_normal1, normal2)) {
// The underlying planes are the same
Counterclockwise_in_between_2 ccib =
kernel.counterclockwise_in_between_2_object();
typename Traits::Clockwise_in_between_2 cib =
m_traits.clockwise_in_between_2_object();
Counterclockwise_in_between_2 ccib = kernel.counterclockwise_in_between_2_object();
auto cib = m_traits.clockwise_in_between_2_object();
if (xc1.is_vertical()) {
// Both arcs are vertical
@ -2620,23 +2639,19 @@ public:
normal, false, ccib, Traits::project_xy, oi);
}
Vector_3 v =
kernel.construct_cross_product_vector_3_object()(xc1.normal().vector(),
xc2.normal().vector());
auto cross_prod = kernel.construct_cross_product_vector_3_object();
Vector_3 v = cross_prod(xc1.normal().vector(), xc2.normal().vector());
// Determine which one of the two directions:
// Observe that xc1 and xc2 may share two endpoints.
Point_2 ed = m_traits.construct_point_2_object()(v.direction());
if (is_in_between(ed, xc1) && is_in_between(ed, xc2)) {
if (is_in_between(ed, xc1) && is_in_between(ed, xc2))
*oi++ = Intersection_result(Intersection_point(ed, 1));
return oi;
}
Vector_3 vo(kernel.construct_opposite_vector_3_object()(v));
Point_2 edo = m_traits.construct_point_2_object()(vo.direction());
if (is_in_between(edo, xc1) && is_in_between(edo, xc2)) {
if (is_in_between(edo, xc1) && is_in_between(edo, xc2))
*oi++ = Intersection_result(Intersection_point(edo, 1));
return oi;
}
return oi;
}
};

View File

@ -535,12 +535,12 @@ public:
size_t i = 0;
for (auto it = container.begin(); it != container.end(); ++it) {
if (const auto* xcv = boost::get<X_monotone_curve_2>(*it)) {
if (const auto* xcv = boost::get<X_monotone_curve_2>(&*it)) {
std::cout << " result[" << i++ << "]: xcv: " << *xcv << std::endl;
continue;
}
if (const Point_2* p = boost::get<Point_2>(*it)) {
if (const auto* p = boost::get<Point_2>(&*it)) {
std::cout << " result[" << i++ << "]: p: " << *p << std::endl;
continue;
}

View File

@ -55,3 +55,17 @@ compare_y_at_x_right 33 30 0 LARGER
compare_y_at_x_right 32 31 0 LARGER
compare_y_at_x_right 33 31 0 LARGER
compare_y_at_x_right 35 31 0 LARGER
#
compare_y_at_x_right 36 37 3 LARGER
compare_y_at_x_right 37 36 3 SMALLER
compare_y_at_x_right 38 39 3 SMALLER
compare_y_at_x_right 39 38 3 LARGER
compare_y_at_x_right 36 39 3 EQUAL
compare_y_at_x_right 38 37 3 EQUAL
#
compare_y_at_x_left 40 41 3 LARGER
compare_y_at_x_left 41 40 3 SMALLER
compare_y_at_x_left 42 43 3 SMALLER
compare_y_at_x_left 43 42 3 LARGER
compare_y_at_x_left 40 43 3 EQUAL
compare_y_at_x_left 42 41 3 EQUAL

View File

@ -1,3 +1,4 @@
0/1 -1/1 0/1
1/1 0/1 0/1
0/1 1/1 0/1
0 -1 0
1 0 0
0 1 0
-1 0 0

View File

@ -36,3 +36,13 @@
0 1 -1 1 0 -1 0
0 0 0 1 0 -1 0
0 0 -1 1 0 -1 0
#
1 -1 0 0 1 0 0 0 1 1
1 -1 0 0 1 0 0 0 -1 1
1 1 0 0 -1 0 0 0 1 -1
1 1 0 0 -1 0 0 0 -1 -1
#
1 -1 0 0 1 0 0 0 1 -1
1 -1 0 0 1 0 0 0 -1 -1
1 1 0 0 -1 0 0 0 1 1
1 1 0 0 -1 0 0 0 -1 1

View File

@ -1,78 +1,5 @@
compare_y_near_boundary 0 1 MIN_END EQUAL
compare_y_near_boundary 0 2 MIN_END EQUAL
compare_y_near_boundary 0 3 MIN_END EQUAL
compare_y_near_boundary 0 4 MIN_END EQUAL
compare_y_near_boundary 0 5 MIN_END EQUAL
compare_y_near_boundary 0 6 MIN_END EQUAL
compare_y_near_boundary 0 7 MIN_END EQUAL
compare_y_near_boundary 0 8 MIN_END EQUAL
compare_y_near_boundary 0 9 MIN_END EQUAL
compare_y_near_boundary 0 10 MIN_END EQUAL
compare_y_near_boundary 0 11 MIN_END EQUAL
compare_y_near_boundary 0 14 MIN_END EQUAL
compare_y_near_boundary 0 15 MIN_END EQUAL
compare_y_near_boundary 0 16 MIN_END EQUAL
compare_y_near_boundary 0 17 MIN_END EQUAL
compare_y_near_boundary 0 18 MIN_END EQUAL
compare_y_near_boundary 0 19 MIN_END EQUAL
compare_y_near_boundary 0 20 MIN_END EQUAL
compare_y_near_boundary 0 21 MIN_END EQUAL
compare_y_near_boundary 0 22 MIN_END EQUAL
compare_y_near_boundary 0 23 MIN_END EQUAL
compare_y_near_boundary 0 24 MIN_END EQUAL
compare_y_near_boundary 0 25 MIN_END EQUAL
compare_y_near_boundary 0 26 MIN_END EQUAL
compare_y_near_boundary 0 27 MIN_END EQUAL
compare_y_near_boundary 0 28 MIN_END EQUAL
compare_y_near_boundary 0 29 MIN_END EQUAL
compare_y_near_boundary 0 30 MIN_END EQUAL
compare_y_near_boundary 0 31 MIN_END EQUAL
compare_y_near_boundary 0 48 MIN_END SMALLER
compare_y_near_boundary 0 49 MIN_END SMALLER
compare_y_near_boundary 0 50 MIN_END SMALLER
compare_y_near_boundary 0 51 MIN_END SMALLER
compare_y_near_boundary 0 52 MIN_END LARGER
compare_y_near_boundary 0 53 MIN_END LARGER
compare_y_near_boundary 0 54 MIN_END LARGER
compare_y_near_boundary 0 55 MIN_END LARGER
compare_y_near_boundary 0 56 MIN_END SMALLER
compare_y_near_boundary 0 57 MIN_END SMALLER
compare_y_near_boundary 0 58 MIN_END SMALLER
compare_y_near_boundary 0 59 MIN_END SMALLER
compare_y_near_boundary 0 60 MIN_END LARGER
compare_y_near_boundary 0 61 MIN_END LARGER
compare_y_near_boundary 0 62 MIN_END LARGER
compare_y_near_boundary 0 63 MIN_END LARGER#
compare_y_near_boundary 0 0 MIN_END EQUAL
compare_y_near_boundary 1 1 MIN_END EQUAL
compare_y_near_boundary 2 2 MIN_END EQUAL
compare_y_near_boundary 3 3 MIN_END EQUAL
compare_y_near_boundary 4 4 MIN_END EQUAL
compare_y_near_boundary 5 5 MIN_END EQUAL
compare_y_near_boundary 6 6 MIN_END EQUAL
compare_y_near_boundary 7 7 MIN_END EQUAL
compare_y_near_boundary 8 8 MIN_END EQUAL
compare_y_near_boundary 9 9 MIN_END EQUAL
compare_y_near_boundary 10 10 MIN_END EQUAL
compare_y_near_boundary 11 11 MIN_END EQUAL
compare_y_near_boundary 14 14 MIN_END EQUAL
compare_y_near_boundary 15 15 MIN_END EQUAL
compare_y_near_boundary 16 16 MIN_END EQUAL
compare_y_near_boundary 17 17 MIN_END EQUAL
compare_y_near_boundary 18 18 MIN_END EQUAL
compare_y_near_boundary 19 19 MIN_END EQUAL
compare_y_near_boundary 20 20 MIN_END EQUAL
compare_y_near_boundary 21 21 MIN_END EQUAL
compare_y_near_boundary 22 22 MIN_END EQUAL
compare_y_near_boundary 23 23 MIN_END EQUAL
compare_y_near_boundary 24 24 MIN_END EQUAL
compare_y_near_boundary 25 25 MIN_END EQUAL
compare_y_near_boundary 26 26 MIN_END EQUAL
compare_y_near_boundary 27 27 MIN_END EQUAL
compare_y_near_boundary 28 28 MIN_END EQUAL
compare_y_near_boundary 29 29 MIN_END EQUAL
compare_y_near_boundary 30 30 MIN_END EQUAL
compare_y_near_boundary 31 31 MIN_END EQUAL
compare_y_near_boundary 48 48 MIN_END EQUAL
compare_y_near_boundary 49 49 MIN_END EQUAL
compare_y_near_boundary 50 50 MIN_END EQUAL
@ -85,42 +12,11 @@ compare_y_near_boundary 56 56 MIN_END EQUAL
compare_y_near_boundary 57 57 MIN_END EQUAL
compare_y_near_boundary 58 58 MIN_END EQUAL
compare_y_near_boundary 59 59 MIN_END EQUAL
compare_y_near_boundary 60 60 MIN_END EQUAL
compare_y_near_boundary 61 61 MIN_END EQUAL
compare_y_near_boundary 62 62 MIN_END EQUAL
compare_y_near_boundary 63 63 MIN_END EQUAL#
compare_y_near_boundary 0 0 MAX_END EQUAL
compare_y_near_boundary 1 1 MAX_END EQUAL
compare_y_near_boundary 2 2 MAX_END EQUAL
compare_y_near_boundary 3 3 MAX_END EQUAL
compare_y_near_boundary 4 4 MAX_END EQUAL
compare_y_near_boundary 5 5 MAX_END EQUAL
compare_y_near_boundary 6 6 MAX_END EQUAL
compare_y_near_boundary 7 7 MAX_END EQUAL
compare_y_near_boundary 10 10 MAX_END EQUAL
compare_y_near_boundary 11 11 MAX_END EQUAL
compare_y_near_boundary 63 63 MIN_END EQUAL
#
compare_y_near_boundary 12 12 MAX_END EQUAL
compare_y_near_boundary 13 13 MAX_END EQUAL
compare_y_near_boundary 14 14 MAX_END EQUAL
compare_y_near_boundary 15 15 MAX_END EQUAL
compare_y_near_boundary 16 16 MAX_END EQUAL
compare_y_near_boundary 17 17 MAX_END EQUAL
compare_y_near_boundary 18 18 MAX_END EQUAL
compare_y_near_boundary 19 19 MAX_END EQUAL
compare_y_near_boundary 20 20 MAX_END EQUAL
compare_y_near_boundary 21 21 MAX_END EQUAL
compare_y_near_boundary 22 22 MAX_END EQUAL
compare_y_near_boundary 23 23 MAX_END EQUAL
compare_y_near_boundary 24 24 MAX_END EQUAL
compare_y_near_boundary 25 25 MAX_END EQUAL
compare_y_near_boundary 26 26 MAX_END EQUAL
compare_y_near_boundary 27 27 MAX_END EQUAL
compare_y_near_boundary 28 28 MAX_END EQUAL
compare_y_near_boundary 29 29 MAX_END EQUAL
compare_y_near_boundary 30 30 MAX_END EQUAL
compare_y_near_boundary 31 31 MAX_END EQUAL
compare_y_near_boundary 48 48 MAX_END EQUAL
compare_y_near_boundary 49 49 MAX_END EQUAL
compare_y_near_boundary 50 50 MAX_END EQUAL
compare_y_near_boundary 51 51 MAX_END EQUAL
compare_y_near_boundary 52 52 MAX_END EQUAL
@ -135,3 +31,23 @@ compare_y_near_boundary 60 60 MAX_END EQUAL
compare_y_near_boundary 61 61 MAX_END EQUAL
compare_y_near_boundary 62 62 MAX_END EQUAL
compare_y_near_boundary 63 63 MAX_END EQUAL
#
compare_y_near_boundary 96 102 MIN_END EQUAL
compare_y_near_boundary 97 103 MIN_END EQUAL
compare_y_near_boundary 98 100 MAX_END EQUAL
compare_y_near_boundary 99 101 MAX_END EQUAL
#
compare_y_near_boundary 96 97 MIN_END LARGER
compare_y_near_boundary 97 96 MIN_END SMALLER
compare_y_near_boundary 98 99 MAX_END SMALLER
compare_y_near_boundary 99 98 MAX_END LARGER
#
compare_y_near_boundary 100 101 MAX_END SMALLER
compare_y_near_boundary 101 100 MAX_END LARGER
compare_y_near_boundary 102 103 MIN_END LARGER
compare_y_near_boundary 103 102 MIN_END SMALLER
#
compare_y_near_boundary 104 105 MIN_END LARGER
compare_y_near_boundary 105 104 MIN_END SMALLER
compare_y_near_boundary 106 107 MAX_END LARGER
compare_y_near_boundary 107 106 MAX_END SMALLER

View File

@ -287,4 +287,23 @@ intersect 86 85 1 0 21 1
intersect 89 90 1 0 22 1
intersect 90 89 1 0 22 1
intersect 93 94 1 0 23 1
intersect 94 93 1 0 23 1
intersect 94 93 1 0 23 1
#
intersect 96 96 1 1 96
intersect 97 97 1 1 97
intersect 98 98 1 1 98
intersect 99 99 1 1 99
#
intersect 96 97 2 0 24 1 0 25 1
intersect 96 98 2 0 25 1 0 24 1
intersect 96 99 2 0 24 1 0 25 1
intersect 97 98 2 0 25 1 0 24 1
intersect 97 99 2 0 25 1 0 24 1
intersect 98 99 2 0 24 1 0 25 1
#
intersect 97 96 2 0 25 1 0 24 1
intersect 98 96 2 0 24 1 0 25 1
intersect 99 96 2 0 25 1 0 24 1
intersect 98 97 2 0 24 1 0 25 1
intersect 99 97 2 0 24 1 0 25 1
intersect 99 98 2 0 25 1 0 24 1

View File

@ -1,26 +1,29 @@
1/4 -3/4 0/1
-1/4 -3/4 0/1
-3/4 -1/4 0/1
-3/4 1/4 0/1
1/4 3/4 0/1
-1/4 3/4 0/1
3/4 -1/4 0/1
3/4 1/4 0/1
1/4 -3/4 0
-1/4 -3/4 0
-3/4 -1/4 0
-3/4 1/4 0
1/4 3/4 0
-1/4 3/4 0
3/4 -1/4 0
3/4 1/4 0
##############
1/4 0/1 -3/4
3/4 0/1 -1/4
3/4 0/1 1/4
1/4 0/1 3/4
-1/4 0/1 3/4
-3/4 0/1 -1/4
-3/4 0/1 1/4
-1/4 0/1 -3/4
1/4 0 -3/4
3/4 0 -1/4
3/4 0 1/4
1/4 0 3/4
-1/4 0 3/4
-3/4 0 -1/4
-3/4 0 1/4
-1/4 0 -3/4
##############
0/1 1/4 -3/4
0/1 3/4 -1/4
0/1 3/4 1/4
0/1 1/4 3/4
0/1 -1/4 3/4
0/1 -3/4 -1/4
0/1 -3/4 1/4
0/1 -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0,0 +1,10 @@
3
1 2 0 0 -2 0 0 0 2 2
1 2 0 0 -2 0 0 0 -2 2
1 2 0 0 -2 0 0 0 2 2
0
2 2 2
-2 0 0
2 0 0
1 2 0 0 -2 0 0 0 2 2 2
1 2 0 0 -2 0 0 0 -2 2 1

View File

@ -36,4 +36,4 @@ data/test_construction/geodesic_arcs_on_sphere/test35.txt
data/test_construction/geodesic_arcs_on_sphere/test36.txt
data/test_construction/geodesic_arcs_on_sphere/test37.txt
data/test_construction/geodesic_arcs_on_sphere/test38.txt
data/test_construction/geodesic_arcs_on_sphere/test39.txt

View File

@ -48,6 +48,10 @@ Release date: June 2022
### [2D Regularized Boolean Set-Operations](https://doc.cgal.org/5.5/Manual/packages.html#PkgBooleanSetOperations2)
- The concept `GeneralPolygonSetTraits_2` now requires the nested type `Construct_polygon_with_holes_2` instead of `Construct_general_polygon_with_holes_2`.
### [2D Arrangements](https://doc.cgal.org/5.5/Manual/packages.html#PkgArrangementOnSurface2)
- Fixed the intersect_2, compare_y_at_x_right, and compare_y_at_x_left function objects of the traits class template that handles geodesic arcs on sphere and applied a small syntactical fix to the tracing traits.
[Release 5.4](https://github.com/CGAL/cgal/releases/tag/v5.4)
-----------