From 8b2f9cba73d459d583dab28b9d788f5957c62729 Mon Sep 17 00:00:00 2001 From: Monique Teillaud Date: Tue, 16 Sep 2008 09:49:46 +0000 Subject: [PATCH] - add constructor arc(three Point_3) - constructors for supporting line/circle/plane - various bug fixes --- .../Circular_kernel_3_ref/Circular_arc_3.tex | 27 ++++++--- .../Circular_arc_point_3.tex | 2 +- .../GeomFunctorsConstructors.tex | 58 +++++++++++++------ .../GeomFunctorsOtherConstructions.tex | 33 ----------- .../Circular_kernel_3_ref/Line_arc_3.tex | 26 ++++----- 5 files changed, 75 insertions(+), 71 deletions(-) diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_3.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_3.tex index 92a70651051..afcc51677bc 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_3.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_3.tex @@ -12,12 +12,12 @@ \ccThree{Circular_arc_point_3}{ca.is_x_monotone()}{} \ccThreeToTwo -\ccConstructor{Circular_arc_3(const SphericalKernel::Circle_3 &c)} +\ccConstructor{Circular_arc_3(const Circle_3 &c)} {Constructs an arc from a full circle.} -\ccConstructor{Circular_arc_3(const SphericalKernel::Circle_3 &c, - const SphericalKernel::Circular_arc_point_3 &p1, - const SphericalKernel::Circular_arc_point_3 &p2)} +\ccConstructor{Circular_arc_3(const Circle_3 &c, + const Circular_arc_point_3 &p1, + const Circular_arc_point_3 &p2)} {Constructs the circular arc supported by \ccc{c}, whose source and target are respectively \ccc{p1} and \ccc{p2}. \ccPrecond{\ccc{p1} and \ccc{p2} lie on \ccc{c}. \ccc{p1} and \ccc{p2} @@ -32,16 +32,29 @@ In this definition, we say that a plane is \textit{positive} if its equation is of the form $ax+by+cz+d=0$ with $(a,b,c)>(0,0,0)$ (i.e. $(a>0) || (a==0) \&\& (b>0) || (a==0)\&\&(b==0)\&\&(c>0)$). +\ccConstructor{Circular_arc_3(const Point_3 &p, + const Point_3 &q, + const Point_3 &r)} +{Constructs an arc that is supported by the circle of type + \ccc{Circle_3} passing through the points \ccc{p}, + \ccc{q} and \ccc{r}. The source and target are respectively \ccc{p} + and \ccc{r}, when traversing the supporting circle in the + counterclockwise direction in the \textit{positive} plane containing + the circle. + Note that, depending on the orientation of the point triple + \ccc{(p,q,r)}, \ccc{q} may not lie on the arc. +\ccPrecond{\ccc{p}, \ccc{q}, and \ccc{r} are not collinear.}} + \ccAccessFunctions \ccThree{SphericalKernel::Circular_arc_point_3}{ca.is_x_monotone()}{} \ccThreeToTwo -\ccMethod{SphericalKernel::Circle_3 supporting_circle();}{} +\ccMethod{Circle_3 supporting_circle();}{} -\ccMethod{SphericalKernel::Circular_arc_point_3 source();}{} +\ccMethod{Circular_arc_point_3 source();}{} \ccGlue -\ccMethod{SphericalKernel::Circular_arc_point_3 target();}{} +\ccMethod{Circular_arc_point_3 target();}{} When the methods \ccc{source} and \ccc{target} return the same point, then the arc is in fact a full circle. %\footnote{so far, arcs of zero length are diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_point_3.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_point_3.tex index f55e2eafd48..80dd5c7f36d 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_point_3.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Circular_arc_point_3.tex @@ -12,7 +12,7 @@ \ccThree{Circular_arc_point_3}{ca.is_x_monotone()}{} \ccThreeToTwo -\ccConstructor{Circular_arc_point_3(const SphericalKernel::Point_3 &q)}{} +\ccConstructor{Circular_arc_point_3(const Point_3 &q)}{} \ccConstructor{Circular_arc_point_3(const SphericalKernel::Root_for_spheres_2_3 &r)}{} diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsConstructors.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsConstructors.tex index a187220f0e8..08371b56396 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsConstructors.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsConstructors.tex @@ -9,7 +9,11 @@ A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Plane_3 operator() - (SphericalKernel::Polynomial_1_3);} + (const SphericalKernel::Circular_arc_3 &a);} +{Constructs the plane containing the arc.} + +\ccMemberFunction{SphericalKernel::Plane_3 operator() + (const SphericalKernel::Polynomial_1_3 &p);} {Constructs a plane from an equation.} \ccSeeAlso @@ -27,8 +31,8 @@ A model \ccVar\ of this type must provide: A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Sphere_3 operator() - (SphericalKernel::Polynomial_2_3);} -{Constructs a circle from an equation.} + (const SphericalKernel::Polynomial_2_3 &p);} +{Constructs a sphere from an equation.} \ccSeeAlso @@ -45,7 +49,11 @@ A model \ccVar\ of this type must provide: A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Line_3 operator() - (SphericalKernel::Polynomials_for_lines_3);} + (const SphericalKernel::Line_arc_3 &s);} +{Constructs the line containing the segment.} + +\ccMemberFunction{SphericalKernel::Line_3 operator() + (const SphericalKernel::Polynomials_for_lines_3 &p);} {Constructs a line from an equation.} \ccSeeAlso @@ -59,7 +67,11 @@ A model \ccVar\ of this type must provide: A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Circle_3 operator() - (SphericalKernel::Polynomials_for_circles_3);} + (const SphericalKernel::Circular_arc_3 &a);} +{Constructs the circle containing the arc.} + +\ccMemberFunction{SphericalKernel::Circle_3 operator() + (const SphericalKernel::Polynomials_for_circles_3 &p);} {Constructs a circle from an equation.} \ccSeeAlso @@ -88,12 +100,11 @@ A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Line_arc_3 operator() (const SphericalKernel::Line_3 &l, - const SphericalKernel::Circular_arc_point_3 &p1, - const SphericalKernel::Circular_arc_point_3 &p2);} + const SphericalKernel::Circular_arc_point_3 &p, + const SphericalKernel::Circular_arc_point_3 &q);} {Constructs the line segment supported by \ccc{l}, whose source -is \ccc{p1} and whose target is \ccc{p2}. -\ccPrecond{\ccc{p1} and \ccc{p2} lie on \ccc{l}. -\ccc{p1} and \ccc{p2} are different.}} +is \ccc{p} and whose target is \ccc{q}. +\ccPrecond{\ccc{p} and \ccc{q} lie on \ccc{l} and are different.}} %\ccMemberFunction{SphericalKernel::Line_arc_3 operator() % (const SphericalKernel::Line_3 &l, @@ -106,8 +117,8 @@ is \ccc{p1} and whose target is \ccc{p2}. {} \ccMemberFunction{SphericalKernel::Line_arc_3 operator() - (const SphericalKernel::Point_3 &p1, - const SphericalKernel::Point_3 &p2);} + (const SphericalKernel::Point_3 &p, + const SphericalKernel::Point_3 &q);} {} \end{ccRefFunctionObjectConcept} @@ -122,12 +133,11 @@ A model \ccVar\ of this type must provide: \ccMemberFunction{SphericalKernel::Circular_arc_3 operator() (const SphericalKernel::Circle_3 &c, - const SphericalKernel::Circular_arc_point_3 &p1, - const SphericalKernel::Circular_arc_point_3 &p2);} + const SphericalKernel::Circular_arc_point_3 &p, + const SphericalKernel::Circular_arc_point_3 &q);} {Constructs the circular arc supported by \ccc{c}, whose source and target -are respectively \ccc{p1} and \ccc{p2}. -\ccPrecond{\ccc{p1} and \ccc{p2} lie on \ccc{c}. \ccc{p1} and \ccc{p2} -are different.}} +are respectively \ccc{p} and \ccc{q}. +\ccPrecond{\ccc{p} and \ccc{q} lie on \ccc{c} and they are different.}} The circular arc constructed from a circle, a source, and a target, is defined as the set of points of the circle that lie between the source @@ -138,6 +148,20 @@ In this definition, we say that a plane is \textit{positive} if its equation is of the form $ax+by+cz+d=0$ with $(a,b,c)>(0,0,0)$ (i.e. $(a>0) || (a==0) \&\& (b>0) || (a==0)\&\&(b==0)\&\&(c>0)$). +\ccConstructor{SphericalKernel::Circular_arc_3 operator() + (const SphericalKernel::Point_3 &p, + const SphericalKernel::Point_3 &q, + const SphericalKernel::Point_3 &r);} +{Constructs an arc that is supported by the circle of type + \ccc{SphericalKernel::Circle_3} passing through the points \ccc{p}, + \ccc{q} and \ccc{r}. The source and target are respectively \ccc{p} + and \ccc{r}, when traversing the supporting circle in the + counterclockwise direction in the \textit{positive} plane containing + the circle. + Note that, depending on the orientation of the point triple + \ccc{(p,q,r)}, \ccc{q} may not lie on the arc. +\ccPrecond{\ccc{p}, \ccc{q}, and \ccc{r} are not collinear.}} + \end{ccRefFunctionObjectConcept} \begin{ccRefFunctionObjectConcept}{SphericalKernel::ConstructCircularMinVertex_3} diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsOtherConstructions.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsOtherConstructions.tex index d072fbb145d..d65cda87abf 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsOtherConstructions.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/GeomFunctorsOtherConstructions.tex @@ -14,36 +14,3 @@ In addition, an object \ccVar\ of this type must provide: {Returns the sphere having the supporting circle of \ccc{a} as diameter.} \end{ccRefFunctionObjectConcept} -\begin{ccRefFunctionObjectConcept}{SphericalKernel::ConstructSupportingPlane_3} - -\ccCreationVariable{fo} - -An object \ccVar\ of this type must provide: - -\ccMemberFunction{SphericalKernel::Plane_3 - operator()(const SphericalKernel::Circular_arc_3 & c);} -{Returns the plane containing the arc.} - -\end{ccRefFunctionObjectConcept} -\begin{ccRefFunctionObjectConcept}{SphericalKernel::ConstructSupportingLine_3} - -\ccCreationVariable{fo} - -An object \ccVar\ of this type must provide: - -\ccMemberFunction{SphericalKernel::Line_3 - operator()(const SphericalKernel::Line_arc_3 & l);} -{Returns the line containing the segment.} - -\end{ccRefFunctionObjectConcept} -\begin{ccRefFunctionObjectConcept}{SphericalKernel::ConstructSupportingCircle_3} - -\ccCreationVariable{fo} - -An object \ccVar\ of this type must provide: - -\ccMemberFunction{SphericalKernel::Circle_3 - operator()(const SphericalKernel::Circular_arc_3 & c);} -{Returns the circle containing the arc.} - -\end{ccRefFunctionObjectConcept} diff --git a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Line_arc_3.tex b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Line_arc_3.tex index ae918a5199c..bedb62252f9 100644 --- a/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Line_arc_3.tex +++ b/Circular_kernel_3/doc_tex/Circular_kernel_3_ref/Line_arc_3.tex @@ -12,38 +12,38 @@ \ccThree{Circular_arc_point_3}{ca.is_x_monotone()}{} \ccThreeToTwo -\ccConstructor{Line_arc_3(const SphericalKernel::Line_3 &l, - const SphericalKernel::Circular_arc_point_3 &p1, - const SphericalKernel::Circular_arc_point_3 &p2)} +\ccConstructor{Line_arc_3(const Line_3 &l, + const Circular_arc_point_3 &p1, + const Circular_arc_point_3 &p2)} {Construct the line segment supported by \ccc{l}, whose source is \ccc{p1}, and whose target is \ccc{p2}. \ccPrecond{\ccc{p1} and \ccc{p2} lie on \ccc{l}. \ccc{p1} and \ccc{p2} are different.}} -\ccConstructor{Line_arc_3(const SphericalKernel::Line_3 &l, - const SphericalKernel::Point_3 &p1, - const SphericalKernel::Point_3 &p2)} +\ccConstructor{Line_arc_3(const Line_3 &l, + const Point_3 &p1, + const Point_3 &p2)} {Same.} -\ccConstructor{Line_arc_3(const SphericalKernel::Segment_3 &s)} +\ccConstructor{Line_arc_3(const Segment_3 &s)} {} \ccAccessFunctions -\ccThree{SphericalKernel::Circular_arc_point_3}{ca.is_x_monotone()}{} +\ccThree{Circular_arc_point_3}{ca.is_x_monotone()}{} \ccThreeToTwo -\ccMethod{SphericalKernel::Line_3 supporting_line();}{} +\ccMethod{Line_3 supporting_line();}{} -\ccMethod{SphericalKernel::Circular_arc_point_3 source();}{} +\ccMethod{Circular_arc_point_3 source();}{} \ccGlue -\ccMethod{SphericalKernel::Circular_arc_point_3 target();}{} +\ccMethod{Circular_arc_point_3 target();}{} -\ccMethod{SphericalKernel::Circular_arc_point_3 min();} +\ccMethod{Circular_arc_point_3 min();} {Constructs the minimum vertex according to the lexicographic ordering of coordinates.} \ccGlue -\ccMethod{SphericalKernel::Circular_arc_point_3 max();} +\ccMethod{Circular_arc_point_3 max();} {Same for the maximum vertex.} \ccQueryFunctions