Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Possible bug in Arrangement_on_surface_2::merge_edge (CGAL 3.4)

Subject: CGAL users discussion list

List archive

[cgal-discuss] Possible bug in Arrangement_on_surface_2::merge_edge (CGAL 3.4)


Chronological Thread 
  • From: Ben Supnik <>
  • To:
  • Subject: [cgal-discuss] Possible bug in Arrangement_on_surface_2::merge_edge (CGAL 3.4)
  • Date: Fri, 28 Aug 2009 21:07:51 -0400

Hi Y'all,

I think I may have found either a bug or an unstated condition for merge_edge...

Merge_edge picks one of the two half-edge-pairs to become the new consolidated edge when an edge-pair is merged.

From what I can tell, Merge_edge never recalculates the "direction()" cached value on the halfedges.

But...in some cases, merging the edges (which are not required to be colinear - imagine merging two lines when the underlying curve type is "poly-line") might cause the direction of the "recycled" halfedge to change it's direction. This causes the planar map to be invalid.

I'm not sure my fix is so great...I'm using Arr_accessor's declaration of the dcel halfedge type to cast my way into the dcel, where I can flip the direction manually.

Bug? Design limitation? Is there a better work-around?

cheers
Ben
--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list:

Developer mailing list:




Archive powered by MHonArc 2.6.16.

Top of Page