Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Intersect Iso_rectangle_2 with Segment_2, both using projected kernel Gt = CGAL::Projection_traits_xy_3<portho::cgal_utils::K>

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: Fri, 29 Jul 2016 16:21:56 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:RRpwiBIFu1VguPgJQtmcpTZWNBhigK39O0sv0rFitYgUKfvxwZ3uMQTl6Ol3ixeRBMOAuqoC1bud7fyocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+kQsiM3o/pi6ibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKKx8zGJsIk+PzV6nvp/jtM0rzyMFsP0o84tMUL7xYr8jZb1eFjUvdW4vt+PxshyWdQyLrl4bVH6N2iJVGRRApEX+Wor3u238sfR08CafNMzyC7szXGLxvO9QVBb0hXJfZHYC+2bNh5kogQ==

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:

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.

I've tried defining Iso_rectangle_2 as

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




Archive powered by MHonArc 2.6.18.

Top of Page