Subject: CGAL users discussion list
List archive
- From: Monique Teillaud <>
- To:
- Subject: Re: [cgal-discuss] Intersection between segment and polygon
- Date: Thu, 28 Jul 2016 11:02:46 +0200
On 28 Jul 2016, at 10:31, Pol Monsó Purtí <> wrote:
CGAL::intersect and do_intersect take segments, rays, squares... but not polygon_2.
And the reverse for Polygon_2 intersection functions, who only takes polygons.How do you usually solve this, iterating over the segments of the polygon + checking if the ends are inside?
Alternatively, if you want to use the intersection function of polygons, you can also create another polygon from the two vertices of the segment, then intersect the two polygons. Not sure about efficiency (I don’t precisely know how the intersection of 2 polygons is implemented).
--
Monique Teillaud
https://members.loria.fr/Monique.Teillaud/
INRIA Nancy - Grand Est, LORIA
Institut National de Recherche en Informatique et Automatique
https://members.loria.fr/Monique.Teillaud/
INRIA Nancy - Grand Est, LORIA
Institut National de Recherche en Informatique et Automatique
- [cgal-discuss] Intersection between segment and polygon, Pol Monsó Purtí, 07/28/2016
- Re: [cgal-discuss] Intersection between segment and polygon, Monique Teillaud, 07/28/2016
- Re: [cgal-discuss] Intersection between segment and polygon, Pol Monsó Purtí, 07/28/2016
- Re: [cgal-discuss] Intersection between segment and polygon, Monique Teillaud, 07/28/2016
Archive powered by MHonArc 2.6.18.