Subject: CGAL users discussion list
List archive
- From: Menelaos Karavelas <>
- To:
- Subject: Re: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h
- Date: Tue, 9 Aug 2011 08:38:21 +0300
- Authentication-results: MX-IN-11.forthnet.gr ; spf=neutral
- Authentication-results: MX-IN-11.forthnet.gr ; sender-id=neutral
This draw method is not intended to write segments on the screen (or in more
general in ascii mode), but rather to a graphical stream, in which case
sending spaces does not make any sense (and in that sense it is not a bug).
If you really need to get a polyline approximation to the parabolic arc, then
I would propose to write another method that sends the polyline to an
std::ostream. Do you really need the polyline approximation in your
application? I could add this functionality to the Parabola_2 class.
- m.
On 9 Aug 2011, at 08:25, John Carter wrote:
> Greetings,
>
> As a first time CGAL user, I'd like to greet the users and thank the
> community for this great piece of software.
>
> While sifting through the code to build a polygonal medial axis transform
> using a Segment_delaunay_graph, I noticed what appears to be a bug in one
> of the draw functions.
>
> I am using CGAL 3.8, Visual Studio 10.0 Premium, and Windows 7 with the
> Filtered_kernel, and Simple_cartesian<double> coordinates.
>
> The function for drawing a parabolic edge segment to a stream does not
> properly output a space, causing adjacent line segments to be merged into
> the stream incorrectly. An example of the buggy output for an edge:
>
> 79.4211 133.286 79.4211 133.28679.4211 133.286 63.5996 134.11363.5996
> 134.113 58
>
> As can be seen, "133.28679.4211" should read "133.286 79.4211".
>
> Although there might be a better way to do it, I implemented a simple fix
> which seems to work:
>
> In Parabola_segment_2.h line 155 in the draw(Stream& W) function:
>
> The line was changed from:
>
> W << Segment_2(p[i], p[i+1]);
>
> To :
>
> W << Segment_2(p[i], p[i+1]) << " ";
>
> I'm not entirely sure why a space is output between some of the coordinates
> and not others, but this fixed the problem for me. I thought it would be
> worth pointing out if other people have had problems with this in the past.
>
> Regards,
> John Carter
> GeoDigital International Corp.
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
- [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h, John Carter, 08/09/2011
- Re: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h, Menelaos Karavelas, 08/09/2011
- RE: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h, John Carter, 08/09/2011
- Re: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h, Menelaos Karavelas, 08/09/2011
Archive powered by MHonArc 2.6.16.