Subject: CGAL users discussion list
List archive
- From: Sebastien Loriot <>
- To:
- Subject: Re: [cgal-discuss] Prune loops from self intersecting curves
- Date: Fri, 22 Jan 2021 12:59:04 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:h/XMxBZEe+j+8KL8an8nbCT/LSx+4OfEezUN459isYplN5qZps26bB7h7PlgxGXEQZ/co6odzbaP4ua5Bydbv97B6ClELMUTEUddyI0/pE8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUoHdgN6q2O+s5pbdfxtHhCanYbN1MR66sRjdutMZjId/Lqs90AbFr3pHd+lYxG5jOFafkwrh6suq85Nv7iZdt+g9+8JcVKnxYrg1Q6FfADk6KW4++dfltQPETQuB53scVnsZnx9VCAXb7x/0Q4n8vDLiuuVyxCeVM8v2TaspWTu59KdkVAXoiCYcODEn9mzcl9F9g7haoBKloBx/3pLUbYSIP/dwYq/RYdUXTndHU81MVSJOH5m8YpMSAeQfM+ZWr4rzqVUAohSxBwajGOzhxyRUhnL1x6A2z/gtHA/E0QEmAtkAsG7UrNLwNKoKTO660rLHwi/Yb/NK2Dfy9o7IeQ0nr/GLR7JwcM3RyVUyHA7ClVWQrYvlPymU1uQKr2iX9e9gVea0hm4orgF+uDmvxsM2hobVgYIVz0nJ+CNky4k6OdO2UlR0YcK4EJROrSGaMZN7T808Tm9ouys2178LtJCmcCYK1JkqyRDRZ+KGfoWG4R/vSfucLzd3in9lZL+yhRi8/0igxOP8WMe4zFlHojdGn9TKq3sD2RvT6s2dRft8+EeswSyA2BzJ5uFFJUA4jaXbK589wr4wi5ocql7PETPxmEXzlKOWd0Mk+vKp6+v9eLnmqIWcOolpgQ/9KqQjgtKzDfg8PwQUXGWW+f6w2KD98UD6WrlHjvI7nrHHvJ/AOcgXu6u0DBFJ3ok57huzESuq3MkdkHQJNl1JZg6Lgo3nO1zBPf/0EPKyj0mynDpp3P/LO7/sDojDI3TflbruY6hx5FJAxAc10NtR/YhbCqsbL/L2QkLxtMLXDhs+MwGsxuboEtR91ocHVWOBB6+VLbresVGI6+8gOeWMa4gVuDHyK/gh+fHil2M2mVgYfaWx3JsXbm63Huh+LkmHfXbhhs0NHGQKswYkUeDmll6PXSRTanu9R6484ys0CIOiDYfNXICth7mB0T+gHp1SYWBGEFGMEXD0d4meXvcMbDmfIsBkkjMeVLihT5Ut2g2ptA//07ZnNPbb+jUEtZL/09h4//HclR4o+jxwFsiSzmCNT3pokWMVXD82x7tyoVd9y1eGyah3meZUFd1V5/NTUwc1L4TQz+JgC4O6ZwTaY93cSEq6Ws70RnYqX9cpypkPZVx8EpOslFfYzi+yCvgUkbKMQ5c7+6aZ03nqLNtm0CX70rI8hWUrUtcaNXG6nrUtsE/IFovRmgOYkbyrfOISxmnW5WKbxC2Puk9fFwV/WKGAUXEEbVbNtofF4RbJQLaqTLgmKQBc0tWqK61Qa9Svg08Vau3kPYHlbmi4gHuxCBDA4rSWbY32MzEG2CLHCU8Y1QUX1XmDPAk6QCympjSNX3RVCVvzbha0oqFFo3ShQxpsll3YXwhaz7OwvyUtq7mEUfpKh+ALvS4gr3N/G1Pvh4uLWerFnBJoeeBnWf144FpD0jiE5Ql0P5jlMKU7w1BDL0J4uETh0xgxAYJFw5Bz/SEaiTFqIKfd62tvMjaR3JT+ILrSczCg8xWmaqqQ0Vbbgo+b
I think in the arrangement book:
http://acg.cs.tau.ac.il/cgal-arrangement-book
there is some code to fix self-intersecting polygons using winding numbers.
The code of the example is also available at the URL above.
Best,
Sebastien.
On 1/21/21 6:10 PM, Dov Grobgeld ( via cgal-discuss Mailing List) wrote:
Hi all,
In my efforts to deal with a large variety of fonts in my text to glyph generator, https://github.com/dov/pomelo <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!
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/21/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Sebastien Loriot, 01/22/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/23/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/23/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/23/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Sebastien Loriot, 01/25/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/23/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Dov Grobgeld, 01/23/2021
- Re: [cgal-discuss] Prune loops from self intersecting curves, Sebastien Loriot, 01/22/2021
Archive powered by MHonArc 2.6.19+.