Subject: CGAL users discussion list
List archive
- From: Damian Sheehy <>
- To:
- Subject: Re: [cgal-discuss] Non convex 2D mesh generation
- Date: Sat, 11 Jul 2009 09:10:08 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=n8VjrLqJGrOa9F/JKoP2eW22z+zAY46PFjD8LPp4RNT6Wi6E4KhpALMICV6OIlLEd0 reT6LMeJltnoEdOS/u1rqO7RO1QnhyiuifPxHGa7Oe/Cj1nusPwYEFI8FBJvSMrsZuQh KWGHlPqDCIzs1LmK8KOsiYRH+HtPJgM3EuAqQ=
Hi Gil,
You have to write your own function to classify interior/exterior triangles, and it's very straightforward.
1) Start at a triangle attached to the infinite vertex and mark it as outside.
2) Visit each neighbouring triangle that does not have a classification. If you cross a constrained edge in getting to the neighbor flip the in/out classification and assign it to the neighbour.
3) Repeat until all triangles have been classified.
(In step 1 you could find all triangles attached to the infinite vertex and classify them as outside in one swoop)
This algorithm assumes your constraints defined closed boundaries that respect the Jordan curve theorem.
It's always tempting to use recursion to implement a seed-fill algorithm like this. If you do, it will "blow the stack" for a large mesh; e.g. your L-shape filled with a million elements ought to do the trick.
Best regards,
Damian
On Fri, Jul 10, 2009 at 12:38 PM, Gil Hoffer <> wrote:
Hi,
I'm working on some academic project, and I'd like to generate a 2D triangular mesh using the CGAL meshing package (with Constrained Delaunay Triangulation).
Unfortunately, when trying to create the mesh for a non-convex area, I get triangles which are outside the area I want to mesh (see attached image as example).
Is there a way to tell the meshing procedure not to do that?
thank you!
Gil
- [cgal-discuss] Non convex 2D mesh generation, Gil Hoffer, 07/10/2009
- Re: [cgal-discuss] Non convex 2D mesh generation, Shuchu Han, 07/11/2009
- Re: [cgal-discuss] Non convex 2D mesh generation, Shuchu Han, 07/11/2009
- Re:[cgal-discuss] Non convex 2D mesh generation, sanlington, 07/11/2009
- Re: [cgal-discuss] Non convex 2D mesh generation, Damian Sheehy, 07/11/2009
- Re: [cgal-discuss] Non convex 2D mesh generation, Shuchu Han, 07/11/2009
Archive powered by MHonArc 2.6.16.