rename to add "conforming"

This commit is contained in:
Laurent Rineau 2024-10-10 15:48:46 +02:00
parent 12e64b8eb5
commit 2cd3575376
23 changed files with 250 additions and 279 deletions

View File

@ -2,29 +2,29 @@
\ingroup PkgCT_3Concepts \ingroup PkgCT_3Concepts
\cgalConcept \cgalConcept
The concept `ConstrainedDelaunayTriangulationCellBase_3` refines the concept The concept `ConformingConstrainedDelaunayTriangulationCellBase_3` refines the concept
`TriangulationCellBase_3` and is the base cell class for `TriangulationCellBase_3` and is the base cell class for
the `CGAL::make_constrained_Delaunay_triangulation_3()` function template. the `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
\cgalRefines{TriangulationCellBase_3, BaseWithTimeStamp} \cgalRefines{TriangulationCellBase_3, BaseWithTimeStamp}
\cgalHasModelsBegin \cgalHasModelsBegin
\cgalHasModels{CGAL::Constrained_Delaunay_triangulation_cell_base_3} \cgalHasModels{CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3}
\cgalHasModelsEnd \cgalHasModelsEnd
\sa `ConstrainedDelaunayTriangulationVertexBase_3` \sa `ConformingConstrainedDelaunayTriangulationVertexBase_3`
*/ */
class ConstrainedDelaunayTriangulationCellBase_3 { class ConformingConstrainedDelaunayTriangulationCellBase_3 {
public: public:
/// @name Access Functions /// @name Access Functions
/// ///
/// The following functions return a reference to an object of type /// The following functions return a reference to an object of type
/// `CGAL::Constrained_Delaunay_triangulation_cell_data_3`, that contains /// `CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3`, that contains
/// the per-cell data required by the implementation of the /// the per-cell data required by the implementation of the
/// `CGAL::make_constrained_Delaunay_triangulation_3()` function template. /// `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
/// @{ /// @{
CGAL::Constrained_Delaunay_triangulation_cell_data_3& cdt_3_data(); CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data();
const CGAL::Constrained_Delaunay_triangulation_cell_data_3& cdt_3_data() const; const CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data() const;
/// @} /// @}
}; };

View File

@ -2,10 +2,10 @@
\ingroup PkgCT_3Concepts \ingroup PkgCT_3Concepts
\cgalConcept \cgalConcept
The concept `ConstrainedDelaunayTriangulationTraits_3` specifies the requirements The concept `ConformingConstrainedDelaunayTriangulationTraits_3` specifies the requirements
for the geometric traits class of the triangulation used as the first template for the geometric traits class of the triangulation used as the first template
parameter `Triangulation_3` in the function template parameter `Triangulation_3` in the function template
`CGAL::make_constrained_Delaunay_triangulation_3()`. `CGAL::make_conforming_constrained_Delaunay_triangulation_3()`.
\cgalRefines{DelaunayTriangulationTraits_3} \cgalRefines{DelaunayTriangulationTraits_3}
@ -14,9 +14,9 @@ parameter `Triangulation_3` in the function template
\cgalHasModelsBare{all %CGAL kernels} \cgalHasModelsBare{all %CGAL kernels}
\cgalHasModelsEnd \cgalHasModelsEnd
\todo Add the requirements in the concept `ConstrainedDelaunayTriangulationTraits_3`. \todo Add the requirements in the concept `ConformingConstrainedDelaunayTriangulationTraits_3`.
*/ */
class ConstrainedDelaunayTriangulationTraits_3 { class ConformingConstrainedDelaunayTriangulationTraits_3 {
public: public:
}; };

View File

@ -2,30 +2,30 @@
\ingroup PkgCT_3Concepts \ingroup PkgCT_3Concepts
\cgalConcept \cgalConcept
The concept `ConstrainedDelaunayTriangulationVertexBase_3` refines the concept The concept `ConformingConstrainedDelaunayTriangulationVertexBase_3` refines the concept
`TriangulationVertexBase_3` and is the base vertex class for `TriangulationVertexBase_3` and is the base vertex class for
the `CGAL::make_constrained_Delaunay_triangulation_3()` function template. the `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
\cgalRefines{TriangulationVertexBase_3, BaseWithTimeStamp} \cgalRefines{TriangulationVertexBase_3, BaseWithTimeStamp}
\cgalHasModelsBegin \cgalHasModelsBegin
\cgalHasModels{CGAL::Constrained_Delaunay_triangulation_vertex_base_3} \cgalHasModels{CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3}
\cgalHasModelsEnd \cgalHasModelsEnd
\sa `ConstrainedDelaunayTriangulationCellBase_3` \sa `ConformingConstrainedDelaunayTriangulationCellBase_3`
*/ */
class ConstrainedDelaunayTriangulationVertexBase_3 { class ConformingConstrainedDelaunayTriangulationVertexBase_3 {
public: public:
/// @name Access Functions /// @name Access Functions
/// ///
/// The following functions return a reference to an object of type /// The following functions return a reference to an object of type
/// `CGAL::Constrained_Delaunay_triangulation_vertex_data_3`, that contains /// `CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3`, that contains
/// the per-vertex data required by the implementation of the /// the per-vertex data required by the implementation of the
/// `CGAL::make_constrained_Delaunay_triangulation_3()` function template. /// `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
/// @{ /// @{
CGAL::Constrained_Delaunay_triangulation_vertex_data_3& cdt_3_data(); CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data();
const CGAL::Constrained_Delaunay_triangulation_vertex_data_3& cdt_3_data() const; const CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data() const;
/// @} /// @}
} }

View File

@ -22,11 +22,11 @@ Section on definitions here ...
The following example shows ... The following example shows ...
\cgalExample{Constrained_triangulation_3/constrained_Delaunay_triangulation_3.cpp } \cgalExample{Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3.cpp }
or from a polygon soup ... or from a polygon soup ...
\cgalExample{Constrained_triangulation_3/constrained_Delaunay_triangulation_3_from_soup.cpp } \cgalExample{Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3_from_soup.cpp }
*/ */
} /* namespace CGAL */ } /* namespace CGAL */

View File

@ -34,23 +34,23 @@
\cgalPkgDescriptionEnd \cgalPkgDescriptionEnd
\cgalClassifedRefPages \cgalClassifedRefPages
`CGAL::make_constrained_Delaunay_triangulation_3()` is the main function to create `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` is the main function to create
a constrained Delaunay triangulation in 3D, an instance of the class template a conforming constrained Delaunay triangulation in 3D, an instance of the class template
`CGAL::Constrained_Delaunay_triangulation_3`. `CGAL::Conforming_constrained_Delaunay_triangulation_3`.
\cgalCRPSection{Functions Templates} \cgalCRPSection{Functions Templates}
- `CGAL::make_constrained_Delaunay_triangulation_3()` - `CGAL::make_conforming_constrained_Delaunay_triangulation_3()`
\cgalCRPSection{Concepts} \cgalCRPSection{Concepts}
- `ConstrainedDelaunayTriangulationTraits_3` - `ConformingConstrainedDelaunayTriangulationTraits_3`
- `ConstrainedDelaunayTriangulationVertexBase_3` - `ConformingConstrainedDelaunayTriangulationVertexBase_3`
- `ConstrainedDelaunayTriangulationCellBase_3` - `ConformingConstrainedDelaunayTriangulationCellBase_3`
\cgalCRPSubsection{Class Templates} \cgalCRPSubsection{Class Templates}
- `CGAL::Constrained_Delaunay_triangulation_3<Traits, Triangulation>` - `CGAL::Conforming_constrained_Delaunay_triangulation_3<Traits, Triangulation>`
- `CGAL::Constrained_Delaunay_triangulation_vertex_base_3<Traits, Vertex_base>` - `CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits, Vertex_base>`
- `CGAL::Constrained_Delaunay_triangulation_cell_base_3<Traits, Cell_base>` - `CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<Traits, Cell_base>`
*/ */

View File

