Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Methods to remove degenerate segments of a Polygon_2?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Methods to remove degenerate segments of a Polygon_2?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Methods to remove degenerate segments of a Polygon_2?
  • Date: Mon, 22 Aug 2016 17:17:10 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:mS0QRhe/y/7YfsO26v1sdL2RlGMj4u6mDksu8pMizoh2WeGdxc69Yh7h7PlgxGXEQZ/co6odzbGH6ua7AyRAuc/H6yFaNsQUFlcssoY/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbtr8FoOatcmrzef6o8SVOFQRwmHnKfMqdVPt/F2X7pFXyaJZaY8JgiPTpXVJf+kEjUhJHnm02yjG28Gr4ZR4+D5Rsf9yv+RJUKH9YrhqBecAVGduYCgJ45jguhDHCAeO/XABSX4+kxxSAgGD4gupcI32t36wjed30TKGPMDwBZQzQzWl8+8rZxLvjSobLS8X+WrLjdZhzegT9AmloAZ+xJKSZYW9O/93f6ebdtQfEzkSFv1NXjBMV9vvJ7AECPAMaL5V
  • Organization: GeometryFactory

On 08/12/2016 12:58 PM, Pol Monsó Purtí wrote:
Is there a method to remove the repeated vertices on a Polygon_2?

What happens if I remove them within a circulator? Should I substract
one to the circulator?

Is it better to build a new polygon and then copy-construct the original
one?
To be safe you must increment the iterator before remove the previous one.

Something like:
polygon.erase(vit++);

Sebastien.



Archive powered by MHonArc 2.6.18.

Top of Page