Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 2D constrained Delaunay triangulation using boolean opeartions

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 2D constrained Delaunay triangulation using boolean opeartions


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Cc: ppmm <>
  • Subject: Re: [cgal-discuss] 2D constrained Delaunay triangulation using boolean opeartions
  • Date: Wed, 9 Feb 2011 13:12:47 +0100
  • Organization: GeometryFactory

Le mardi 01 février 2011 01:20:57, ppmm a écrit :

> I studied the manual of 2D constrained Delaunay triangulation. It seems

> that the only way of defining the constraint is to manually add all edges.

> Is there a way of adding the solids resulting from the boolean operation

> introduced in the following chapter as the constraint?

>

> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Boolean_set_operatio

> ns_2/Chapter_main.html

>

> I attached an example to illustrate what I want to draw in the plane.

No. You need to iterate on the edges of polygons that are result of the boolean operation, to insert them in the 2D contrainted triangulation.

> Another question: can I assign properties for each region, such as the

> material index? Then, after the meshing operation, each triangle will

> automatically acquire its properties depending on its location. For

> example, in the attached figure, all meshes in the circle have material 1,

> and all meshes in the (hex-circle) have material 2, and the rest meshes'

> material is 3.

You can choose a base class for the Face type of the triangulation, to have fields to store whatever you want. The following class is a helper class that avoid to write your own base class:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2_ref/Class_Triangulation_face_base_with_info_2.html

For a concrete use of that clas, have a look at the subsubsection "add colors" in the following subsection:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Section_35.11

You need to combine that example with the code you use for meshing.

--

Laurent Rineau, PhD

R&D Engineer at GeometryFactory http://www.geometryfactory.com/

Release Manager of the CGAL Project http://www.cgal.org/




Archive powered by MHonArc 2.6.16.

Top of Page