Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] is_at_open_boundary() problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] is_at_open_boundary() problem


Chronological Thread 
  • From: Eric Berberich <>
  • To:
  • Subject: Re: [cgal-discuss] is_at_open_boundary() problem
  • Date: Sat, 26 Sep 2009 10:55:09 +0200

Sterpa wrote:
I'm trying to compile this line:

if(e.target().is_at_infinity()) x = e.target().point().x()-1;

and get this error:

CGAL::I_Filtered_iterator<CGAL::CGALi::In_place_list_iterator<CGAL::Arr_vertex<CGAL::Arr_vertex_base<CGAL::Point_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_halfedge_base<CGAL::Arr_linear_object_2<CGAL::Simple_cartesian<double>
, CGAL::Arr_face_base>,
std::allocator<CGAL::Arr_vertex<CGAL::Arr_vertex_base<CGAL::Point_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_halfedge_base<CGAL::Arr_linear_object_2<CGAL::Simple_cartesian<double>
, CGAL::Arr_face_base> > >,
CGAL::Arrangement_on_surface_2<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_unb_planar_topology_traits_2<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_default_dcel<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
::_Is_concrete_vertex,
CGAL::Arrangement_on_surface_2<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_unb_planar_topology_traits_2<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
,
CGAL::Arr_default_dcel<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>
::Vertex, int, std::bidirectional_iterator_tag>’ has no member named
‘is_at_infinity’

I read that this method has been replaced by is_at_open_boundary(), but I've
not found a way to write the equivalent statement without get some kind of
error. How can I solve it?

Thanks in advance. Best regards.--

Hi,

you mean a runtime error?

The point is:

if (e.target().is_at_open_boundary())

should do the job, but

x = e.target().point().x() - 1;

if e.target() is at an open boundary, it's not possible to access a point there (as there is none). In case open boundary is infinity in x-direction, I also doubt what "oo - 1" is. In case you consider a vertical asymptote check whether you can access that x-information from e.curve().

eriC



Archive powered by MHonArc 2.6.16.

Top of Page