cgal icon indicating copy to clipboard operation
cgal copied to clipboard

write_polyline output incorrect result

Open 1833183060 opened this issue 3 years ago • 2 comments

Issue Details

cgal/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h line 36 :

os << xcv.number_of_subcurves(); // export the number of points.

Shouldn't the number of points be xcv.number_of_subcurves()+1 ?

Environment

  • CGAL version: 5.3 5.4

1833183060 avatar Jan 19 '22 09:01 1833183060

The comment is wrong. It should export the number of curves.


/_____/) o /_________ __ // (____ ( ( ( (/ (/-(-'_(/ _/

On Wed, 19 Jan 2022 at 11:19, 1833183060 @.***> wrote:

Issue Details

cgal/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h line 36 :

os << xcv.number_of_subcurves(); // export the number of points.

Shouldn't the number of points be xcv.number_of_subcurves()+1 ? Environment

  • CGAL version: 5.3 5.4

— Reply to this email directly, view it on GitHub https://github.com/CGAL/cgal/issues/6257, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVBNOAHFFDAHXFTAF54X2TUWZ6YJANCNFSM5MJL5TOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

efifogel avatar Jan 19 '22 10:01 efifogel

Hi, I would like to fix this documentation issue. I will update the comment in Polycurve_2_iostream.h to correctly state that it exports the "number of subcurves" instead of "points", as noted by @efifogel.

LOTUS9679 avatar Dec 04 '25 17:12 LOTUS9679