Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature
Chronological Thread
- From: Marc Glisse <>
- To:
- Subject: Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature
- Date: Fri, 26 Feb 2016 16:11:01 +0100 (CET)
On Fri, 26 Feb 2016, Frédérik Paradis wrote:
You could look at Search_traits_3 (there may be better examples in CGAL, I
just picked the first one I found). It handles the difference through
typedefs.
IIRC, I tried that but I got strange compilation errors in Ipelet_base
because I think the way it instantiates some object like Iso_retangles and
circles.
Try harder? That is the most natural way in CGAL. If you have trouble with it, maybe you can ask here with specific code. Maybe there is a real obstruction that prevents from using this solution here, but you would likely be asked to explain it before integrating code that uses a different strategy.
One common trick is to compare the square of distances instead of the
distances directly, to avoid square roots. Something like d^2 >= s^2*r^2.
But the get d, I have get the distance between the two circles and
substract the radius of the circles.
The code you showed has:
(distance_vw - 2.*max_rad) > s*max_rad
which I can rewrite:
distance_vw > (s+2)*max_rad
and I can square both sides.
Sure, in some cases removing the square roots can be harder, but it is doable.
--
Marc Glisse
- [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/16/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/16/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Sebastien Loriot (GeometryFactory), 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Marc Glisse, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Marc Glisse, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Andreas Fabri, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Marc Glisse, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/27/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Marc Glisse, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
- Re: [cgal-discuss] Questions on architecture of CGAL with respect to adding a feature, Frédérik Paradis, 02/26/2016
Archive powered by MHonArc 2.6.18.