Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes


Chronological Thread 
  • From: "Ch'Gans" <>
  • To:
  • Subject: Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes
  • Date: Sun, 9 Apr 2017 03:04:01 +1200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:S5jgYxax9fG1TD6H12rTaNn/LSx+4OfEezUN459isYplN5qZoMyybnLW6fgltlLVR4KTs6sC0LuK9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6ybL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjE7/mHZisJ+gqFGrhy/uxNy2JLUbJ2POfZiYq/RYdEXSGxcVchRTSxBBYa8YpMBA+cfPeZUrIjzqEEIrRulCwWnGeTixSNIhn/5x6I61f8hHBrJ3AwmBd0CqnPUrM/6NKoLV+2+0afGzTLGb/xM2Df97pDFfQwuof6WWbJ8a83RyVMgFw7Dk16eqpTlMiuL2ugRt2WX9eltWOK1h2I5tg18oyKjytouh4TGgI8e10rK+j9jwIkvIN21UE57bsCgEJtXryyaMpF5QsImQ21xoSY61qEKtYe1fCQXypkqyATTa/OAc4iP7RLjUPieLS1ki3JifbKznxey8U6+xe3gTsS4zkpGoy5fntTPtn0BzQLf5tWGR/dn40us2zmC2xjW6u5eIEA0kaTbK4Qmwr41jpccrUTDHiDsl0Xwl6+bbUok+u2y5OTmZrXqvIOTN4hxig3mKKQhhtS/AfgkMggJR2WU5eu826fn/UHgXbpKj+Y2nbXEsJDBPsQWvbW5Ag9Q0oY78RmzFTam0NICnXkGNl1JYhyHj5K6c23Jdfv3BPP6j1W3mypw3NjHOKfgC9PDNCvtirDkKPxW6wFzwQwoh5gL7JJbA7caCP31Uwn2rtOOXUxxCBC93+uyUIY17YgZQ2/aWqI=

On 8 April 2017 at 09:01, Efi Fogel
<>
wrote:
> On 7 April 2017 at 15:56, Ch'Gans
> <>
> wrote:
>> On 31 March 2017 at 05:37, Efi Fogel
>> <>
>> wrote:
>> > Check out vertical decomposition; see
>> > http://doc.cgal.org/latest/Minkowski_sum_2/classCGAL_1_1Polygon__vertical__decomposition__2.html.
>>
>> Hi Efi,
>>
>> Is it me or it is not possible to apply the vertical decomposition to
>> general polygon with circle/segment edges?
>
>
> You are the first one to try it, and it has been developed to serve as the
> convex decomposition step of an implementation of the Minkowski sum
> operation, which supports only linear polygons, so you are probably right
> about this limitation.

[...]

>> Actually I am not even sure what exactly a '1 root' point is, does
>> that mean that it has coordinates expressed as 'a0 +a1*sqrt(r)' with
>> a0=0 and a1=1? If so then that is an interesting property that i might
>> be able to exploit.
>
>
> A one-root number is actually a Square_root_extension; see
> http://doc.cgal.org/latest/Number_types/classCGAL_1_1Sqrt__extension.html.
> It's a number represented as 'a0 + a1 * sqrt(a2)', where the type of a0, a1,
> and a2 are template parameters. a0 doesn't have to be 0. It turns out that
> this number type is sufficient for the circle-segment traits. This traits
> supports line segments and circular arcs, where the coefficients of the line
> segments must be rational. A vertical segment that has an endpoint with
> Square_root_extension coordinates does not necessarily have rational
> coordinates any longer, so I guess it is impossible to do it in an exact
> manner.

Thanks for the explanation, very much appreciated.

[...]

>> decomp() and vertical_decomposition() can be easily modified to work
>> with an arrangement based on Gps_circle_segment_traits_2, the only
>> blocker for me ATM is the add_vertical_segment()
>
>
> Yes, I think it's a real blocker.

I've just spent a few hours this after-noon on this, it all started with:
How does boolean set operations deal with that? Surely I can find a
piece of code in there that will teach me the tricks...
So I dug into the code, frantically looking for a line creating a new
segment out of 2 existing points, but never found one! ;)
I suddenly realised that my search was vain. The boolean set
operations don't need to do that, they "just" need predicates and
modifier functions such as split() and merge(), That's it, that's all
and it's beautiful! ;)
It reminds me of Chuck Norris jokes, one goes "Chuck Norris makes fire
by rubbing 2 ice cubes together" lol!

Chris



Archive powered by MHonArc 2.6.18.

Top of Page