Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Prune loops from self intersecting curves

Subject: CGAL users discussion list

List archive

[cgal-discuss] Prune loops from self intersecting curves


Chronological Thread 
  • From: Dov Grobgeld <>
  • To:
  • Subject: [cgal-discuss] Prune loops from self intersecting curves
  • Date: Thu, 21 Jan 2021 19:10:32 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:oI7MAx+VzNxXkf9uRHKM819IXTAuvvDOBiVQ1KB32+IcTK2v8tzYMVDF4r011RmVBNSdsq4P1Lee8/i5HzBZvtDZ6DFKWacPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3wOgVvO+v6BJPZgdip2OCu4Z3TZBhDiCagbb9oIxi6sAHcutMLjYZtJao8yBvEqWZMd+hK2G9kP12ekwv+68uq4JJv7yFcsO89+sBdVqn3Y742RqFCAjQ8NGA16szrtR3dQgaK+3ARTGYYnAdWDgbc9B31UYv/vSX8tupmxSmVJtb2QqwuWTSj9KhkVhnlgzoaOjEj8WHXjstwjL9HoB+kuhdyzZLYbJ2TOfFjeK7WYNEUSndbXstJWCNPAo2yYYgSAeQfIelVtJP9q0cUoBakGQWgGOHixzlVjXH2x6061OEhHBnI0gwnAdIFrXXarM/yNKgJXuC60q3IwijeZP5RxDj975bIfgouofGWWrJ/asXRxlcrFwzYlViQponlMCmU1uQJqWSU8+1gVee2hmMhtgp+rSShyN02hYnVmoIa1ErE9SNhzYsrOdG2R0F1bMKmHZVfuC+XM5d6T8w8T2xqtis0xaAKtIC7ciUUx5or2h3SZv6GfoWU7BzuSOKcLDhkiH9qer+ygQu5/0anyu35TMa00VBKozJKktnNqnAN1wHT5dOdRvRh+Ueh3DCC3B3Q5OFcOU04i7bXJpo7zrMzlpcfq1rPEjHrlEnskaObdVgo9+614Or9eLrmvIWTN4pshwH+LKsunsu/DPw9MgcUXmib/f2w1KPg/UHkWblKgOA6n6rEvJzAKsQboam5AwBR0ok98RqwEzCm0NEAkXkGKlJKZg6HgpD3N13SJP30F/SyjlS2nDt12fzKI6ftDojOI3TeiLvheKxy609YyAo919Bf4JdUB6kcL/L0RE/9rtPYDgU+MwOvzOboFtF92Z4FVGKAB6+WKqLSsVuS6u0zJOmMYZcZuCzhJPg9+/7ukXg5lEcBcqmmx5QXbGm0EelnI0WCfXXsn8wBEXwRswolTO3qjUWCXiRJa3azWaI8/DA7B5i8AYfNXID+yICGiSy0F5kTamFdAU2XCl/pcZ+FUrECcnG8OMhkxxADS/COUYgr2hyquEeux715aOXO/ScXuJbv/Ndw7uzX0xo18GonXIymz2iRQjQszSszTDgs0fUn+BEv+hK4yaF9xsdgO5lT6vdOCFloMJfdy6lkCIm3VFuRJ5GGT1GpRtjgCjY0HIpoko0+Jn1lEtDntSjtmi+jArsbjbuOXcVm/afV3ny3LMF4mS+fiPsRymI+S84KDlWIw7Zl/lGKVYHMmkSd0a2tcPZE0Q==

Hi all,

In my efforts to deal with a large variety of fonts in my text to glyph generator, https://github.com/dov/pomelo, have I encountered several cases of "bad" contours that I need to clean. One of the problems can be seen in the following figure:

foo.png
The input is the purple polyline on the left. My desired output are the blue and the green polylines on the right, while dropping the red polyline. My idea of how to do this was to use arrangements.After doing an arrangement, so I thought, the generated separated polylines, would keep the segment orientations of the input. Since I know the desired direction of the polyline, (I know whether I'm looking for an outer boundary or on a hole), I can drop polylines whose orientations are not as expected.

Unfortunately this doesn't work. I found that boundaries of the faces that Arrangement_2 generate are all the in the same direction.

Am I missing something?  How can I prune the red polyline?

Here are the input coordinates of the input as a svg d path:

m 457.2054,532.00482 -2.16634,-106.13373 2.48438,-79.73047 4.94872,-58.86624 15.90675,0.0928 -9.17579,50.94531 -7.96093,57.34766 -3.03516,15.03515 -5.07812,10.16406 -7.16537,4.46318 -9.10807,1.23214 8.85783,1.10863 7.45076,4.90699 5.07032,10.11328 3.01562,14.85157 8.83504,74.12725 z

Thanks!



Archive powered by MHonArc 2.6.19+.

Top of Page