Subject: CGAL users discussion list
List archive
- From: "Thomas Zangl - Home" <>
- To: <>
- Subject: Re:[cgal-discuss] Intersection of circles?
- Date: Fri, 25 May 2007 09:28:52 +0200
Am Thu, 24 May 2007 12:10:30 +0200, schrieb
<>:
Hi Monique!
Thank you for the answer.
>The 2D Circular Kernel provides intersections of circles and circular arcs.
>Note that the coordinates of these points (Circular_arc_point_2) are
>algebraic numbers.
I am now stuck with using "K::Intersect_2". This is my code:
// Arc is a std::vector<Circle_2>
std::vector<Arc>::iterator iterCircleOne;
for( iterCircleOne = ac.begin(); iterCircleOne != ac.end(); iterCircleOne++
) {
std::vector<Arc>::iterator iterCircleTwo;
for( iterCircleTwo = ac.begin(); iterCircleTwo != ac.end();
iterCircleTwo++ ) {
if (iterCircleOne == iterCircleTwo) {
continue;
}
Circular_k::Intersect_2 intersection;
CGAL::Object O;
intersection(iterCircleOne, iterCircleTwo, O);
IntersectionArc iArc;
IntersectionPoint iPoint;
if (O.assign(iArc)) {
std::cout << "got an arc " << std::endl;
} else if (O.assign(iPoint)) {
std::cout << "got a point " << std::endl;
} else {
std::cout << "got something else " << std::endl;
}
}
}
But it fails to compile (lot's of template errors) and I do not find
any proper example how to compute the intersection of a list of
circles. What is "best practice" to use Intersect_2?
Please help! :-)
Best regards,
--
----------------------------------------------------------------
,yours Thomas Zangl, Bakk.rer.soc.oec. -
-
- Freelancer - IT Consulting & Software Development -
- Student of Software Development-Economy (Master) -
- Re:[cgal-discuss] Intersection of circles?, Thomas Zangl - Home, 05/25/2007
- Re: [cgal-discuss] Intersection of circles?, Monique . Teillaud, 05/25/2007
- Re:[cgal-discuss] Intersection of circles?, Thomas Zangl - Home, 05/25/2007
- Re: [cgal-discuss] Intersection of circles?, Monique . Teillaud, 05/25/2007
Archive powered by MHonArc 2.6.16.