Subject: CGAL users discussion list
List archive
- From: John Carter <>
- To: "" <>
- Subject: RE: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h
- Date: Mon, 8 Aug 2011 23:06:25 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
Menelaos,
Ah, that makes sense. I was writing the graph segments out to a text file
and the Stream overload seemed to do the job well enough. I noticed the
other overload(Qt) was clearly related to graphically plotting the points, so
I should've taken a hint. I'm just abusing the Stream functions as a quick
and dirty way to dump data into a text file, I suppose. The behavior just
seemed inconsistent for text-based streams which is fine since that was never
their intended use. Writing an ostream& overload would definitely make sense
in this case and I have since modified the code to do so. Thanks for the
fast reply!
Regards,
JC
-----Original Message-----
From: Menelaos Karavelas
[mailto:]
Sent: Monday, August 08, 2011 10:38 PM
To:
Subject: Re: [cgal-discuss] BUG: CGAL 3.8 Parabola_segment_2.h
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
>
--
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.