CGAL 2D Triangulation: Get only inner triangles

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CGAL 2D Triangulation: Get only inner triangles

einherjer
I am using CGAL 4.13 to do some 2D triangulation of an outline (I am also a
total CGAL beginner). In my case some random data originally read from
GeoJSON:

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/hfx5w.png>

The triangulation is done exactly like mentioned in the CGAL user manual:
https://doc.cgal.org/latest/Mesh_2/index.html#title14

But when I fetch the triangles out of the *Mesher* (via
*mesher.triangulation()*), is do not only get the inner triangles but also
some "outer" triangles:

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/FJqnh.png>

Is there a way to get only the triangles matching to the original outlines?
Like this:

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/X6l4p.png>

Could you please guide me to some functionality in order to drop these
non-required triangles? Or am I using the completely wrong technique?

Thank you in advance.

Thomas




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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


Reply | Threaded
Open this post in threaded view
|

Re: CGAL 2D Triangulation: Get only inner triangles

andreas.fabri

Hello,

The face type of the triangulation has a member function

bool  is_in_domain () const
  returns true if this face is in the domain to be refined.

https://doc.cgal.org/latest/Mesh_2/classDelaunayMeshFaceBase__2.html#a42249ae38c23bf5b6aaf64db9975316c

Best,

Andreas


On 3/3/2019 12:16 PM, einherjer wrote:
I am using CGAL 4.13 to do some 2D triangulation of an outline (I am also a
total CGAL beginner). In my case some random data originally read from
GeoJSON:

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/hfx5w.png> 

The triangulation is done exactly like mentioned in the CGAL user manual:
https://doc.cgal.org/latest/Mesh_2/index.html#title14

But when I fetch the triangles out of the *Mesher* (via
*mesher.triangulation()*), is do not only get the inner triangles but also
some "outer" triangles:

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/FJqnh.png> 

Is there a way to get only the triangles matching to the original outlines?
Like this: 

<http://cgal-discuss.949826.n4.nabble.com/file/t376086/X6l4p.png> 

Could you please guide me to some functionality in order to drop these
non-required triangles? Or am I using the completely wrong technique?

Thank you in advance.

Thomas




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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

phone: +33.492.954.912    skype: andreas.fabri
Reply | Threaded
Open this post in threaded view
|

Re: CGAL 2D Triangulation: Get only inner triangles

einherjer
Hello,

thank you, that did the trick. So easy.


Thomas



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

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