Skip to Content.
Sympa Menu

cgal-discuss - Polygon and Labeled X-Monotone Curves

Subject: CGAL users discussion list

List archive

Polygon and Labeled X-Monotone Curves


Chronological Thread 
  • From:
  • To:
  • Subject: Polygon and Labeled X-Monotone Curves
  • Date: Thu, 6 Mar 2008 13:15:49 +0100

Hi,

I’m trying to use labeled x-monotone curves (defined in Minkowski Sums
package) to keep some information on my polygon's edges.

I have no problem to manipulate Labeled_curve, but when I construct a
General_Polygon_2 with these Labeled Curves, my label info dissapear...

Is there anything I can do to keep info with each edge of a polygon ?


Extract of my test file :

// Create labeled curves with segments or circular arcs
[…]

std::cout << labelCurveTst3.label().component() << std::endl;
// Displays “2” --> OK

// Create my polygon from labeled curves
Labeled_curve_2 labelcurves2[] = { labelCurveTst1, labelCurveTst2,
labelCurveTst3, labelCurveTst4 };
General_polygon_2 pgn(labelcurves2, labelcurves2+4);

Curve_const_iterator k;
Labeled_curve_2 labelCurve1;

k = pgn.curves_begin();
k++;
k++;
labelCurve1 = *k;

std::cout << labelCurve1.label().component() << std::endl;
// Displays “0” --> pb !?

[…]

Best Regards,

Gaetan



Archive powered by MHonArc 2.6.16.

Top of Page