Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem with intersection

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem with intersection


Chronological Thread 
  • From: Vahid Azizi <>
  • To:
  • Subject: Re: [cgal-discuss] Problem with intersection
  • Date: Fri, 11 Nov 2016 14:22:34 -0500
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:aDQNkB2QKpx4BKLHsmDT+DRfVm0co7zxezQtwd8ZseMeKvad9pjvdHbS+e9qxAeQG96KsLQc1aGP6fqocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbQhFgDSwbaluIBi3ogndq9cajZV/Iast1xXFpWdFdf5Lzm1yP1KTmBj85sa0/JF99ilbpuws+c1dX6jkZqo0VbNXAigoPGAz/83rqALMTRCT6XsGU2UZiQRHDg7Y5xznRJjxsy/6tu1g2CmGOMD9UL45VSi+46ptVRTnjzoJNyMi8GHPlMN/kL5brhympxx62YHUYYeVP+d6cq7Sed4WQGxMVdtTWSNcGIOxd4kAD+QBM+hWrIfzukUAogelCAa2GO/i0CVFimPq0aA41ekqDAHI3BYnH9ILqHnbo8/6NKcTUe+o0aLF0TTCb/JX2Df89YPFdQ4hruuWUb1qcMvRyEguFwLeg1WfrIzqJTKV1uAXv2eH6OpgUPuihmg6oA9/pTivw90jiojPho8NxVDE8iJ5wIkxJdKmUkJ0fdmkEJ5IuyGbMYt2WMIiTHtytCY00L0KoYK0fCcQx5Qj3RLfbOaHc4eO7xn+V+iROS91iGx5dL+7nRq/8kitxvfiWsWp3ltGtDdJn9vQun0Lyhfd8NKISuFn8UekwTuP1x7c6uVDIU0skKrUMZ8hwropmpsTqkvPAjb6mEvrgKKUakko4Oeo6+PgYrXpop+TKZV4hR35MqQrgsC/AOI4PRYSX2WD5+iwyLnu8Vf6TbhKlPE6jLTVvZ7AKcgGpKO1HxdZ0oM55Ba+Czem3s4YnX4CLF9dZhKIlZLlNEvPIfD5DPa/gk+hkDhux//cP73hBo/BIWTEkLfkZbp98VJTyBIvzdBD4JJZEq0OIP3pVU/1rdDXEx45MxeozOb6E9V9zZgTWXmPA6+cKKPdq0WE5uMpI+mWZY8aoizxK/Y/562msHkihFVIfbW1xYBFLzejD/F+KgOYZ2Dti5EPCyARrw8mRavrjlOFFjVcbnL3U6Mn7SwgE9GbC5zeTNWtnKCZx3X8WYZHY3hPTFGKC3bhMYueHOwdbTqbZc5nnDtDXreoT8ot1AqlqRThmIdhNffery0EqYr4hp8y/PzWjRh09DpuDs3b3XvKVHBxhmpPRjk42+d0rkV5j1uCyqNlmOcLKdsG7PxAVkI2NIXX0vdhI9H0QAPIONmTG3i8RdDzPzgxT9556s0PcUc1T8uryBnR3jirK7AQnr2PQpcz9/SPjDDKO89hxiOeh+EahF48T54TZGA=

Thank you so much Sebastien, it is solved!

