Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Corefinement and boolean operations with 2D polygons

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Corefinement and boolean operations with 2D polygons


Chronological Thread 
  • From: Sebastien Loriot <>
  • To:
  • Subject: Re: [cgal-discuss] Corefinement and boolean operations with 2D polygons
  • Date: Wed, 25 May 2022 00:10:53 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-data: A9a23:6CVbfqP9D4vqI3DvrR2VkcFynXyQoLVcMsEvi/4bfWQNrUp20zJWm mEeX26BPv+CYTagftlxat+y9U1TvsOAn9FnT3M5pCpnJ55ogZqcVI7Bdi8cHAvLc5adFBo/h yk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EsLd9IR2NYy24DkWV/V4 rsenuWGULOb824sWo4rw/nbwP9flKyaVOQw4zTSzdgS1LPvvyF94KA3fcldHFOkKmVgJdNWc s6YpF2PEsw1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXe345jXMfwZ3u7hB2vr9FSx /NrsqfuF1oyHvT9yP1EaUlxRnQW0a1uoNcrIFC6uM2XilLcKj7in64oA0YxMokVvO1wBAmi9 9RCcGFLPk3F3bjvhu7gIgVvrpxLwM3DJ4cYoHBn0XfcCd4pRJnCR+PB4towMDIY3Z8fQKePP ptxhTxHYEvHeiFWA0YtI7k+p832wVbuKWJYtwfAzUYwyzGLkFYZPKLWGNHac9jPScROlVuDv Urd7mHhC1cbMsaewHyL6BqRavTnmCr6XMcNDuT9+KIxxlKUwWMXBVsdUl7TTeSFZlCWfeJeC EMy3C0V8/Zv72zyf4nkBifoiSvR1vIDYOZ4H+o/4QCL76Pb5QeFG2QJJgKtjvR25afaohR6h je0c8PV6S9H6+LKFCrMnluAhXbjZnhPdD5qiTosFFNdu7HeTJcPYgUjp+uP/Yawh9zxXC7qm nWE8HN4iLIUgsoGka68+DgrYg5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YLKiezLgGPAkHDL7mAKTDRpqO/KaqhVb1divlVvBysq H6aFUHkJDGKizjuUVimL+hNiCiROBEWtpu6d15hDm3qTdSubRPeUpc/lTot3bg9nW/HL0YZO Dl4NlxX9/iesXgejfJ4FGhMqHFiKKjMmiqU6fXZNodDsfZvBXcR9aoS63A7xr1JqSBcEaYty W2C85g0+QjgzrLcr1gvGABDoTtKmo+R6EBrOKGDs4JFRW6B5hUGq2OZFxUNodJhTNzpoaFZj NbVx8eRYH9P9czZ+cwECo3aMsWCZTA6NR3zGTnISg4BZTGuPGDbwUdalbvBkx/d5oh/sZXql JcUH/VDU0cpE/oBFkl/NNkLIZMyQSl91LDH14gH4n2xqBSXT8Jf9MOiNLraEbDkLzCXiqNBb h0DzObjLIgdAYb83lRrdlhwmImi86/4UtVEoyknZQgx8h0lGJdWQWg62kajYQSosiZ7/R+cm xc3jk5he71o+mu3pVgwIVXOqW07l0xjwb3Y
  • Ironport-sdr: nCp1l91H1elcI+H/0yqrlNpKUYdxXy5VDrThSM7F1Llo5fCBUolXJUNOwH3j9gVRjUzMnjG5/3 ynPYOJI/w02Dg5cMqbPAb49siahQS/7NQ8+uUKKoaz1MdF3y4t7Vix74248TGXz1kgcbCJmprA NhFPKPkxKVuLPqBbDxaYel9kd8honJeYzkMMtfdwYHdBwMFnijMvnaaEs2NOkVDOm9qOI63Tzp MxIEgmRo3z8FSyqfa5EiNiIc7Ipu/xsPIYFZAXjKDZhKZWw56dRmQ8GIeMV3caOysNPqcJvAHr Ps80qDCZaAOaxeLq1WfM5Kex

Not sure about that function but clip() should do what you expect.

Sebastien.

On 5/24/22 23:39, Marco Feder ( via cgal-discuss Mailing List) wrote:
Hi,

I need to ask something more about this. I have a surface mesh describing the
unit cube [0,1]^3 and another one describing the square [0.5,1.5]^2. Is
PMP::corefine_and_compute_intersection() supposed to work and find the
intersection between the two? So far it works *only* when the 2D square clips
the cube (as Andreas said), for instance with something like [-1.5,1.5]^2.
However, I’m wondering if there’s a way to get the intersection also in the
present case.

Best regards,
Marco

On 17 May 2022, at 12:04, Sebastien Loriot <> wrote:

Yes.
Also the example from this PR could also be a solution:
https://github.com/CGAL/cgal/pull/6377


Sebastien.


On 5/17/22 11:49, Marco Feder ( via cgal-discuss Mailing List)
wrote:
Thanks Sebastien. Okay, that’s clear now. So, the only viable option is to use
https://doc.cgal.org/latest/Boolean_set_operations_2/index.html
<https://doc.cgal.org/latest/Boolean_set_operations_2/index.html> , right ?
Best,
Marco
On 17 May 2022, at 11:38, Sebastien Loriot <
<>> wrote:

What Andreas meant is that you can clip using a 2D polygon but pure 2D
Boolean operations will not work with this function.

Best,

Sebastien.

On 5/17/22 11:03, Marco Feder ( <> via
cgal-discuss Mailing List) wrote:
Thanks Andreas for your prompt reply. I tried the simplest possible example,
with two squares. The intersection is not performed, even if the second
clearly splits the first one and I don’t understand what is the issue here.
Am I missing something?
See the attached mwe.
Best,
Marco
On 17 May 2022, at 09:53, Andreas Fabri <
<> <
<>>> wrote:

What is important is that the quadrilateral splits the ball

andreas

On 5/17/2022 9:48 AM, Marco Feder ( <>
< <>> via cgal-discuss Mailing List)
wrote:
Hi,

I’m currently applying PMP::corefine_and_compute_boolean_operations() to
handle boolean operations between 3D (closed) surface meshes. Is this
supposed to work with 2D objects, too? For instance, I have two Surface_Mesh
describing a ball and a quadrilateral and I need their intersection. To my
understanding, the issue here is that those two are not *closed*, hence
corefine_and_compute_boolean_operations should not work. Is that correct?

If so, the only option I see is to use
https://doc.cgal.org/latest/Boolean_set_operations_2/index.html
<https://doc.cgal.org/latest/Boolean_set_operations_2/index.html>
<https://doc.cgal.org/latest/Boolean_set_operations_2/index.html
<https://doc.cgal.org/latest/Boolean_set_operations_2/index.html>> , but I’d like to
hear your opinion about this.


Best regards,
Marco



--
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>
<https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>>

--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

--
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>
<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
<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

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss







Archive powered by MHonArc 2.6.19+.

Top of Page