# Problem with intersection

7 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Problem with intersection

 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: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
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Problem with intersection

 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> > 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
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Problem with intersection

 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: polyhedron2) i have another set of points which they are supposed to be a plane, after delanury triangulation over this set I have: plane3) 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, 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, 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) 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 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 -- Vahid
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Problem with intersection

 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 > > > 2) i have another set of points which they are supposed to be a plane, > after delanury triangulation over this set I have: plane > > > 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 > , > 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 > , > 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) > <[hidden email] > 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>         > >         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>     > > > > > > -- > /Vahid/ -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Problem with intersection

 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 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 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,VahidOn Thu, Nov 3, 2016 at 9:43 AM, Sebastien Loriot (GeometryFactory) 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 2) i have another set of points which they are supposed to be a plane, after delanury triangulation over this set I have: plane 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 , 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 , 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) <[hidden email] > 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                 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     -- /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
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Problem with intersection

 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#af91bdaaa2b4324250d1bc15a38d30787You 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#a92eca2af31def19d96363904ce95881bSebastien. 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 > > 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 > > 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) > <[hidden email] > 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 >                 > > >         2) i have another set of points which they are supposed to be a >         plane, >         after delanury triangulation over this set I have: plane >                 > > >         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 >                 >, >         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 >                 >, >         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) >         <[hidden email] >         >> 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>         > >                 > > >                 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>         >                     > > > > > > >         -- >         /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/ -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss