I am trying to implement a mesh generation algorithm. I am representing Delaunay tetrahedralization using CGAL::Delaunay_triangulation_3
class.
In one stage of the algorithm(section 7: Facet recovery), I have a Delaunay tetrahedralization(say DT0
), I need to create a cavity(or hole)C
inside the Delaunay tetrahedralization(thereby transforming it to say DT1
) and fill it again with new tetrahedrons by performing Delaunay tetrahedralization(say DT2
) on the vertices of the cavity. Resulting tetrahedralization need not be purely Delaunay(i.e, it may have some cells not satisfying empty sphere criteria). More details on why such cavity needs to be created and refilled again are mentioned below in the context section.
Question:
Is it possible in CGAL to create such a cavity inside an existing Delaunay tetrahedralization and fill it with another tetrahedralization?
Relevent details:
- Cavity
C
is a polyhedron with all of its facets shared with that of cells inDT0
. DT2
does not represent complete Delaunay tetrahedralization of vertices ofC
. It contains only those tetrahedrons which are insideC
, rest of the tetrahedrons are discarded.- I find this question to be somewhat related to mine but that is still unsolved.
Context:
The purpose for creating the cavity and refilling it is the following:
Algorithm(mentioned above) is for computing a constraint preserving Delaunay tetrahedralization. Input to the algorithm is a set of vertices,segments(a segment connects 2 vertices) and facets(in my case these are triangles) given as constraints that must be preserved in the final tetrahedralization. In this question, I am discussing about implementation of facet preservation part of the algorithm. To recover any missing constraint facet in the final tetrahedralization, algorithm creates a cavity and refills it with tetrahedrons(or cells) in such way that combination of the facets of some of these cells recover the constraint facet(i.e., f1+f2+...+fn=f
where f1,f2..fn
are facets of some newly created cells in the cavity and f
is the constraint facet, or in other words, f1,f2..fn
are sub-facets of f
) in the output tetrahedralization. Output tetrahedralization is called Constrained Delaunay tetrahedralization in literature and it may or may not be Delaunay.
My attempt:
Currently, I do not find any relevant CGAL class to directly solve this issue so I am thinking of doing the following:
- Representing initial Delaunay tetrahedralization
DT0
usingCGAL::Delaunay_triangulation_3
. - Computing cavity
C
insideDT0
following the algorithm and representingC
as a separatePolyhedron_3
object. Remaining set of tetrahedrons are collectively denoted byDT1
. - Computing Delaunay tetrahedralization
DT2'
of the vertices ofC
. - Selecting cells from
DT2'
(as per algorithm) to computeDT2
. - Finally, merging
DT1
andDT2
. Since both share facets ofC
(guaranteed by the algorithm), so they can be connected in principle.
Right now I am thinking of representing DT1
and DT2
as std::list<Tetrahedron_3>
object but how to merge them to create a tetrahedralization?