On Fri, Nov 4, 2016 at 2:29 AM, Sebastien Loriot (GeometryFactory) <> wrote:
You can iterator over vertices using
[nef.vertices_begin(), nef.vertices_end()[


http://doc.cgal.org/latest/Nef_3/classCGAL_1_1Nef__polyhedron__3.html#af91bdaaa2b4324250d1bc15a38d30787

You can also get access to the half-facets:
[nef.halffacets_begin(), nef.halffacets_end()[

http://doc.cgal.org/latest/Nef_3/classCGAL_1_1Nef__polyhedron__3.html#a92eca2af31def19d96363904ce95881b

Sebastien.

On 11/04/2016 12:44 AM, Vahid Azizi wrote:
Sorry again! no, i don't want to calculate the symmetric difference.
I just want to calculate the difference, for clarification i uploaded
another image
<https://drive.google.com/file/d/0B6aDrBbewOPBSkJKOHkzSW1vVXc/view?usp=sharing>
which shows what i want. The bold black part which marked with an arrow
is the part that i want to extract if there is any.

do you have any suggestion for raised issue with explained method in
earlier email?

Also i tried another way with nef_polyhedron, first i create  convex
hull for my two point sets, then convert them to nef_polyhedron and
apply difference operator over them, the code
<https://docs.google.com/document/d/1HKOlX4bWXEaJX3lmmwGtt67b07nu22yyPkJJ192iJko/edit?usp=sharing>
is uploaded here. i want to convert back the result of nef_polyhedron to
polyhedron but i get error about preconditions. I tried sample code in
the CGAL doc and the result nef couldn't pass is_simple() function. I
need just the vertices of extracted part. does not passing is_simple()
function mean the result of operator is not correct? if it is correct,
 is there any way to get the vertices even without converting back to
polyhedron?

Thank you so much!

Best,
Vahid


On Thu, Nov 3, 2016 at 9:43 AM, Sebastien Loriot (GeometryFactory)
< <mailto:>> wrote:


    Sorry, it is still not clear to me what you want to do.
    I don't know if you want to compute the symmetric difference
    or something else.

    Sebastien.

    On 11/02/2016 07:00 AM, Vahid Azizi wrote:

        Sorry, i tried to keep the message so short. anyway, I am doing
        following steps:

        1) I have some points which they are supposed to be a
        polyhedron, It is
        the result by delaunry triangulation over these points: polyhedron
        <https://drive.google.com/file/d/0B6aDrBbewOPBUTlZaHlSYmsxWkE/view?usp=sharing
        <https://drive.google.com/file/d/0B6aDrBbewOPBUTlZaHlSYmsxWkE/view?usp=sharing>>

        2) i have another set of points which they are supposed to be a
        plane,
        after delanury triangulation over this set I have: plane
        <https://drive.google.com/file/d/0B6aDrBbewOPBSUlVdTdlUUl2XzQ/view?usp=sharing
        <https://drive.google.com/file/d/0B6aDrBbewOPBSUlVdTdlUUl2XzQ/view?usp=sharing>>

        3) in last step i want to find the subsurface of the plane which
        is not
        in intersection with polyhedron. My idea here is to iterate over all
        triangles and keep all intersection points in a list, then i can
        create
        a convex hull out of intersection points. So, i have the subsurface
        which is in intersection with polyhedron. I did these steps for
        another
        purpose before and it works. I didn't try to extract the subsurface
        which is not in intersection but there must be a way for that.

        Now, the problem is with explained idea as you see in this image
        <https://drive.google.com/file/d/0B6aDrBbewOPBV2J2VktfUEFpN0U/view?usp=sharing
        <https://drive.google.com/file/d/0B6aDrBbewOPBV2J2VktfUEFpN0U/view?usp=sharing>>,
        intersection function doesn't return any intersection points for
        upper
        red triangle(upper part of the plane) . But there are two
        intersection
        points for down red triangle which are marked with blue star. As
        i spent
        some time for finding the reason it seems the problem is this
        triangle
        doesn't have any intersection with edges of triangles in
        polyhedron. I
        think if i could change the resolution of triangulation i could
        solve
        this problem. If i have more fined triangles in polyhedron with high
        probability there will be intersection with their edges. As i
        searched
        it seems there is not any option for modifying resolution of
        triangulation. Also the fig file for this issue is uploaded here
        <https://drive.google.com/file/d/0B6aDrBbewOPBR1RtVUE5ZkZVUE0/view?usp=sharing
        <https://drive.google.com/file/d/0B6aDrBbewOPBR1RtVUE5ZkZVUE0/view?usp=sharing>>,
        maybe it could give you better view.

        My questions are:

        Is there any better way to find the subsurface of the plane
        which is not
        in intersection with polyhedron? Here just assume i have to two 3D
        polyhedrons which i want to find the part which doesn't have
        intersection.

        if there is not any better way, how could i solve the current issue?

        Thanks in advance,
        Best,



        On Tue, Nov 1, 2016 at 3:36 AM, Sebastien Loriot (GeometryFactory)
        < <mailto:>
        <mailto: <mailto:>>> wrote:

            It is not clear (at least to me) what you are trying to do.
            What are you looking for? An intersection function for 2
        triangle soups?
            A 3D constrained triangulation?

            Sebastien.

            On 11/01/2016 03:40 AM, Vahid Azizi wrote:

                Hi all,

                I have a geometry volume and a plane(their vertices),
        the Delaunry
                triangulation is applied on both of them(their
        vertices). For the
                geometry volume i get 16 facets and for the plane i get two
                facets. I
                need to find intersection between these two. It seems in
        some
                case the
                plane which is inside the volume doesn't have
        intersection with any
                facets of volume. I searched for changing resolution of
                triangulation
                but it seems there is not such a option. I've attached
        an image
                which
                depicts the situation and also a fig file which you can
        rotate
                the image
                to see what is the problem. The blue stars are intersection
                points for
                down red triangle.

                images:

        https://drive.google.com/drive/folders/0B6aDrBbewOPBR2gwTE5JZm4yNnc?usp=sharing
        <https://drive.google.com/drive/folders/0B6aDrBbewOPBR2gwTE5JZm4yNnc?usp=sharing>

        <https://drive.google.com/drive/folders/0B6aDrBbewOPBR2gwTE5JZm4yNnc?usp=sharing
        <https://drive.google.com/drive/folders/0B6aDrBbewOPBR2gwTE5JZm4yNnc?usp=sharing>>

                Is there anything that i can do, maybe with resolution
        or with
                intersection or do i need to go with another approach?

                Thanks in advance!

                Best,
                --
                /Vahid/



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





        --
        /Vahid/



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





--
/Vahid/


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





--
Vahid



Archive powered by MHonArc 2.6.18.

Top of Page