Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Intersect Iso_rectangle_2 with Segment_2, both using projected kernel Gt = CGAL::Projection_traits_xy_3<portho::cgal_utils::K>
Chronological Thread
- From: Pol Monsó Purtí <>
- To:
- Subject: Re: [cgal-discuss] Intersect Iso_rectangle_2 with Segment_2, both using projected kernel Gt = CGAL::Projection_traits_xy_3<portho::cgal_utils::K>
- Date: Mon, 1 Aug 2016 18:12:43 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:uoFQqB8stAcQ0f9uRHKM819IXTAuvvDOBiVQ1KB90O0cTK2v8tzYMVDF4r011RmSDN2dtK8P2reempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47AblHf6ke/8SQVUk2mc1EkfqKqR8WD0oye7KObw9XreQJGhT6wM/tZDS6dikHvjPQQmpZoMa0ryxHE8TNicuVSwn50dxrIx06vrpT4wJk2+CtZv7ct9tVLTL7hV6U+V71RSjo8YE4v48i+jR7HBS6I4GCHGl0LiAbNS1zB6Az8V9H3tTXznuV40Siee8bxSOZnCnyZ8653RUqw2288PDkj/TSPhw==
Hello Laurent, thanks for the interest.
To my understanding the difference between Gt:: and K:: iso_rectangle_2s and Segment_2s is that they have a 3d coordinate stored. We could compute the 2d intersection of the plane-projected Iso_rectangle_2 and Segment_2 just as with the K kernel, ignoring the z coordinate. The intersection then would have an invalid z, (say 0), but that's fine with me.
I believe that's what the other 2d algorithms do. Refining a triangulation does that, for example. The 3d output is useless because it has many points at z=0, but in 2d is good.
I hope I understood your remark correctly.... I wasn't sure what you meant.
Cheers!
Pol
On Mon, Aug 1, 2016 at 5:43 PM, Laurent Rineau <> wrote:
That is not a bug. `CGAL::Projection_traits_xy_3` is not documented as a model of the `Kernel` concept, but only a model of a few concepts, used mostly by 2D triangulations.
http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Projection__traits__xy__3.html
Let's imagine we want to add that intersection functionality to it, how would you implement that intersection?
On 07/29/2016 04:21 PM, Pol Monsó Purtí wrote:
This won't compile:
CGAL::Iso_rectangle_2<Gt> isor;CGAL::Segment_2<Gt> seg;
auto result = CGAL::intersection(seg, isor);
with Gt = CGAL::Projection_traits_xy_3<K>
This will:
CGAL::Iso_rectangle_2<K> isor2;
CGAL::Segment_2<K> seg2;
auto result2 = CGAL::intersection(seg2, isor2);
On Fri, Jul 29, 2016 at 4:09 PM, Pol Monsó Purtí <> wrote:
How can I interesect an Iso_rectangle_2 and Segment_2 using CGAL::intersection() ? I get a lot of errors regarding its definition. I believe the most rellevant is:
Iso_rectangle_2 is not a member of CGAL::Projection_traits_xy_3<K>
At the intersection line I get the error:I've tried defining Iso_rectangle_2 as
cannot convert from 'const CGAL::Iso_rectangle_2<portho::cgal_utils::Gt>' to 'const CGAL::Bbox_3'
The Segment_2 comes from a CGAL::Polygon_2<Gt>::Segment_2.
CGAL::Iso_rectangle_2<Gt> as well as Gt::Iso_rectangle_2
CGAL::intersect() documentation says Iso_rectangle_2 and Segment_2 are accepted.
If I can't figure it out I'll just create a copy of the segment and the iso rectangle based on K instead of Gt
- Re: [cgal-discuss] Intersect Iso_rectangle_2 with Segment_2, both using projected kernel Gt = CGAL::Projection_traits_xy_3<portho::cgal_utils::K>, Laurent Rineau, 08/01/2016
- Re: [cgal-discuss] Intersect Iso_rectangle_2 with Segment_2, both using projected kernel Gt = CGAL::Projection_traits_xy_3<portho::cgal_utils::K>, Pol Monsó Purtí, 08/01/2016
Archive powered by MHonArc 2.6.18.