Subject: CGAL users discussion list
List archive
- From: Sebastien Loriot <>
- To:
- Subject: Re: [cgal-discuss] Prune loops from self intersecting curves
- Date: Mon, 25 Jan 2021 16:55:01 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:8fSqYhW4B2URu7hW+0S+hr4Fy27V8LGtZVwlr6E/grcLSJyIuqrYZRWHtadThVPEFb/W9+hDw7KP9fy5CCpaut3d7DhCKMUKC0Zaz51O3kQJO42sMQXDNvnkbig3ToxpdWRO2DWFC3VTA9v0fFbIo3e/vnY4ExT7MhdpdKyuQtaBx8u42Pqv9JLNfg5GmCSyYa9oLBWxsA7dqtQajZFtJ6oszhbFuGVEdupZyW5nKl+YghLw6tut8JJ5/ClcpvAs+9RcXanmeqgzUKBVAikhP20p/sPgqAPNTRGI5nsSU2UWlgRHDg3Y5xzkXZn/rzX3uPNl1CaVIcP5Q7Y0WS+/76hwUx/nlD0HNz8i/27JjMF7kb9Wrwigpxx7xI7UfZ2VOf9jda7TYd8WWWxMVdtXWidcAI2zcpEPAvIcM+hGoYnzp1gAoxWwCgajBuzg1jBGi2Tq3aA5yektDR3K0QIiEt8IrX/arM/1NKAXUe2t0afH0y7MYOlN2Tfh6YjHbBYhquyKU7J3a8rRyE4vFx/YhViXsozlOzSV1v4Ms2ic8+psT+evi2o8pgF+pzig3MYsio3Tio0JzVDE8Dx0zYAoLtK3VEB1e8SrEIdMty6ELYt2RNsvTm92tSg6ybAKpJy2cSYXxJon2xPSZfKJf5aJ7x/tV+udPCp1inJqdr+/mxu/80auxO38WMe03lhGsiVInsTPu30Lyhfd5M+HSv5n8Ueg3zaCzxrc5f1eLUA1karXM5Ehwr8slpoTrETMBTX6l1nxjK+Tbkkk++6o6/7mYrr8vJOcOZV0hwfjOaotgsyyGfo0PhQKUmSB+umx1Kfv8VPnTLlXlPE7nabUvIjEKcsBuqK1HgpY3Zg/5xmlCjqqzsgUkWQCIV9LYh2LkZTlNlTKLf/mEfuyg1GhnClwyP/bPrDsB5TAI3bCnbj6eLtw705RxQ4xwN1Z+plaEKsOIOjpVU/0rNHYDgE2Mwizw+v/DdVyzIIeWWaWDq6XKqPerEaE5uwgLuSDfoMVtzH9K/8q5/7qk3A1g0MSfa6s3ZcPaXC4GOppI1mBbHbyntsMFX0Gswk+QeDwllGOTyNfa2y9Uq8z/j07DZipDYbHRoCjmryB2yK7E4VNZmBCDVCMC3bod4KYW/sWbSKSJtRskjMBVbe7So8h0QuiuxP9y7piNubU4DEXtYr/1Nhp4O3ejQ099TNuAMSZym2CUmB0nngUSD8rx6B/uldwykyD0Kh9m/xXD8Zf5/JPUgcgNJ7T1fZ2C97oWlGJQ9GSVVzzQsm6GSpjCZUq0toWagB8Hc+jh1bNxW2xEroNnvuKApIztanT1ny0K8dmwGvdz/ociUI7SPdCJXHzhrJj7xOBQMnSgkCBnuCrc74d1WjD7iCY3G+WtQZZVgB3Fq7KVHRaakrNpsni/RD+SOqlBr0jdwdA0sWfMbBia9vzjFwASu2wFs7ZZjeKlm25HgqJy7XESI3wemIBlHHGDE8ekgcPu3OCHQc7Dyal5WnZCWo9RhrUf0rw/Lwm+zuARUguwlTSNhwz5/+O4hcQwMekZbYW17MAtj0mrmwtTlm41tPSTdGHolg4JfgOUZYG+F5CkFnhmUl9M5indf0wg1cfd0FopRqr2UkrTIpHlscuoTUhyw8gcfvEgmMETCuR2NXLApOSMnP7pUn9ZKvf21WY29GTqP8C
I guess the outer ccb you mention if of the polygon and not the
arrangement. IIRC, you have to keep only components that have a
winding number of exactly one.
Efi, do you confirm?
Best,
Sebasiten.
On 1/23/21 9:41 PM, Dov Grobgeld ( via cgal-discuss Mailing List) wrote:
Thanks! That helped, and indeed I'm able to use the winding number to get rid of the red loop in my previous post, which gets a negative winding number, and can easily be filtered. But I'm still stumped by another problem of arrangements.
Consider the following closed self intersecting path:
input.png
If I run the book example chapter6/polygon_repairing.png on the above path I get the following separated paths:
res.png
The green path is however still self intersecting! Why does the Arrangement return self intersecting paths in the outer_ccb? I guess I would have to access the holes of the unbounded face to get the non-intersecting outer curves. But will that work with the winding number class? I admit that I'm quite confused by this.
Thanks!
On Fri, Jan 22, 2021 at 1:59 PM Sebastien Loriot < <>> wrote:
I think in the arrangement book:
http://acg.cs.tau.ac.il/cgal-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>
> <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
<https://sympa.inria.fr/sympa/info/cgal-discuss>
>
-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
--
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+.