@ -1,7 +1,7 @@
/*! /*!
\example Constrained_triangulation_3/constrained_Delaunay_triangulation_3.cpp \example Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3.cpp
\brief A simple example of the use of the Constrained_triangulation_3 package. \brief A simple example of the use of the Constrained_triangulation_3 package.
\example Constrained_triangulation_3/constrained_Delaunay_triangulation_3_from_soup.cpp \example Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3_from_soup.cpp
\brief A simple example of the use of the Constrained_triangulation_3 package. \brief A simple example of the use of the Constrained_triangulation_3 package.
\example Constrained_triangulation_3/remesh_constrained_Delaunay_triangulation_3.cpp \example Constrained_triangulation_3/remesh_constrained_Delaunay_triangulation_3.cpp
\brief How to use `CGAL::tetrahedral_isotropic_remeshing` with a constrained Delaunay triangulation. \brief How to use `CGAL::tetrahedral_isotropic_remeshing` with a constrained Delaunay triangulation.

View File

@ -3,12 +3,12 @@ project(Constrained_triangulation_3_Examples)
find_package(CGAL REQUIRED COMPONENTS Qt6) find_package(CGAL REQUIRED COMPONENTS Qt6)
create_single_source_cgal_program(constrained_Delaunay_triangulation_3.cpp) create_single_source_cgal_program(conforming_constrained_Delaunay_triangulation_3.cpp)
create_single_source_cgal_program(constrained_Delaunay_triangulation_3_from_soup.cpp) create_single_source_cgal_program(conforming_constrained_Delaunay_triangulation_3_from_soup.cpp)
create_single_source_cgal_program(remesh_constrained_Delaunay_triangulation_3.cpp) create_single_source_cgal_program(remesh_constrained_Delaunay_triangulation_3.cpp)
if(CGAL_Qt6_FOUND) if(CGAL_Qt6_FOUND)
target_link_libraries(constrained_Delaunay_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(conforming_constrained_Delaunay_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer)
else() else()
message(STATUS "NOTICE: The example 'constrained_delaunay_triangulation_3' requires Qt6, and will not be compiled.") message(STATUS "NOTICE: The example 'conforming_constrained_Delaunay_triangulation_3' requires Qt6, and will not be compiled.")
endif() endif()

View File

@ -1,4 +1,4 @@
#include <CGAL/make_constrained_Delaunay_triangulation_3.h> #include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h> #include <CGAL/Surface_mesh.h>
#include <CGAL/draw_triangulation_3.h> #include <CGAL/draw_triangulation_3.h>
@ -21,12 +21,12 @@ int main(int argc, char* argv[])
std::cout << "Read " << mesh.number_of_vertices() << " vertices and " std::cout << "Read " << mesh.number_of_vertices() << " vertices and "
<< mesh.number_of_faces() << " faces" << std::endl; << mesh.number_of_faces() << " faces" << std::endl;
auto cdt = CGAL::make_constrained_Delaunay_triangulation_3(mesh); auto ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(mesh);
std::cout << "Number of vertices in the CDT: " std::cout << "Number of vertices in the CDT: "
<< cdt.triangulation().number_of_vertices() << '\n' << ccdt.triangulation().number_of_vertices() << '\n'
<< "Number of constrained facets in the CDT: " << "Number of constrained facets in the CDT: "
<< cdt.number_of_constrained_facets() << '\n'; << ccdt.number_of_constrained_facets() << '\n';
CGAL::draw(cdt.triangulation()); CGAL::draw(ccdt.triangulation());
} }

View File

@ -1,4 +1,4 @@
#include <CGAL/make_constrained_Delaunay_triangulation_3.h> #include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <vector> #include <vector>
#include <CGAL/draw_triangulation_3.h> #include <CGAL/draw_triangulation_3.h>
@ -22,12 +22,12 @@ int main(int argc, char* argv[])
std::cout << "Read " << points.size() << " vertices and " std::cout << "Read " << points.size() << " vertices and "
<< polygons.size() << " polygons" << std::endl; << polygons.size() << " polygons" << std::endl;
auto cdt = CGAL::make_constrained_Delaunay_triangulation_3(points, polygons); auto ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(points, polygons);
std::cout << "Number of vertices in the CDT: " std::cout << "Number of vertices in the CDT: "
<< cdt.triangulation().number_of_vertices() << '\n' << ccdt.triangulation().number_of_vertices() << '\n'
<< "Number of constrained facets in the CDT: " << "Number of constrained facets in the CDT: "
<< cdt.number_of_constrained_facets() << '\n'; << ccdt.number_of_constrained_facets() << '\n';
// CGAL::draw(cdt.triangulation()); CGAL::draw(ccdt.triangulation());
} }

View File

@ -1,7 +1,7 @@
#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE 1 #define CGAL_TETRAHEDRAL_REMESHING_VERBOSE 1
#define CGAL_TETRAHEDRAL_REMESHING_DEBUG 1 #define CGAL_TETRAHEDRAL_REMESHING_DEBUG 1
#include <CGAL/make_constrained_Delaunay_triangulation_3.h> #include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/tetrahedral_remeshing.h> #include <CGAL/tetrahedral_remeshing.h>
@ -12,11 +12,11 @@
#include <string> #include <string>
using K = CGAL::Exact_predicates_inexact_constructions_kernel; using K = CGAL::Exact_predicates_inexact_constructions_kernel;
using Vb = CGAL::Constrained_Delaunay_triangulation_vertex_base_3<K>; using Vb = CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<K>;
using Cb = CGAL::Constrained_Delaunay_triangulation_cell_base_3<K>; using Cb = CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<K>;
using Tds = CGAL::Triangulation_data_structure_3<Vb, Cb>; using Tds = CGAL::Triangulation_data_structure_3<Vb, Cb>;
using Tr = CGAL::Triangulation_3<K, Tds>; using Tr = CGAL::Triangulation_3<K, Tds>;
using CDT = CGAL::Constrained_Delaunay_triangulation_3<K, Tr>; using CCDT = CGAL::Conforming_constrained_Delaunay_triangulation_3<K, Tr>;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
@ -28,10 +28,10 @@ int main(int argc, char* argv[])
std::cerr << "Error: cannot read file " << filename << std::endl; std::cerr << "Error: cannot read file " << filename << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
CDT cdt = CGAL::make_constrained_Delaunay_triangulation_3<CDT>(mesh); CCDT ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3<CCDT>(mesh);
//! [move cdt to tr] //! [move ccdt to tr]
Tr tr = std::move(cdt).triangulation(); Tr tr = std::move(ccdt).triangulation();
//! [move cdt to tr] //! [move ccdt to tr]
std::cout << "Number of vertices in tr: " std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl; << tr.number_of_vertices() << std::endl;
CGAL::tetrahedral_isotropic_remeshing(tr, 0.1, CGAL::tetrahedral_isotropic_remeshing(tr, 0.1,
@ -39,5 +39,5 @@ int main(int argc, char* argv[])
std::cout << "Number of vertices in tr: " std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl; << tr.number_of_vertices() << std::endl;
// CGAL::draw(cdt.triangulation()); CGAL::draw(ccdt.triangulation());
} }

View File

@ -17,7 +17,7 @@
#include <CGAL/Constrained_triangulation_3/internal/config.h> #include <CGAL/Constrained_triangulation_3/internal/config.h>
#include <CGAL/Base_with_time_stamp.h> #include <CGAL/Base_with_time_stamp.h>
#include <CGAL/Constrained_Delaunay_triangulation_vertex_data_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h>
#include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h> #include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h>
#include <CGAL/Triangulation_segment_traverser_3.h> #include <CGAL/Triangulation_segment_traverser_3.h>
@ -193,10 +193,10 @@ protected:
// std::cerr << "- " << oformat(simplex, With_point_tag{}) << '\n'; // std::cerr << "- " << oformat(simplex, With_point_tag{}) << '\n';
if(simplex.dimension() == 0) { if(simplex.dimension() == 0) {
const auto v = static_cast<Vertex_handle>(simplex); const auto v = static_cast<Vertex_handle>(simplex);
v->cdt_3_data().set_on_constraint(c_id); v->ccdt_3_data().set_on_constraint(c_id);
if(prev != Vertex_handle{}) { if(prev != Vertex_handle{}) {
if(v != vb) { if(v != vb) {
v->cdt_3_data().set_vertex_type(CDT_3_vertex_type::STEINER_ON_EDGE); v->ccdt_3_data().set_vertex_type(CDT_3_vertex_type::STEINER_ON_EDGE);
constraint_hierarchy.add_Steiner(prev, vb, v); constraint_hierarchy.add_Steiner(prev, vb, v);
} }
add_to_subconstraints_to_conform(prev, v, c_id); add_to_subconstraints_to_conform(prev, v, c_id);
@ -472,10 +472,10 @@ public:
auto ancestors_of_Steiner_vertex_on_edge(Vertex_handle v) const { auto ancestors_of_Steiner_vertex_on_edge(Vertex_handle v) const {
std::pair<Vertex_handle, Vertex_handle> result; std::pair<Vertex_handle, Vertex_handle> result;
CGAL_precondition(v->cdt_3_data().is_Steiner_vertex_on_edge()); CGAL_precondition(v->ccdt_3_data().is_Steiner_vertex_on_edge());
CGAL_assertion(v->cdt_3_data().number_of_incident_constraints() == 1); CGAL_assertion(v->ccdt_3_data().number_of_incident_constraints() == 1);
const auto v_time_stamp = v->time_stamp(); const auto v_time_stamp = v->time_stamp();
const auto constraint_id = v->cdt_3_data().constraint_id(*this); const auto constraint_id = v->ccdt_3_data().constraint_id(*this);
const auto first = this->constraint_hierarchy.vertices_in_constraint_begin(constraint_id); const auto first = this->constraint_hierarchy.vertices_in_constraint_begin(constraint_id);
const auto end = this->constraint_hierarchy. vertices_in_constraint_end(constraint_id); const auto end = this->constraint_hierarchy. vertices_in_constraint_end(constraint_id);
std::cerr << "ancestors_of_Steiner_vertex_on_edge " << display_vert(v) << '\n'; std::cerr << "ancestors_of_Steiner_vertex_on_edge " << display_vert(v) << '\n';
@ -596,9 +596,9 @@ protected:
int li, lj; int li, lj;
const Cell_handle c = tr().locate(steiner_pt, lt, li, lj, hint); const Cell_handle c = tr().locate(steiner_pt, lt, li, lj, hint);
const Vertex_handle v = visitor.insert_in_triangulation(steiner_pt, lt, c, li, lj); const Vertex_handle v = visitor.insert_in_triangulation(steiner_pt, lt, c, li, lj);
v->cdt_3_data().set_vertex_type(CDT_3_vertex_type::STEINER_ON_EDGE); v->ccdt_3_data().set_vertex_type(CDT_3_vertex_type::STEINER_ON_EDGE);
if(lt != T_3::VERTEX) { if(lt != T_3::VERTEX) {
v->cdt_3_data().set_on_constraint(constraint); v->ccdt_3_data().set_on_constraint(constraint);
} }
constraint_hierarchy.add_Steiner(va, vb, v); constraint_hierarchy.add_Steiner(va, vb, v);
visitor.insert_Steiner_point_on_constraint(constraint, va, vb, v); visitor.insert_Steiner_point_on_constraint(constraint, va, vb, v);
@ -636,7 +636,7 @@ protected:
} }
Constraint_id constraint_from_extremities(Vertex_handle va, Vertex_handle vb) const { Constraint_id constraint_from_extremities(Vertex_handle va, Vertex_handle vb) const {
if(va->cdt_3_data().number_of_incident_constraints() == 0 || vb->cdt_3_data().number_of_incident_constraints() == 0) if(va->ccdt_3_data().number_of_incident_constraints() == 0 || vb->ccdt_3_data().number_of_incident_constraints() == 0)
{ {
return {}; return {};
} }
@ -679,12 +679,12 @@ protected:
return true; return true;
return false; return false;
}; // end lambda constraint_id_goes_to_vb }; // end lambda constraint_id_goes_to_vb
if (va->cdt_3_data().number_of_incident_constraints() == 1) if (va->ccdt_3_data().number_of_incident_constraints() == 1)
{ {
const Constraint_id c_id = va->cdt_3_data().constraint_id(*this); const Constraint_id c_id = va->ccdt_3_data().constraint_id(*this);
CGAL_assertion(c_id != Constraint_id{}); CGAL_assertion(c_id != Constraint_id{});
if(constraint_id_goes_to_vb(c_id)) return c_id; if(constraint_id_goes_to_vb(c_id)) return c_id;
} else if (expensive == true && va->cdt_3_data().number_of_incident_constraints() > 1) { } else if (expensive == true && va->ccdt_3_data().number_of_incident_constraints() > 1) {
boost::container::small_vector<Vertex_handle, 64> adj_vertices; boost::container::small_vector<Vertex_handle, 64> adj_vertices;
this->finite_adjacent_vertices(va, std::back_inserter(adj_vertices)); this->finite_adjacent_vertices(va, std::back_inserter(adj_vertices));
for(auto other_v: adj_vertices) { for(auto other_v: adj_vertices) {
@ -853,9 +853,9 @@ protected:
const auto vector_ab = vector_functor(pa, pb); const auto vector_ab = vector_functor(pa, pb);
if(reference_vertex->cdt_3_data().is_Steiner_vertex_on_edge()) { if(reference_vertex->ccdt_3_data().is_Steiner_vertex_on_edge()) {
CGAL_assertion(reference_vertex->cdt_3_data().number_of_incident_constraints() == 1); CGAL_assertion(reference_vertex->ccdt_3_data().number_of_incident_constraints() == 1);
const auto ref_constraint_id = reference_vertex->cdt_3_data().constraint_id(*this); const auto ref_constraint_id = reference_vertex->ccdt_3_data().constraint_id(*this);
const auto [ref_va, ref_vb] = constraint_extremities(ref_constraint_id); const auto [ref_va, ref_vb] = constraint_extremities(ref_constraint_id);
#if CGAL_CDT_3_DEBUG_CONFORMING #if CGAL_CDT_3_DEBUG_CONFORMING
std::cerr << " reference point is on constraint: " << display_vert(ref_va) std::cerr << " reference point is on constraint: " << display_vert(ref_va)

View File

@ -17,8 +17,8 @@
#include <CGAL/Constrained_triangulation_3/internal/config.h> #include <CGAL/Constrained_triangulation_3/internal/config.h>
#include <CGAL/Base_with_time_stamp.h> #include <CGAL/Base_with_time_stamp.h>
#include <CGAL/Constrained_Delaunay_triangulation_vertex_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_base_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_cell_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_3.h> #include <CGAL/Triangulation_vertex_base_3.h>
#include <CGAL/Triangulation_cell_base_3.h> #include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
@ -488,14 +488,14 @@ struct Output_rep<CGAL::internal::CC_iterator<DSC, Const>, With_point_and_info_t
std::ostream& operator()(std::ostream& out) const { std::ostream& operator()(std::ostream& out) const {
out << Time_stamper::display_id(this->it.operator->(), offset); out << Time_stamper::display_id(this->it.operator->(), offset);
if(this->it.operator->() != nullptr) { if(this->it.operator->() != nullptr) {
out << (this->it->cdt_3_data().is_Steiner_vertex_on_edge() ? "(Steiner)" : "") out << (this->it->ccdt_3_data().is_Steiner_vertex_on_edge() ? "(Steiner)" : "")
<< (this->it->cdt_3_data().is_Steiner_vertex_in_face() ? "(Steiner in face)" : "") << (this->it->ccdt_3_data().is_Steiner_vertex_in_face() ? "(Steiner in face)" : "")
<< "= " << this->it->point(); << "= " << this->it->point();
if(this->it->cdt_3_data().is_marked(CDT_3_vertex_marker::REGION_BORDER)) out << " (region border)"; if(this->it->ccdt_3_data().is_marked(CDT_3_vertex_marker::REGION_BORDER)) out << " (region border)";
if(this->it->cdt_3_data().is_marked(CDT_3_vertex_marker::REGION_INSIDE)) out << " (inside region)"; if(this->it->ccdt_3_data().is_marked(CDT_3_vertex_marker::REGION_INSIDE)) out << " (inside region)";
if(this->it->cdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY)) out << " (cavity vertex)"; if(this->it->ccdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY)) out << " (cavity vertex)";
if(this->it->cdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY_ABOVE)) out << " (vertex above)"; if(this->it->ccdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY_ABOVE)) out << " (vertex above)";
if(this->it->cdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY_BELOW)) out << " (vertex below)"; if(this->it->ccdt_3_data().is_marked(CDT_3_vertex_marker::CAVITY_BELOW)) out << " (vertex below)";
return out; return out;
} }
else else
@ -504,16 +504,16 @@ struct Output_rep<CGAL::internal::CC_iterator<DSC, Const>, With_point_and_info_t
}; };
template <typename T_3> template <typename T_3>
class Constrained_Delaunay_triangulation_3_impl; class Conforming_constrained_Delaunay_triangulation_3_impl;
#endif // not DOXYGEN_RUNNING #endif // not DOXYGEN_RUNNING
template <typename Traits, template <typename Traits,
typename Triangulation = typename Triangulation =
Triangulation_3<Traits, Triangulation_3<Traits,
Triangulation_data_structure_3<Constrained_Delaunay_triangulation_vertex_base_3<Traits>, Triangulation_data_structure_3<Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits>,
Constrained_Delaunay_triangulation_cell_base_3<Traits>>>> Conforming_constrained_Delaunay_triangulation_cell_base_3<Traits>>>>
class Constrained_Delaunay_triangulation_3; class Conforming_constrained_Delaunay_triangulation_3;
/*! /*!
* \ingroup PkgCT_3Classes * \ingroup PkgCT_3Classes
@ -522,27 +522,27 @@ class Constrained_Delaunay_triangulation_3;
* It contains a data member of type `Triangulation` and provides additional functionality for handling * It contains a data member of type `Triangulation` and provides additional functionality for handling
* polygonal constraints during the triangulation process. * polygonal constraints during the triangulation process.
* *
* \tparam Traits is the geometric traits class and must be a model of `ConstrainedDelaunayTriangulationTraits_3`. * \tparam Traits is the geometric traits class and must be a model of `ConformingConstrainedDelaunayTriangulationTraits_3`.
* \tparam Triangulation is the underlying triangulation class. * \tparam Triangulation is the underlying triangulation class.
* It must be an instance of the `CGAL::Triangulation_3` class template with the same `Traits` template parameter. * It must be an instance of the `CGAL::Triangulation_3` class template with the same `Traits` template parameter.
* Its `Vertex` type must be a model of `ConstrainedDelaunayTriangulationVertexBase_3`, * Its `Vertex` type must be a model of `ConformingConstrainedDelaunayTriangulationVertexBase_3`,
* and its `Cell` type must be a model of `ConstrainedDelaunayTriangulationCellBase_3`. * and its `Cell` type must be a model of `ConformingConstrainedDelaunayTriangulationCellBase_3`.
* <br> * <br>
* The default value is `Triangulation_3<Traits, TDS>` where `TDS` is * The default value is `Triangulation_3<Traits, TDS>` where `TDS` is
* `Triangulation_data_structure_3<Constrained_Delaunay_triangulation_vertex_base_3<Traits>, Constrained_Delaunay_triangulation_cell_base_3<Traits>>`. * `Triangulation_data_structure_3<Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits>, Conforming_constrained_Delaunay_triangulation_cell_base_3<Traits>>`.
* *
*/ */
template <typename Traits, typename Triangulation> template <typename Traits, typename Triangulation>
class Constrained_Delaunay_triangulation_3 { class Conforming_constrained_Delaunay_triangulation_3 {
using DT_3 = Delaunay_triangulation_3<Traits, typename Triangulation::Triangulation_data_structure>; using DT_3 = Delaunay_triangulation_3<Traits, typename Triangulation::Triangulation_data_structure>;
static_assert(std::is_base_of_v<Triangulation, DT_3>); static_assert(std::is_base_of_v<Triangulation, DT_3>);
static_assert(CGAL::is_nothrow_movable_v<DT_3>); static_assert(CGAL::is_nothrow_movable_v<DT_3>);
Constrained_Delaunay_triangulation_3_impl<DT_3> cdt_impl = {}; Conforming_constrained_Delaunay_triangulation_3_impl<DT_3> cdt_impl = {};
static_assert(CGAL::is_nothrow_movable_v<Constrained_Delaunay_triangulation_3_impl<DT_3>>); static_assert(CGAL::is_nothrow_movable_v<Conforming_constrained_Delaunay_triangulation_3_impl<DT_3>>);
struct Is_constrained { struct Is_constrained {
const Constrained_Delaunay_triangulation_3& cdt; const Conforming_constrained_Delaunay_triangulation_3& cdt;
bool operator()(typename Triangulation::Facet f) const { bool operator()(typename Triangulation::Facet f) const {
return cdt.is_facet_constrained(f); return cdt.is_facet_constrained(f);
} }
@ -553,9 +553,9 @@ public:
/*! /*!
* \brief %Default constructor. * \brief %Default constructor.
* *
* This constructor initializes an empty `Constrained_Delaunay_triangulation_3` object. * This constructor initializes an empty `Conforming_constrained_Delaunay_triangulation_3` object.
*/ */
Constrained_Delaunay_triangulation_3() = default; Conforming_constrained_Delaunay_triangulation_3() = default;
/*! /*!
* \brief Creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh. * \brief Creates a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.
@ -611,7 +611,7 @@ public:
* (click on the link for details). * (click on the link for details).
*/ */
template <typename PolygonMesh, typename CGAL_NP_TEMPLATE_PARAMETERS> template <typename PolygonMesh, typename CGAL_NP_TEMPLATE_PARAMETERS>
Constrained_Delaunay_triangulation_3(const PolygonMesh& mesh, const CGAL_NP_CLASS& np = parameters::default_values()) Conforming_constrained_Delaunay_triangulation_3(const PolygonMesh& mesh, const CGAL_NP_CLASS& np = parameters::default_values())
: cdt_impl(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits), Traits{})) : cdt_impl(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits), Traits{}))
{ {
auto mesh_vp_map = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), auto mesh_vp_map = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point),
@ -780,7 +780,7 @@ public:
* (click on the link for details). * (click on the link for details).
*/ */
template <typename PointRange, typename PolygonRange, typename NamedParams = parameters::Default_named_parameters> template <typename PointRange, typename PolygonRange, typename NamedParams = parameters::Default_named_parameters>
Constrained_Delaunay_triangulation_3(const PointRange& points, Conforming_constrained_Delaunay_triangulation_3(const PointRange& points,
const PolygonRange& polygons, const PolygonRange& polygons,
const NamedParams& np = parameters::default_values()) const NamedParams& np = parameters::default_values())
: cdt_impl(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits), Traits{})) : cdt_impl(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits), Traits{}))
@ -838,7 +838,7 @@ public:
* *
* This function allows the underlying triangulation to be moved out of this object. * This function allows the underlying triangulation to be moved out of this object.
* Example usage: * Example usage:
* \snippet{trimleft} remesh_constrained_Delaunay_triangulation_3.cpp move cdt to tr * \snippet{trimleft} remesh_constrained_Delaunay_triangulation_3.cpp move ccdt to tr
* After calling this function, `cdt` will be empty and `tr` will be move-constructed from the underlying triangulation, avoiding any copy. * After calling this function, `cdt` will be empty and `tr` will be move-constructed from the underlying triangulation, avoiding any copy.
* *
* \note This function is available only when the object is an rvalue. * \note This function is available only when the object is an rvalue.
@ -846,13 +846,13 @@ public:
*/ */
Triangulation triangulation() && { Triangulation triangulation() && {
Triangulation t = std::move(cdt_impl); Triangulation t = std::move(cdt_impl);
*this = Constrained_Delaunay_triangulation_3{}; *this = Conforming_constrained_Delaunay_triangulation_3{};
return t; return t;
} }
/// @} // end triangulation section /// @} // end triangulation section
/// \cond SKIP_IN_MANUAL /// \cond SKIP_IN_MANUAL
Constrained_Delaunay_triangulation_3 convert_for_remeshing() && { Conforming_constrained_Delaunay_triangulation_3 convert_for_remeshing() && {
auto& tr = cdt_impl; auto& tr = cdt_impl;
for(auto vh : tr.all_vertex_handles()) { for(auto vh : tr.all_vertex_handles()) {
vh->sync(); vh->sync();
@ -877,10 +877,10 @@ public:
} }
} }
} }
Constrained_Delaunay_triangulation_3 result{std::move(*this)}; Conforming_constrained_Delaunay_triangulation_3 result{std::move(*this)};
static_assert(CGAL::is_nothrow_movable_v<Constrained_Delaunay_triangulation_3>); static_assert(CGAL::is_nothrow_movable_v<Conforming_constrained_Delaunay_triangulation_3>);
static_assert(std::is_same_v<std::remove_reference_t<decltype(*this)>, Constrained_Delaunay_triangulation_3>); static_assert(std::is_same_v<std::remove_reference_t<decltype(*this)>, Conforming_constrained_Delaunay_triangulation_3>);
*this = Constrained_Delaunay_triangulation_3{}; *this = Conforming_constrained_Delaunay_triangulation_3{};
return result; return result;
} }
/// \endcond /// \endcond
@ -967,7 +967,7 @@ public:
#ifndef DOXYGEN_RUNNING #ifndef DOXYGEN_RUNNING
template <typename T_3> template <typename T_3>
class Constrained_Delaunay_triangulation_3_impl : public Conforming_Delaunay_triangulation_3<T_3> { class Conforming_constrained_Delaunay_triangulation_3_impl : public Conforming_Delaunay_triangulation_3<T_3> {
public: public:
using Conforming_Dt = Conforming_Delaunay_triangulation_3<T_3>; using Conforming_Dt = Conforming_Delaunay_triangulation_3<T_3>;
using Conforming_Dt::tr; using Conforming_Dt::tr;
@ -1079,9 +1079,9 @@ protected:
using Subconstraint = typename Constraint_hierarchy::Subconstraint; using Subconstraint = typename Constraint_hierarchy::Subconstraint;
void register_facet_to_be_constrained(Cell_handle cell, int facet_index) { void register_facet_to_be_constrained(Cell_handle cell, int facet_index) {
const auto face_id = static_cast<std::size_t>(cell->cdt_3_data().face_constraint_index(facet_index)); const auto face_id = static_cast<std::size_t>(cell->ccdt_3_data().face_constraint_index(facet_index));
this->face_constraint_misses_subfaces_set(face_id); this->face_constraint_misses_subfaces_set(face_id);
auto fh_2 = cell->cdt_3_data().face_2(this->face_cdt_2[face_id], facet_index); auto fh_2 = cell->ccdt_3_data().face_2(this->face_cdt_2[face_id], facet_index);
fh_2->info().facet_3d = {}; fh_2->info().facet_3d = {};
fh_2->info().missing_subface = true; fh_2->info().missing_subface = true;
this->set_facet_constrained({cell, facet_index}, -1, {}); this->set_facet_constrained({cell, facet_index}, -1, {});
@ -1093,11 +1093,11 @@ protected:
} }
class Insert_in_conflict_visitor { class Insert_in_conflict_visitor {
Constrained_Delaunay_triangulation_3_impl<T_3> * self; Conforming_constrained_Delaunay_triangulation_3_impl<T_3> * self;
typename Conforming_Dt::Insert_in_conflict_visitor conforming_dt_visitor; typename Conforming_Dt::Insert_in_conflict_visitor conforming_dt_visitor;
public: public:
Insert_in_conflict_visitor(Constrained_Delaunay_triangulation_3_impl *self) Insert_in_conflict_visitor(Conforming_constrained_Delaunay_triangulation_3_impl *self)
: self(self), conforming_dt_visitor(self) {} : self(self), conforming_dt_visitor(self) {}
template <class InputIterator> template <class InputIterator>
@ -1108,7 +1108,7 @@ protected:
for(auto cell_it = cell_it_begin; cell_it != end; ++cell_it) { for(auto cell_it = cell_it_begin; cell_it != end; ++cell_it) {
auto c = *cell_it; auto c = *cell_it;
for(int li = first_li; li < 4; ++li) { for(int li = first_li; li < 4; ++li) {
if(c->cdt_3_data().is_facet_constrained(li)) { if(c->ccdt_3_data().is_facet_constrained(li)) {
self->register_facet_to_be_constrained(c, li); self->register_facet_to_be_constrained(c, li);
#if CGAL_CDT_3_DEBUG_MISSING_TRIANGLES #if CGAL_CDT_3_DEBUG_MISSING_TRIANGLES
std::cerr << "Add missing triangle (from visitor), face #F" << face_id << ": \n"; std::cerr << "Add missing triangle (from visitor), face #F" << face_id << ": \n";
@ -1308,10 +1308,10 @@ public:
for(auto outside_facet : facets_of_cavity) { for(auto outside_facet : facets_of_cavity) {
const auto [outside_cell, outside_face_index] = outside_facet; const auto [outside_cell, outside_face_index] = outside_facet;
const auto mirror_facet = this->mirror_facet(outside_facet); const auto mirror_facet = this->mirror_facet(outside_facet);
if(outside_cell->cdt_3_data().is_facet_constrained(outside_face_index)) { if(outside_cell->ccdt_3_data().is_facet_constrained(outside_face_index)) {
const auto poly_id = outside_cell->cdt_3_data().face_constraint_index(outside_face_index); const auto poly_id = outside_cell->ccdt_3_data().face_constraint_index(outside_face_index);
const CDT_2& cdt_2 = face_cdt_2[poly_id]; const CDT_2& cdt_2 = face_cdt_2[poly_id];
const auto f2d = outside_cell->cdt_3_data().face_2(cdt_2, outside_face_index); const auto f2d = outside_cell->ccdt_3_data().face_2(cdt_2, outside_face_index);
set_facet_constrained(mirror_facet, poly_id, f2d); set_facet_constrained(mirror_facet, poly_id, f2d);
} }
} }
@ -1349,7 +1349,7 @@ public:
} }
bool is_facet_constrained(Facet f) const { bool is_facet_constrained(Facet f) const {
return f.first->cdt_3_data().is_facet_constrained(f.second); return f.first->ccdt_3_data().is_facet_constrained(f.second);
} }
auto number_of_constrained_facets() const auto number_of_constrained_facets() const
@ -1378,10 +1378,10 @@ public:
CGAL_assertion(fh == CDT_2_face_handle{} || same_triangle(f, fh)); CGAL_assertion(fh == CDT_2_face_handle{} || same_triangle(f, fh));
const auto [c, facet_index] = f; const auto [c, facet_index] = f;
c->cdt_3_data().set_facet_constraint(facet_index, polygon_contraint_id, fh); c->ccdt_3_data().set_facet_constraint(facet_index, polygon_contraint_id, fh);
if(tr().dimension() > 2) { if(tr().dimension() > 2) {
const auto [n, n_index] = tr().mirror_facet({c, facet_index}); const auto [n, n_index] = tr().mirror_facet({c, facet_index});
n->cdt_3_data().set_facet_constraint(n_index, polygon_contraint_id, fh); n->ccdt_3_data().set_facet_constraint(n_index, polygon_contraint_id, fh);
} }
if(fh == CDT_2_face_handle{}) return; if(fh == CDT_2_face_handle{}) return;
@ -1872,8 +1872,8 @@ private:
const auto index_vd = this->next_around_edge(index_vb, index_va); const auto index_vd = this->next_around_edge(index_vb, index_va);
//write_segment(dump_edges_around, cell_circ->vertex(index_vc), cell_circ->vertex(index_vd)); //write_segment(dump_edges_around, cell_circ->vertex(index_vc), cell_circ->vertex(index_vd));
if(cell_circ->vertex(index_vc)->cdt_3_data().is_marked(Vertex_marker::REGION_BORDER)) continue; if(cell_circ->vertex(index_vc)->ccdt_3_data().is_marked(Vertex_marker::REGION_BORDER)) continue;
if(cell_circ->vertex(index_vd)->cdt_3_data().is_marked(Vertex_marker::REGION_BORDER)) continue; if(cell_circ->vertex(index_vd)->ccdt_3_data().is_marked(Vertex_marker::REGION_BORDER)) continue;
int cd_intersects_region = does_edge_intersect_region(cell_circ, index_vc, index_vd, cdt_2, fh_region); int cd_intersects_region = does_edge_intersect_region(cell_circ, index_vc, index_vd, cdt_2, fh_region);
if(cd_intersects_region == 1) { if(cd_intersects_region == 1) {
return Search_first_intersection_result_type{ Edge{cell_circ, index_vc, index_vd}, border_edge }; return Search_first_intersection_result_type{ Edge{cell_circ, index_vc, index_vd}, border_edge };
@ -2125,8 +2125,8 @@ private:
#endif // CGAL_CDT_3_CAN_USE_CXX20_FORMAT #endif // CGAL_CDT_3_CAN_USE_CXX20_FORMAT
auto [cached_value_it, not_visited] = new_edge(v0, v1, false); auto [cached_value_it, not_visited] = new_edge(v0, v1, false);
if(!not_visited) return value_returned(cached_value_it->second); if(!not_visited) return value_returned(cached_value_it->second);
int v0v1_intersects_region = (v0->cdt_3_data().is_marked(Vertex_marker::REGION_INSIDE) || int v0v1_intersects_region = (v0->ccdt_3_data().is_marked(Vertex_marker::REGION_INSIDE) ||
v1->cdt_3_data().is_marked(Vertex_marker::REGION_INSIDE)) v1->ccdt_3_data().is_marked(Vertex_marker::REGION_INSIDE))
? expected ? expected
: does_edge_intersect_region(cell, index_v0, index_v1, cdt_2, fh_region); : does_edge_intersect_region(cell, index_v0, index_v1, cdt_2, fh_region);
if(v0v1_intersects_region != 0) { if(v0v1_intersects_region != 0) {
@ -2166,7 +2166,7 @@ private:
CGAL_assertion(false == this->is_infinite(*facet_circ)); CGAL_assertion(false == this->is_infinite(*facet_circ));
const auto cell = facet_circ->first; const auto cell = facet_circ->first;
const auto facet_index = facet_circ->second; const auto facet_index = facet_circ->second;
CGAL_assertion_msg(!cell->cdt_3_data().is_facet_constrained(facet_index), "intersecting polygons!"); CGAL_assertion_msg(!cell->ccdt_3_data().is_facet_constrained(facet_index), "intersecting polygons!");
if(new_cell(cell)) { if(new_cell(cell)) {
intersecting_cells.insert(cell); intersecting_cells.insert(cell);
} }
@ -2278,8 +2278,8 @@ private:
Unique_hash_map<Vertex_handle, typename Union_find<Vertex_handle>::handle> vertices_of_cavity_handles; Unique_hash_map<Vertex_handle, typename Union_find<Vertex_handle>::handle> vertices_of_cavity_handles;
for(auto c: intersecting_cells) { for(auto c: intersecting_cells) {
for(auto v : tr().vertices(c)) { for(auto v : tr().vertices(c)) {
if(!v->cdt_3_data().is_marked()) { if(!v->ccdt_3_data().is_marked()) {
v->cdt_3_data().set_mark(Vertex_marker::CAVITY); v->ccdt_3_data().set_mark(Vertex_marker::CAVITY);
vertices_of_cavity_handles[v] = vertices_of_cavity_union_find.make_set(v); vertices_of_cavity_handles[v] = vertices_of_cavity_union_find.make_set(v);
} }
} }
@ -2289,7 +2289,7 @@ private:
for(int i = 0; i < 3; ++i) { for(int i = 0; i < 3; ++i) {
auto v1 = vertices[i]; auto v1 = vertices[i];
auto v2 = vertices[(i + 1) % 3]; auto v2 = vertices[(i + 1) % 3];
if(v1->cdt_3_data().is_marked(Vertex_marker::CAVITY) && v2->cdt_3_data().is_marked(Vertex_marker::CAVITY)) { if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY) && v2->ccdt_3_data().is_marked(Vertex_marker::CAVITY)) {
vertices_of_cavity_union_find.unify_sets(vertices_of_cavity_handles[v1], vertices_of_cavity_union_find.unify_sets(vertices_of_cavity_handles[v1],
vertices_of_cavity_handles[v2]); vertices_of_cavity_handles[v2]);
} }
@ -2302,8 +2302,8 @@ private:
for(int j = i + 1; j < 4; ++j) { for(int j = i + 1; j < 4; ++j) {
const auto v1 = c->vertex(i); const auto v1 = c->vertex(i);
const auto v2 = c->vertex(j); const auto v2 = c->vertex(j);
if(v1->cdt_3_data().is_marked(Vertex_marker::CAVITY) && if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY) &&
v2->cdt_3_data().is_marked(Vertex_marker::CAVITY) && v2->ccdt_3_data().is_marked(Vertex_marker::CAVITY) &&
non_intersecting_edges_set.count(make_sorted_pair(v1, v2)) > 0) non_intersecting_edges_set.count(make_sorted_pair(v1, v2)) > 0)
{ {
vertices_of_cavity_union_find.unify_sets(vertices_of_cavity_handles[v1], vertices_of_cavity_union_find.unify_sets(vertices_of_cavity_handles[v1],
@ -2332,7 +2332,7 @@ private:
if(facets_of_border.count(Facet{circ, face_index}) > 0) { if(facets_of_border.count(Facet{circ, face_index}) > 0) {
const auto other_vertex_index = 6 - index_va - index_vb - face_index; const auto other_vertex_index = 6 - index_va - index_vb - face_index;
const auto other_vertex = circ->vertex(other_vertex_index); const auto other_vertex = circ->vertex(other_vertex_index);
if(other_vertex->cdt_3_data().is_marked(Vertex_marker::CAVITY)) { if(other_vertex->ccdt_3_data().is_marked(Vertex_marker::CAVITY)) {
vertex_above = circ->vertex(other_vertex_index); vertex_above = circ->vertex(other_vertex_index);
break; break;
} }
@ -2356,13 +2356,13 @@ private:
handle != end; ++handle) handle != end; ++handle)
{ {
auto v = *handle; auto v = *handle;
v->cdt_3_data().clear_mark(Vertex_marker::CAVITY); v->ccdt_3_data().clear_mark(Vertex_marker::CAVITY);
if(vertices_of_cavity_union_find.same_set(handle, vertex_above_handle)) { if(vertices_of_cavity_union_find.same_set(handle, vertex_above_handle)) {
vertices_of_upper_cavity.push_back(v); vertices_of_upper_cavity.push_back(v);
v->cdt_3_data().set_mark(Vertex_marker::CAVITY_ABOVE); v->ccdt_3_data().set_mark(Vertex_marker::CAVITY_ABOVE);
} else if(vertices_of_cavity_union_find.same_set(handle, vertex_below_handle)) { } else if(vertices_of_cavity_union_find.same_set(handle, vertex_below_handle)) {
vertices_of_lower_cavity.push_back(v); vertices_of_lower_cavity.push_back(v);
v->cdt_3_data().set_mark(Vertex_marker::CAVITY_BELOW); v->ccdt_3_data().set_mark(Vertex_marker::CAVITY_BELOW);
} else { } else {
CGAL_error(); CGAL_error();
} }
@ -2370,7 +2370,7 @@ private:
while(std::any_of(intersecting_cells.begin(), intersecting_cells.end(), [&](Cell_handle c) { while(std::any_of(intersecting_cells.begin(), intersecting_cells.end(), [&](Cell_handle c) {
const auto vs = tr().vertices(c); const auto vs = tr().vertices(c);
return std::any_of(vs.begin(), vs.end(), [&](auto v) { return std::any_of(vs.begin(), vs.end(), [&](auto v) {
if(!v->cdt_3_data().is_marked()) { if(!v->ccdt_3_data().is_marked()) {
std::cerr << "INFO: Vertex " << IO::oformat(v, with_point_and_info) << " is not marked\n"; std::cerr << "INFO: Vertex " << IO::oformat(v, with_point_and_info) << " is not marked\n";
return true; return true;
} }
@ -2383,16 +2383,16 @@ private:
for(int j = i + 1; j < 4; ++j) { for(int j = i + 1; j < 4; ++j) {
auto v1 = c->vertex(i); auto v1 = c->vertex(i);
auto v2 = c->vertex(j); auto v2 = c->vertex(j);
if(v1->cdt_3_data().is_marked() != v2->cdt_3_data().is_marked()) { if(v1->ccdt_3_data().is_marked() != v2->ccdt_3_data().is_marked()) {
if(v2->cdt_3_data().is_marked()) { if(v2->ccdt_3_data().is_marked()) {
std::swap(v1, v2); std::swap(v1, v2);
} // here v1 is marked and v2 is not } // here v1 is marked and v2 is not
if(v1->cdt_3_data().is_marked(Vertex_marker::CAVITY_ABOVE)) { if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY_ABOVE)) {
vertices_of_upper_cavity.push_back(v2); vertices_of_upper_cavity.push_back(v2);
v2->cdt_3_data().set_mark(Vertex_marker::CAVITY_ABOVE); v2->ccdt_3_data().set_mark(Vertex_marker::CAVITY_ABOVE);
} else if(v1->cdt_3_data().is_marked(Vertex_marker::CAVITY_BELOW)) { } else if(v1->ccdt_3_data().is_marked(Vertex_marker::CAVITY_BELOW)) {
vertices_of_lower_cavity.push_back(v2); vertices_of_lower_cavity.push_back(v2);
v2->cdt_3_data().set_mark(Vertex_marker::CAVITY_BELOW); v2->ccdt_3_data().set_mark(Vertex_marker::CAVITY_BELOW);
} }
} }
} }
@ -2429,21 +2429,21 @@ private:
std::cerr << "\n"; std::cerr << "\n";
} }
for(auto v: tr().vertices(facet)) { for(auto v: tr().vertices(facet)) {
if(v->cdt_3_data().is_marked(Vertex_marker::CAVITY_ABOVE)) { if(v->ccdt_3_data().is_marked(Vertex_marker::CAVITY_ABOVE)) {
facets_of_upper_cavity.push_back(facet); facets_of_upper_cavity.push_back(facet);
break; break;
} }
if(v->cdt_3_data().is_marked(Vertex_marker::CAVITY_BELOW)) { if(v->ccdt_3_data().is_marked(Vertex_marker::CAVITY_BELOW)) {
facets_of_lower_cavity.push_back(facet); facets_of_lower_cavity.push_back(facet);
break; break;
} }
} }
} }
for(auto v: vertices_of_upper_cavity) { for(auto v: vertices_of_upper_cavity) {
v->cdt_3_data().clear_mark(Vertex_marker::CAVITY_ABOVE); v->ccdt_3_data().clear_mark(Vertex_marker::CAVITY_ABOVE);
} }
for(auto v: vertices_of_lower_cavity) { for(auto v: vertices_of_lower_cavity) {
v->cdt_3_data().clear_mark(Vertex_marker::CAVITY_BELOW); v->ccdt_3_data().clear_mark(Vertex_marker::CAVITY_BELOW);
} }
} }
if(this->debug_regions()) { if(this->debug_regions()) {
@ -2514,11 +2514,11 @@ private:
} }
#endif // CGAL_CDT_3_CAN_USE_CXX20_FORMAT #endif // CGAL_CDT_3_CAN_USE_CXX20_FORMAT
for(auto v: region_border_vertices) { for(auto v: region_border_vertices) {
v->cdt_3_data().set_mark(Vertex_marker::REGION_BORDER); v->ccdt_3_data().set_mark(Vertex_marker::REGION_BORDER);
} }
const auto found_edge_opt = search_first_intersection(face_index, cdt_2, fh_region, border_edges); const auto found_edge_opt = search_first_intersection(face_index, cdt_2, fh_region, border_edges);
for(auto v: region_border_vertices) { for(auto v: region_border_vertices) {
v->cdt_3_data().clear_mark(Vertex_marker::REGION_BORDER); v->ccdt_3_data().clear_mark(Vertex_marker::REGION_BORDER);
} }
[[maybe_unused]] auto try_flip_region_size_4 = [&] { [[maybe_unused]] auto try_flip_region_size_4 = [&] {
@ -2631,7 +2631,7 @@ private:
return; return;
} }
// { // {
// Constrained_Delaunay_triangulation_3_impl new_tr; // Conforming_constrained_Delaunay_triangulation_3_impl new_tr;
// for(const auto v : region_border_vertices) { // for(const auto v : region_border_vertices) {
// new_tr.insert(v->point()); // new_tr.insert(v->point());
// } // }
@ -2660,18 +2660,18 @@ private:
CGAL_assertion(found_edge_opt != std::nullopt); CGAL_assertion(found_edge_opt != std::nullopt);
for(auto v : region_border_vertices) { for(auto v : region_border_vertices) {
v->cdt_3_data().set_mark(Vertex_marker::REGION_BORDER); v->ccdt_3_data().set_mark(Vertex_marker::REGION_BORDER);
} }
for(auto v : region_vertices) { for(auto v : region_vertices) {
if(v->cdt_3_data().is_marked(Vertex_marker::REGION_BORDER)) if(v->ccdt_3_data().is_marked(Vertex_marker::REGION_BORDER))
continue; continue;
v->cdt_3_data().set_mark(Vertex_marker::REGION_INSIDE); v->ccdt_3_data().set_mark(Vertex_marker::REGION_INSIDE);
} }
Scope_exit guard{[&] { Scope_exit guard{[&] {
for(auto v : region_vertices) { for(auto v : region_vertices) {
v->cdt_3_data().clear_mark(Vertex_marker::REGION_BORDER); v->ccdt_3_data().clear_mark(Vertex_marker::REGION_BORDER);
v->cdt_3_data().clear_mark(Vertex_marker::REGION_INSIDE); v->ccdt_3_data().clear_mark(Vertex_marker::REGION_INSIDE);
} }
}}; }};
@ -2976,10 +2976,10 @@ private:
auto restore_markers = [&](Facet outside_facet) { auto restore_markers = [&](Facet outside_facet) {
const auto [outside_cell, outside_face_index] = outside_facet; const auto [outside_cell, outside_face_index] = outside_facet;
const auto mirror_facet = this->mirror_facet(outside_facet); const auto mirror_facet = this->mirror_facet(outside_facet);
if(outside_cell->cdt_3_data().is_facet_constrained(outside_face_index)) { if(outside_cell->ccdt_3_data().is_facet_constrained(outside_face_index)) {
const auto poly_id = outside_cell->cdt_3_data().face_constraint_index(outside_face_index); const auto poly_id = outside_cell->ccdt_3_data().face_constraint_index(outside_face_index);
const CDT_2& cdt_2 = face_cdt_2[poly_id]; const CDT_2& cdt_2 = face_cdt_2[poly_id];
const auto f2d = outside_cell->cdt_3_data().face_2(cdt_2, outside_face_index); const auto f2d = outside_cell->ccdt_3_data().face_2(cdt_2, outside_face_index);
set_facet_constrained(mirror_facet, poly_id, f2d); set_facet_constrained(mirror_facet, poly_id, f2d);
} }
}; };
@ -3160,7 +3160,7 @@ private:
} }
for(auto [cell, facet_index] : missing_faces) { for(auto [cell, facet_index] : missing_faces) {
facets_of_cavity_border.erase({cell, facet_index}); facets_of_cavity_border.erase({cell, facet_index});
if(cell->cdt_3_data().is_facet_constrained(facet_index)) { if(cell->ccdt_3_data().is_facet_constrained(facet_index)) {
result.interior_constrained_faces.emplace_back(cell, facet_index); result.interior_constrained_faces.emplace_back(cell, facet_index);
} }
auto is_new_cell = cells_of_cavity.insert(cell).second; auto is_new_cell = cells_of_cavity.insert(cell).second;
@ -3303,7 +3303,7 @@ private:
if constexpr (cdt_3_can_use_cxx20_format()) if(this->debug_Steiner_points()) { if constexpr (cdt_3_can_use_cxx20_format()) if(this->debug_Steiner_points()) {
std::cerr << " -> " << IO::oformat(v, with_offset) << '\n'; std::cerr << " -> " << IO::oformat(v, with_offset) << '\n';
} }
v->cdt_3_data().set_Steiner_vertex_in_face(face_index); v->ccdt_3_data().set_Steiner_vertex_in_face(face_index);
[[maybe_unused]] typename CDT_2::Locate_type lt_2; [[maybe_unused]] typename CDT_2::Locate_type lt_2;
int i; int i;
auto fh = cdt_2.locate(steiner_pt, lt_2, i, fh_2d); auto fh = cdt_2.locate(steiner_pt, lt_2, i, fh_2d);
@ -3481,7 +3481,7 @@ public:
const auto n_index = n->index(it); const auto n_index = n->index(it);
if(!this->is_infinite(n->vertex(n_index))) if(!this->is_infinite(n->vertex(n_index)))
{ {
if(!it->cdt_3_data().is_facet_constrained(i) && if(!it->ccdt_3_data().is_facet_constrained(i) &&
this->side_of_sphere(it, n->vertex(n_index)->point()) == ON_BOUNDED_SIDE) this->side_of_sphere(it, n->vertex(n_index)->point()) == ON_BOUNDED_SIDE)
{ {
if(verbose) { if(verbose) {
@ -3655,14 +3655,14 @@ public:
} }
} }
void write_3d_triangulation_to_OFF(std::ostream& out, const Constrained_Delaunay_triangulation_3_impl& tr) { void write_3d_triangulation_to_OFF(std::ostream& out, const Conforming_constrained_Delaunay_triangulation_3_impl& tr) {
write_facets(out, tr, tr().finite_facets()); write_facets(out, tr, tr().finite_facets());
} }
void dump_3d_triangulation(CDT_3_face_index face_index, void dump_3d_triangulation(CDT_3_face_index face_index,
int region_index, int region_index,
std::string type, std::string type,
const Constrained_Delaunay_triangulation_3_impl& tr) const Conforming_constrained_Delaunay_triangulation_3_impl& tr)
{ {
std::ofstream dump(std::string("dump_") + type + "_cavity_" + std::to_string(face_index) + "_" + std::ofstream dump(std::string("dump_") + type + "_cavity_" + std::to_string(face_index) + "_" +
std::to_string(region_index) + ".off"); std::to_string(region_index) + ".off");

View File

@ -15,7 +15,7 @@
#include <CGAL/license/Constrained_triangulation_3.h> #include <CGAL/license/Constrained_triangulation_3.h>
#include <CGAL/Base_with_time_stamp.h> #include <CGAL/Base_with_time_stamp.h>
#include <CGAL/Constrained_Delaunay_triangulation_cell_data_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_cell_data_3.h>
#include <CGAL/Triangulation_cell_base_3.h> #include <CGAL/Triangulation_cell_base_3.h>
#include <CGAL/SMDS_3/io_signature.h> #include <CGAL/SMDS_3/io_signature.h>
@ -23,28 +23,28 @@ namespace CGAL {
/** /**
* @ingroup PkgCT_3Classes * @ingroup PkgCT_3Classes
* @brief Cell base class for the 3D Constrained Delaunay Triangulation. * @brief Cell base class for the 3D conforming constrained Delaunay triangulation.
* *
* This class is derived from the `Triangulation_cell_base_3` class and provides additional functionality * This class is derived from the `Triangulation_cell_base_3` class and provides additional functionality
* required by `make_constrained_Delaunay_triangulation_3()`. * required by `make_conforming_constrained_Delaunay_triangulation_3()`.
* *
* @tparam Traits The geometric traits class, which must be a model of `ConstrainedDelaunayTriangulationTraits_3`. * @tparam Traits The geometric traits class, which must be a model of `ConformingConstrainedDelaunayTriangulationTraits_3`.
* It should be the same as the geometric traits class of the triangulation. * It should be the same as the geometric traits class of the triangulation.
* @tparam Cell_base The base class for the cell, which must be a model of `TriangulationCellBase_3`. * @tparam Cell_base The base class for the cell, which must be a model of `TriangulationCellBase_3`.
* *
* @cgalModels{ConstrainedDelaunayTriangulationCellBase_3, SimplicialMeshCellBase_3, RemeshingCellBase_3} * @cgalModels{ConformingConstrainedDelaunayTriangulationCellBase_3, SimplicialMeshCellBase_3, RemeshingCellBase_3}
* *
* \note This cell base class also models the `SimplicialMeshCellBase_3` and `RemeshingCellBase_3` concepts, allowing the use of functionality from \ref Chapter_Tetrahedral_Remeshing "Tetrahedral Remeshing" and \ref Chapter_3D_Simplicial_Mesh_Data_Structure "3D Simplicial Mesh Data Structures", if the corresponding vertex base also models the right concepts. * \note This cell base class also models the `SimplicialMeshCellBase_3` and `RemeshingCellBase_3` concepts, allowing the use of functionality from \ref Chapter_Tetrahedral_Remeshing "Tetrahedral Remeshing" and \ref Chapter_3D_Simplicial_Mesh_Data_Structure "3D Simplicial Mesh Data Structures", if the corresponding vertex base also models the right concepts.
* \todo After discussion with Jane. Maybe there should be a second pair of Vb/Cb, designed to model the concepts of simplicial mesh and remeshing. * \todo After discussion with Jane. Maybe there should be a second pair of Vb/Cb, designed to model the concepts of simplicial mesh and remeshing.
* *
* \sa `CGAL::Constrained_Delaunay_triangulation_vertex_base_3` * \sa `CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3`
*/ */
template <typename Traits, typename Cell_base = Triangulation_cell_base_3<Traits> > template <typename Traits, typename Cell_base = Triangulation_cell_base_3<Traits> >
class Constrained_Delaunay_triangulation_cell_base_3 class Conforming_constrained_Delaunay_triangulation_cell_base_3
: public Base_with_time_stamp<Cell_base> : public Base_with_time_stamp<Cell_base>
{ {
using Base = Base_with_time_stamp<Cell_base>; using Base = Base_with_time_stamp<Cell_base>;
Constrained_Delaunay_triangulation_cell_data_3 cdt_3_data_; Conforming_constrained_Delaunay_triangulation_cell_data_3 ccdt_3_data_;
mutable bool sliver_cache_validity_ = false; mutable bool sliver_cache_validity_ = false;
CDT_3_face_index subdomain_index_ = -1; CDT_3_face_index subdomain_index_ = -1;
@ -54,28 +54,28 @@ public:
template < class TDS3 > template < class TDS3 >
struct Rebind_TDS { struct Rebind_TDS {
typedef typename Cell_base::template Rebind_TDS<TDS3>::Other Cb3; typedef typename Cell_base::template Rebind_TDS<TDS3>::Other Cb3;
typedef Constrained_Delaunay_triangulation_cell_base_3 <Traits, Cb3> Other; typedef Conforming_constrained_Delaunay_triangulation_cell_base_3 <Traits, Cb3> Other;
}; };
// Constructors inherited from the base class // Constructors inherited from the base class
using Base::Base; using Base::Base;
Constrained_Delaunay_triangulation_cell_data_3& cdt_3_data() { Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data() {
return cdt_3_data_; return ccdt_3_data_;
} }
const Constrained_Delaunay_triangulation_cell_data_3& cdt_3_data() const { const Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data() const {
return cdt_3_data_; return ccdt_3_data_;
} }
// model of SimplicialMeshCellBase_3 // model of SimplicialMeshCellBase_3
using Surface_patch_index = CDT_3_face_index; using Surface_patch_index = CDT_3_face_index;
using Subdomain_index = CDT_3_face_index; using Subdomain_index = CDT_3_face_index;
bool is_facet_on_surface(int i) const { return cdt_3_data().is_facet_constrained(i); } bool is_facet_on_surface(int i) const { return ccdt_3_data().is_facet_constrained(i); }
Surface_patch_index surface_patch_index(int i) const { return cdt_3_data().face_constraint_index(i) + 1; } Surface_patch_index surface_patch_index(int i) const { return ccdt_3_data().face_constraint_index(i) + 1; }
void set_surface_patch_index(int i, Surface_patch_index index) void set_surface_patch_index(int i, Surface_patch_index index)
{ {
cdt_3_data().set_face_constraint_index(i, index - 1); ccdt_3_data().set_face_constraint_index(i, index - 1);
} }
Subdomain_index subdomain_index() const { return subdomain_index_; } Subdomain_index subdomain_index() const { return subdomain_index_; }
void set_subdomain_index(Subdomain_index i) { subdomain_index_ = i; } void set_subdomain_index(Subdomain_index i) { subdomain_index_ = i; }
@ -95,28 +95,28 @@ public:
static std::string io_signature() { static std::string io_signature() {
static_assert( static_assert(
std::is_same_v< std::is_same_v<
decltype(std::declval<Constrained_Delaunay_triangulation_cell_data_3>().face_constraint_index(0)), int>); decltype(std::declval<Conforming_constrained_Delaunay_triangulation_cell_data_3>().face_constraint_index(0)), int>);
return Get_io_signature<Base>()() + "+(" + Get_io_signature<int>()() + ")[4]"; return Get_io_signature<Base>()() + "+(" + Get_io_signature<int>()() + ")[4]";
} }
friend std::ostream& friend std::ostream&
operator<<(std::ostream& os, operator<<(std::ostream& os,
const Constrained_Delaunay_triangulation_cell_base_3& c) const Conforming_constrained_Delaunay_triangulation_cell_base_3& c)
{ {
os << static_cast<const Base&>(c); os << static_cast<const Base&>(c);
for( unsigned li = 0; li < 4; ++li ) { for( unsigned li = 0; li < 4; ++li ) {
if(IO::is_ascii(os)) { if(IO::is_ascii(os)) {
os << " " << c.cdt_3_data().face_constraint_index(li); os << " " << c.ccdt_3_data().face_constraint_index(li);
} else { } else {
CGAL::write(os, c.cdt_3_data().face_constraint_index(li)); CGAL::write(os, c.ccdt_3_data().face_constraint_index(li));
} }
} }
return os; return os;
} }
friend std::istream& friend std::istream&
operator>>(std::istream& is, operator>>(std::istream& is,
Constrained_Delaunay_triangulation_cell_base_3& c) Conforming_constrained_Delaunay_triangulation_cell_base_3& c)
{ {
is >> static_cast<Base&>(c); is >> static_cast<Base&>(c);
if(!is) return is; if(!is) return is;

View File

@ -29,16 +29,16 @@ enum class CDT_3_cell_marker {
}; };
/*! /*!
* @brief Internal per-cell data for \cgal 3D constrained Delaunay triangulations * @brief Internal per-cell data for \cgal 3D conforming constrained Delaunay triangulations
* *
* This class is an internal detail of the implementation of \cgal 3D constrained Delaunay triangulations. * This class is an internal detail of the implementation of \cgal 3D conforming constrained Delaunay triangulations.
* *
* Any model of the `ConstrainedDelaunayTriangulationCellBase_3` concept must include one object of this type * Any model of the `ConformingConstrainedDelaunayTriangulationCellBase_3` concept must include one object of this type
* as a non-static data member. * as a non-static data member.
*/ */
class Constrained_Delaunay_triangulation_cell_data_3 { class Conforming_constrained_Delaunay_triangulation_cell_data_3 {
/// @cond SKIP_IN_MANUAL /// @cond SKIP_IN_MANUAL
template <typename Tr> friend class Constrained_Delaunay_triangulation_3_impl; template <typename Tr> friend class Conforming_constrained_Delaunay_triangulation_3_impl;
/// @endcond /// @endcond
std::array<CDT_3_face_index, 4> face_id = { -1, -1, -1, -1 }; std::array<CDT_3_face_index, 4> face_id = { -1, -1, -1, -1 };

View File

@ -17,31 +17,31 @@
#include <CGAL/Base_with_time_stamp.h> #include <CGAL/Base_with_time_stamp.h>
#include <CGAL/Triangulation_vertex_base_3.h> #include <CGAL/Triangulation_vertex_base_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_vertex_data_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h>
#include <CGAL/SMDS_3/io_signature.h> #include <CGAL/SMDS_3/io_signature.h>
namespace CGAL { namespace CGAL {
/** /**
* @ingroup PkgCT_3Classes * @ingroup PkgCT_3Classes
* @brief The Constrained_Delaunay_triangulation_vertex_base_3 class is a vertex base class for the * @brief The Conforming_constrained_Delaunay_triangulation_vertex_base_3 class is a vertex base class for the
* Constrained Delaunay Triangulation in 3D. * conforming constrained Delaunay triangulation in 3D.
* *
* This class is derived from the `Triangulation_vertex_base_3` class and provides additional functionality * This class is derived from the `Triangulation_vertex_base_3` class and provides additional functionality
* required by `make_constrained_Delaunay_triangulation_3()`. * required by `make_conforming_constrained_Delaunay_triangulation_3()`.
* *
* @tparam Traits The geometric traits class, model of `DelaunayTriangulationTraits_3`. * @tparam Traits The geometric traits class, model of `DelaunayTriangulationTraits_3`.
* It must be the same as the geometric traits class of the triangulation. * It must be the same as the geometric traits class of the triangulation.
* @tparam Vertex_base The base class for the vertex. It must be a model of `TriangulationVertexBase_3`. * @tparam Vertex_base The base class for the vertex. It must be a model of `TriangulationVertexBase_3`.
* *
* @cgalModels{ConstrainedDelaunayTriangulationVertexBase_3} * @cgalModels{ConformingConstrainedDelaunayTriangulationVertexBase_3}
* *
* \sa `CGAL::Constrained_Delaunay_triangulation_cell_base_3` * \sa `CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3`
*/ */
template < typename Traits, typename Vertex_base = Triangulation_vertex_base_3<Traits> > template < typename Traits, typename Vertex_base = Triangulation_vertex_base_3<Traits> >
class Constrained_Delaunay_triangulation_vertex_base_3 : public Base_with_time_stamp<Vertex_base> class Conforming_constrained_Delaunay_triangulation_vertex_base_3 : public Base_with_time_stamp<Vertex_base>
{ {
Constrained_Delaunay_triangulation_vertex_data_3 cdt_3_data_; Conforming_constrained_Delaunay_triangulation_vertex_data_3 ccdt_3_data_;
bool cache_validity_ = false; bool cache_validity_ = false;
CDT_3_face_index index_ = 0; CDT_3_face_index index_ = 0;
int dim_ = -1; int dim_ = -1;
@ -53,7 +53,7 @@ public:
template <class TDS3> struct Rebind_TDS template <class TDS3> struct Rebind_TDS
{ {
using Vb3 = typename Vertex_base::template Rebind_TDS<TDS3>::Other; using Vb3 = typename Vertex_base::template Rebind_TDS<TDS3>::Other;
using Other = Constrained_Delaunay_triangulation_vertex_base_3<Traits, Vb3>; using Other = Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits, Vb3>;
}; };
// constructors, inherited from the base class // constructors, inherited from the base class
@ -78,7 +78,7 @@ public:
std::size_t cached_number_of_components() const { return number_of_components_; } std::size_t cached_number_of_components() const { return number_of_components_; }
void sync() { void sync() {
switch(cdt_3_data().vertex_type()) { switch(ccdt_3_data().vertex_type()) {
case CDT_3_vertex_type::FREE: case CDT_3_vertex_type::FREE:
set_dimension(3); set_dimension(3);
set_index(0); set_index(0);
@ -93,7 +93,7 @@ public:
break; break;
case CDT_3_vertex_type::STEINER_IN_FACE: case CDT_3_vertex_type::STEINER_IN_FACE:
set_dimension(2); set_dimension(2);
set_index(cdt_3_data().face_index()); set_index(ccdt_3_data().face_index());
break; break;
default: default:
CGAL_error(); CGAL_error();
@ -101,9 +101,9 @@ public:
} }
} }
// model of ConstrainedDelaunayTriangulationVertexBase_3 // model of ConformingConstrainedDelaunayTriangulationVertexBase_3
Constrained_Delaunay_triangulation_vertex_data_3& cdt_3_data() { return cdt_3_data_; } Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data() { return ccdt_3_data_; }
const Constrained_Delaunay_triangulation_vertex_data_3& cdt_3_data() const { return cdt_3_data_; } const Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data() const { return ccdt_3_data_; }
static std::string io_signature() { static std::string io_signature() {
return Get_io_signature<Vertex_base>()(); return Get_io_signature<Vertex_base>()();

View File

@ -23,14 +23,14 @@ namespace CGAL {
#ifdef DOXYGEN_RUNNING #ifdef DOXYGEN_RUNNING
/*! /*!
* @brief Internal per-vertex data for \cgal 3D constrained Delaunay triangulations * @brief Internal per-vertex data for \cgal 3D conforming constrained Delaunay triangulations
* *
* This class is an internal detail of the implementation of \cgal 3D constrained Delaunay triangulations. * This class is an internal detail of the implementation of \cgal 3D conforming constrained Delaunay triangulations.
* *
* Any model of the `ConstrainedDelaunayTriangulationVertexBase_3` concept must include one object of this type * Any model of the `ConformingConstrainedDelaunayTriangulationVertexBase_3` concept must include one object of this type
* as a non-static data member. * as a non-static data member.
*/ */
struct Constrained_Delaunay_triangulation_vertex_data_3 {}; struct Conforming_constrained_Delaunay_triangulation_vertex_data_3 {};
#else // DOXYGEN_RUNNING #else // DOXYGEN_RUNNING
enum class CDT_3_vertex_type { FREE, CORNER, STEINER_ON_EDGE, STEINER_IN_FACE }; enum class CDT_3_vertex_type { FREE, CORNER, STEINER_ON_EDGE, STEINER_IN_FACE };
@ -45,7 +45,7 @@ enum class CDT_3_vertex_marker {
nb_of_markers nb_of_markers
}; };
struct Constrained_Delaunay_triangulation_vertex_data_3 { struct Conforming_constrained_Delaunay_triangulation_vertex_data_3 {
protected: protected:
// TODO: check and improve the compactness of this class // TODO: check and improve the compactness of this class
CDT_3_vertex_type m_vertex_type = CDT_3_vertex_type::FREE; CDT_3_vertex_type m_vertex_type = CDT_3_vertex_type::FREE;
@ -61,8 +61,8 @@ protected:
} u {U::On_edge{}}; } u {U::On_edge{}};
public: public:
friend bool operator==(const Constrained_Delaunay_triangulation_vertex_data_3& lhs, friend bool operator==(const Conforming_constrained_Delaunay_triangulation_vertex_data_3& lhs,
const Constrained_Delaunay_triangulation_vertex_data_3& rhs) { const Conforming_constrained_Delaunay_triangulation_vertex_data_3& rhs) {
return lhs.m_vertex_type == rhs.m_vertex_type && lhs.mark == rhs.mark && std::invoke([&]() { return lhs.m_vertex_type == rhs.m_vertex_type && lhs.mark == rhs.mark && std::invoke([&]() {
if(lhs.m_vertex_type == CDT_3_vertex_type::STEINER_ON_EDGE) { if(lhs.m_vertex_type == CDT_3_vertex_type::STEINER_ON_EDGE) {
return lhs.u.on_edge.nb_of_incident_constraints == rhs.u.on_edge.nb_of_incident_constraints && return lhs.u.on_edge.nb_of_incident_constraints == rhs.u.on_edge.nb_of_incident_constraints &&
@ -136,7 +136,7 @@ public:
#if CGAL_CXX20 #if CGAL_CXX20
# include <concepts> # include <concepts>
static_assert(std::regular<CGAL::Constrained_Delaunay_triangulation_vertex_data_3>); static_assert(std::regular<CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3>);
#endif #endif

View File

@ -22,8 +22,8 @@ namespace CGAL {
* @addtogroup PkgCT_3Classes * @addtogroup PkgCT_3Classes
* @typedef CDT_3_face_index * @typedef CDT_3_face_index
* Integral type to store the index of constraints. * Integral type to store the index of constraints.
* @see `Constrained_Delaunay_triangulation_cell_data_3` * @see `Conforming_constrained_Delaunay_triangulation_cell_data_3`
* @see `Constrained_Delaunay_triangulation_vertex_base_3` * @see `Conforming_constrained_Delaunay_triangulation_vertex_base_3`
* *
*/ */
using CDT_3_face_index = int; // must be signed using CDT_3_face_index = int; // must be signed

View File

@ -14,43 +14,14 @@
#include <CGAL/license/Constrained_triangulation_3.h> #include <CGAL/license/Constrained_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_vertex_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_base_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_cell_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_3.h> #include <CGAL/Triangulation_3.h>
#include <CGAL/Triangulation_data_structure_3.h> #include <CGAL/Triangulation_data_structure_3.h>
namespace CGAL { namespace CGAL {
#ifndef DOXYGEN_RUNNING
/*!
* \ingroup PkgCT_3Classes
* \brief The default 3D constrained Delaunay triangulation type.
*
* `Default_constrained_Delaunay_triangulation_3_type_generator` is a metafunction that returns the
* default 3D constrained Delaunay triangulation type for a given geometric
* traits class.
*
* \tparam Traits a geometric traits class.
*
* \return `type` is the default 3D constrained Delaunay triangulation type.
*
* \sa Default_constrained_Delaunay_triangulation_3
*/
template <typename Traits,
typename Vb = Constrained_Delaunay_triangulation_vertex_base_3<Traits>,
typename Cb = Constrained_Delaunay_triangulation_cell_base_3<Traits>>
struct Default_constrained_Delaunay_triangulation_3_type_generator
{
using Tds = Triangulation_data_structure_3<Vb, Cb>;
using Tr = Triangulation_3<Traits, Tds>;
using type = Constrained_Delaunay_triangulation_3<Traits, Tr>;
};
template <typename Traits>
using Default_constrained_Delaunay_triangulation_3 = Constrained_Delaunay_triangulation_3<Traits>;
#endif // DOXYGEN_RUNNING
/*! /*!
* \ingroup PkgCT_3Functions * \ingroup PkgCT_3Functions
* \brief Create a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh. * \brief Create a 3D constrained Delaunay triangulation conforming to the faces of a polygon mesh.
@ -67,18 +38,18 @@ using Default_constrained_Delaunay_triangulation_3 = Constrained_Delaunay_triang
* The generated triangulation will be constrained to conform to the faces of the polygon mesh, or to the surface patches * The generated triangulation will be constrained to conform to the faces of the polygon mesh, or to the surface patches
* described by the `face_patch_map` property map if provided. * described by the `face_patch_map` property map if provided.
* *
* \tparam Triangulation An instance of the `CGAL::Constrained_Delaunay_triangulation_3` class template * \tparam Triangulation An instance of the `CGAL::Conforming_constrained_Delaunay_triangulation_3` class template
* (or `CGAL::Default`). * (or `CGAL::Default`).
* - Its `Traits` type must be a model of `ConstrainedDelaunayTriangulationTraits_3`, * - Its `Traits` type must be a model of `ConformingConstrainedDelaunayTriangulationTraits_3`,
* - Its point type must be constructible from the point type of the polygon mesh, * - Its point type must be constructible from the point type of the polygon mesh,
* - its `Vertex` type must be a model of `ConstrainedDelaunayTriangulationVertexBase_3`, and * - its `Vertex` type must be a model of `ConformingConstrainedDelaunayTriangulationVertexBase_3`, and
* - its `Cell` type must be a model of `ConstrainedDelaunayTriangulationCellBase_3`. * - its `Cell` type must be a model of `ConformingConstrainedDelaunayTriangulationCellBase_3`.
* \tparam PolygonMesh a model of `FaceListGraph` * \tparam PolygonMesh a model of `FaceListGraph`
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
* *
* If `Triangulation` is `CGAL::Default`, the geometric traits `Traits` is deduced from the polygon mesh type * If `Triangulation` is `CGAL::Default`, the geometric traits `Traits` is deduced from the polygon mesh type
* `PolygonMesh` and the named parameters `NamedParameters`. And then the default constrained Delaunay triangulation is * `PolygonMesh` and the named parameters `NamedParameters`. And then the default conforming constrained Delaunay
* `CGAL::Constrained_Delaunay_triangulation_3<Traits>`. * triangulation is `CGAL::Conforming_constrained_Delaunay_triangulation_3<Traits>`.
* *
* \param mesh The polygon mesh representing the constraints. * \param mesh The polygon mesh representing the constraints.
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below
@ -122,12 +93,12 @@ using Default_constrained_Delaunay_triangulation_3 = Constrained_Delaunay_triang
template <typename Triangulation = CGAL::Default, template <typename Triangulation = CGAL::Default,
typename PolygonMesh, typename PolygonMesh,
typename CGAL_NP_TEMPLATE_PARAMETERS> typename CGAL_NP_TEMPLATE_PARAMETERS>
auto make_constrained_Delaunay_triangulation_3(const PolygonMesh& mesh, auto make_conforming_constrained_Delaunay_triangulation_3(const PolygonMesh& mesh,
const CGAL_NP_CLASS& np = parameters::default_values()) const CGAL_NP_CLASS& np = parameters::default_values())
{ {
using Mesh_geom_traits = typename GetGeomTraits<PolygonMesh, CGAL_NP_CLASS>::type; using Mesh_geom_traits = typename GetGeomTraits<PolygonMesh, CGAL_NP_CLASS>::type;
using CDT = typename CGAL::Default::Get<Triangulation, using CDT = typename CGAL::Default::Get<Triangulation,
Constrained_Delaunay_triangulation_3<Mesh_geom_traits>>::type; Conforming_constrained_Delaunay_triangulation_3<Mesh_geom_traits>>::type;
CDT cdt(mesh, np); CDT cdt(mesh, np);
auto remeshing_cdt{std::move(cdt).convert_for_remeshing()}; auto remeshing_cdt{std::move(cdt).convert_for_remeshing()};
static_assert(std::is_same_v<decltype(remeshing_cdt), CDT>); static_assert(std::is_same_v<decltype(remeshing_cdt), CDT>);
@ -150,20 +121,20 @@ auto make_constrained_Delaunay_triangulation_3(const PolygonMesh& mesh,
* The generated triangulation will be constrained to conform to the faces of the polygon soup, or to the surface patches * The generated triangulation will be constrained to conform to the faces of the polygon soup, or to the surface patches
* described by the `face_patch_map` property map if provided. * described by the `face_patch_map` property map if provided.
* *
* \tparam Triangulation An instance of the `CGAL::Constrained_Delaunay_triangulation_3` class template * \tparam Triangulation An instance of the `CGAL::Conforming_constrained_Delaunay_triangulation_3` class template
* (or `CGAL::Default`). * (or `CGAL::Default`).
* - Its `Traits` type must be a model of `ConstrainedDelaunayTriangulationTraits_3`, * - Its `Traits` type must be a model of `ConformingConstrainedDelaunayTriangulationTraits_3`,
* - Its point type must be constructible from the point type of the polygon soup, * - Its point type must be constructible from the point type of the polygon soup,
* - its `Vertex` type must be a model of `ConstrainedDelaunayTriangulationVertexBase_3`, and * - its `Vertex` type must be a model of `ConformingConstrainedDelaunayTriangulationVertexBase_3`, and
* - its `Cell` type must be a model of `ConstrainedDelaunayTriangulationCellBase_3`. * - its `Cell` type must be a model of `ConformingConstrainedDelaunayTriangulationCellBase_3`.
* \tparam PointRange a model of the concept `RandomAccessContainer` whose value type is the point type * \tparam PointRange a model of the concept `RandomAccessContainer` whose value type is the point type
* \tparam PolygonRange a model of the concept `RandomAccessContainer` whose value type is a model of the concept * \tparam PolygonRange a model of the concept `RandomAccessContainer` whose value type is a model of the concept
* `RandomAccessContainer` whose value type is `std::size_t` * `RandomAccessContainer` whose value type is `std::size_t`
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
* *
* If `Triangulation` is `CGAL::Default`, the geometric traits `Traits` is deduced from the point type * If `Triangulation` is `CGAL::Default`, the geometric traits `Traits` is deduced from the point type
* in `PointRange` and the named parameters `NamedParameters`. And then the default constrained Delaunay triangulation * in `PointRange` and the named parameters `NamedParameters`. And then the default conforming constrained
* is `CGAL::Constrained_Delaunay_triangulation_3<Traits>`. * Delaunay triangulation is `CGAL::Conforming_constrained_Delaunay_triangulation_3<Traits>`.
* *
* \param points a range of points representing the vertices of the polygon soup * \param points a range of points representing the vertices of the polygon soup
* \param polygons a range of ranges of indices representing the faces of the polygon soup * \param polygons a range of ranges of indices representing the faces of the polygon soup
@ -199,7 +170,7 @@ template <typename Triangulation = CGAL::Default,
typename PointRange, typename PointRange,
typename PolygonRange, typename PolygonRange,
typename NamedParameters = parameters::Default_named_parameters> typename NamedParameters = parameters::Default_named_parameters>
auto make_constrained_Delaunay_triangulation_3(const PointRange& points, auto make_conforming_constrained_Delaunay_triangulation_3(const PointRange& points,
const PolygonRange& polygons, const PolygonRange& polygons,
const NamedParameters& np = parameters::default_values()) const NamedParameters& np = parameters::default_values())
{ {
@ -220,7 +191,7 @@ auto make_constrained_Delaunay_triangulation_3(const PointRange& points,
using Geom_traits = decltype(get_geom_traits_type()); using Geom_traits = decltype(get_geom_traits_type());
using CDT = using CDT =
typename CGAL::Default::Get<Triangulation, Constrained_Delaunay_triangulation_3<Geom_traits>>::type; typename CGAL::Default::Get<Triangulation, Conforming_constrained_Delaunay_triangulation_3<Geom_traits>>::type;
CDT cdt(points, polygons, np); CDT cdt(points, polygons, np);
auto remeshing_cdt{std::move(cdt).convert_for_remeshing()}; auto remeshing_cdt{std::move(cdt).convert_for_remeshing()};
static_assert(std::is_same_v<decltype(remeshing_cdt), CDT>); static_assert(std::is_same_v<decltype(remeshing_cdt), CDT>);

View File

@ -1,12 +1,12 @@
#include <CGAL/make_constrained_Delaunay_triangulation_3.h> #include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h> #include <CGAL/Surface_mesh.h>
#include <algorithm> #include <algorithm>
using K = CGAL::Exact_predicates_inexact_constructions_kernel; using K = CGAL::Exact_predicates_inexact_constructions_kernel;
using CDT = CGAL::Constrained_Delaunay_triangulation_3<K>; using CDT = CGAL::Conforming_constrained_Delaunay_triangulation_3<K>;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
@ -20,7 +20,7 @@ int main(int argc, char* argv[])
std::cout << "Read " << mesh.number_of_vertices() << " vertices and " std::cout << "Read " << mesh.number_of_vertices() << " vertices and "
<< mesh.number_of_faces() << " faces" << std::endl; << mesh.number_of_faces() << " faces" << std::endl;
auto cdt = CGAL::make_constrained_Delaunay_triangulation_3<CDT>(mesh); auto cdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3<CDT>(mesh);
static_assert(std::is_same_v<decltype(cdt), CDT>); static_assert(std::is_same_v<decltype(cdt), CDT>);
CDT cdt2(mesh); CDT cdt2(mesh);
const auto nb_cstr_facets = cdt2.number_of_constrained_facets(); const auto nb_cstr_facets = cdt2.number_of_constrained_facets();

View File

@ -3,7 +3,7 @@
#include <CGAL/Three/CGAL_Lab_plugin_interface.h> #include <CGAL/Three/CGAL_Lab_plugin_interface.h>
#include <CGAL/Three/Scene_interface.h> #include <CGAL/Three/Scene_interface.h>
#include <CGAL/Three/Scene_item.h> #include <CGAL/Three/Scene_item.h>
#include <CGAL/make_constrained_Delaunay_triangulation_3.h> #include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <QAction> #include <QAction>
#include <QList> #include <QList>
@ -60,8 +60,8 @@ class CDT_3_plugin : public QObject, public CGAL_Lab_plugin_interface
return; return;
auto patch_id_pmap = mesh->property_map<SMesh::Face_index, int>("f:patch_id"); auto patch_id_pmap = mesh->property_map<SMesh::Face_index, int>("f:patch_id");
auto cdt = patch_id_pmap auto cdt = patch_id_pmap
? CGAL::make_constrained_Delaunay_triangulation_3(*mesh, CGAL::parameters::face_patch_map(*patch_id_pmap)) ? CGAL::make_conforming_constrained_Delaunay_triangulation_3(*mesh, CGAL::parameters::face_patch_map(*patch_id_pmap))
: CGAL::make_constrained_Delaunay_triangulation_3(*mesh); : CGAL::make_conforming_constrained_Delaunay_triangulation_3(*mesh);
const auto& cdt_tr = cdt.triangulation(); const auto& cdt_tr = cdt.triangulation();
auto triangulation_item = std::make_unique<Scene_c3t3_item>(); auto triangulation_item = std::make_unique<Scene_c3t3_item>();
auto& item_tr = triangulation_item->triangulation(); auto& item_tr = triangulation_item->triangulation();

View File

@ -3,8 +3,8 @@
// #define CGAL_DEBUG_CDT_3 1 // #define CGAL_DEBUG_CDT_3 1
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_vertex_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_base_3.h>
#include <CGAL/Surface_mesh.h> #include <CGAL/Surface_mesh.h>
#include <CGAL/IO/File_binary_mesh_3.h> #include <CGAL/IO/File_binary_mesh_3.h>
@ -56,11 +56,11 @@ using K = CGAL::Exact_predicates_inexact_constructions_kernel;
#endif // use Epick #endif // use Epick
struct Vb : public CGAL::Constrained_Delaunay_triangulation_vertex_base_3<K> {}; struct Vb : public CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<K> {};
struct Cb : public CGAL::Constrained_Delaunay_triangulation_cell_base_3<K> {}; struct Cb : public CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<K> {};
struct Tds: public CGAL::Triangulation_data_structure_3<Vb, Cb> {}; struct Tds: public CGAL::Triangulation_data_structure_3<Vb, Cb> {};
using Delaunay = CGAL::Delaunay_triangulation_3<K, Tds>; using Delaunay = CGAL::Delaunay_triangulation_3<K, Tds>;
using CDT = CGAL::Constrained_Delaunay_triangulation_3_impl<Delaunay>; using CDT = CGAL::Conforming_constrained_Delaunay_triangulation_3_impl<Delaunay>;
using Point = Delaunay::Point; using Point = Delaunay::Point;
using Point_3 = K::Point_3; using Point_3 = K::Point_3;
@ -717,7 +717,7 @@ int go(Mesh mesh, CDT_options options) {
for(auto v: cdt.finite_vertex_handles()) { for(auto v: cdt.finite_vertex_handles()) {
[[maybe_unused]] const auto time_stamp = v->time_stamp(); [[maybe_unused]] const auto time_stamp = v->time_stamp();
assert(++time_stamp_counter == time_stamp); assert(++time_stamp_counter == time_stamp);
if(!v->cdt_3_data().is_Steiner_vertex_on_edge()) continue; if(!v->ccdt_3_data().is_Steiner_vertex_on_edge()) continue;
const auto [va, vb] = cdt.ancestors_of_Steiner_vertex_on_edge(v); const auto [va, vb] = cdt.ancestors_of_Steiner_vertex_on_edge(v);
const auto index_va = Vertex_index{static_cast<unsigned>(va->time_stamp() - 1)}; const auto index_va = Vertex_index{static_cast<unsigned>(va->time_stamp() - 1)};
const auto index_vb = Vertex_index{static_cast<unsigned>(vb->time_stamp() - 1)}; const auto index_vb = Vertex_index{static_cast<unsigned>(vb->time_stamp() - 1)};

View File

@ -4,7 +4,7 @@
#include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/Conforming_Delaunay_triangulation_3.h> #include <CGAL/Conforming_Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Base_with_time_stamp.h> #include <CGAL/Base_with_time_stamp.h>
#include <CGAL/draw_triangulation_3.h> #include <CGAL/draw_triangulation_3.h>
@ -14,8 +14,8 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_data_structure_3< typedef CGAL::Triangulation_data_structure_3<
CGAL::Base_with_time_stamp<CGAL::Constrained_Delaunay_triangulation_vertex_base_3<K>>, CGAL::Base_with_time_stamp<CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<K>>,
CGAL::Constrained_Delaunay_triangulation_cell_base_3<K> > Tds; CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<K> > Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay; typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point; typedef Delaunay::Point Point;
using Point_3 = K::Point_3; using Point_3 = K::Point_3;
@ -67,7 +67,7 @@ int main()
#ifndef CGAL_TEST_CDT_3_USE_CDT #ifndef CGAL_TEST_CDT_3_USE_CDT
CGAL::Conforming_Delaunay_triangulation_3<Delaunay> cdt; CGAL::Conforming_Delaunay_triangulation_3<Delaunay> cdt;
#else #else
CGAL::Constrained_Delaunay_triangulation_3_impl<Delaunay> cdt; CGAL::Conforming_constrained_Delaunay_triangulation_3_impl<Delaunay> cdt;
#endif #endif
std::ifstream input(filename); std::ifstream input(filename);
@ -105,7 +105,7 @@ int main()
for (auto v : cdt.finite_vertex_handles()) { for (auto v : cdt.finite_vertex_handles()) {
std::cout << "Point ( " << v->point() << " )\n"; std::cout << "Point ( " << v->point() << " )\n";
std::cout << " on " << v->cdt_3_data().number_of_incident_constraints() std::cout << " on " << v->ccdt_3_data().number_of_incident_constraints()
<< " constraint(s)\n"; << " constraint(s)\n";
} }
std::cerr << "test2: " << filename << " " std::cerr << "test2: " << filename << " "

View File

@ -4,7 +4,7 @@
#include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/Conforming_Delaunay_triangulation_3.h> #include <CGAL/Conforming_Delaunay_triangulation_3.h>
#include <CGAL/Constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Surface_mesh.h> #include <CGAL/Surface_mesh.h>
@ -17,8 +17,8 @@
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_data_structure_3< typedef CGAL::Triangulation_data_structure_3<
CGAL::Constrained_Delaunay_triangulation_vertex_base_3<K>, CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<K>,
CGAL::Constrained_Delaunay_triangulation_cell_base_3<K> > Tds; CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<K> > Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay; typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Point Point; typedef Delaunay::Point Point;
using Point_3 = K::Point_3; using Point_3 = K::Point_3;
@ -44,7 +44,7 @@ int main(int argc, char* argv[])
#ifndef CGAL_TEST_CDT_3_USE_CDT #ifndef CGAL_TEST_CDT_3_USE_CDT
CGAL::Conforming_Delaunay_triangulation_3<Delaunay> cdt_edge; CGAL::Conforming_Delaunay_triangulation_3<Delaunay> cdt_edge;
#else #else
CGAL::Constrained_Delaunay_triangulation_3_impl<Delaunay> cdt_edge; CGAL::Conforming_constrained_Delaunay_triangulation_3_impl<Delaunay> cdt_edge;
#endif #endif
auto point_map = get(CGAL::vertex_point, mesh); auto point_map = get(CGAL::vertex_point, mesh);
auto dt_vertex_handle_map = auto dt_vertex_handle_map =