Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] CGAL 3D conforming constrained Delaunay triangulation #8186

Draft
wants to merge 567 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
567 commits
Select commit Hold shift + click to select a range
d127192
WIP: cells markers
lrineau Feb 9, 2024
836dabf
rename from set_Steiner_vertex_on_face to set_Steiner_vertex_in_face
lrineau Feb 9, 2024
30e4d3b
wip
lrineau Feb 11, 2024
f649b20
move With_point_and_info_tag to Compact_container.h
lrineau Feb 13, 2024
a397f73
new debug flag
lrineau Feb 13, 2024
7952676
new markers for vertices
lrineau Feb 13, 2024
68762f5
add option --use-new-cavity-algorithm
lrineau Feb 13, 2024
a660bb3
small bug fix
lrineau Feb 13, 2024
eb2e346
add new test cases (from previous fixed bugs)
lrineau Feb 14, 2024
4a9210a
use a border edge of the region to orient the cavity (above/below)
lrineau Feb 14, 2024
6af6bae
add another data ste
lrineau Feb 15, 2024
877c575
stupid bug
lrineau Feb 15, 2024
228093b
fix the assertions
lrineau Feb 15, 2024
a669b96
remove debugging lines
lrineau Feb 15, 2024
15a6232
better debugging with --debug--regions
lrineau Feb 15, 2024
71f0159
add --debug-validity
lrineau Feb 15, 2024
c69bd87
documentation options
lrineau Feb 20, 2024
dd7ea77
add a data set that is not currently working
lrineau Feb 20, 2024
083dbf7
fix the timestamp system
lrineau Feb 21, 2024
0cc4f6e
simpler timestamp system
lrineau Feb 22, 2024
2a3b5f0
fix for data/106884-min1.off
lrineau Feb 22, 2024
5a56273
TDS::is_valid add a check of number_of_cells()
lrineau Feb 22, 2024
c23188d
T_3:::copy_triangulation_into_hole postpone *cit++
lrineau Feb 22, 2024
695b661
minor debug modifications
lrineau Feb 22, 2024
f23bbab
assert/CGAL_assertion
lrineau Feb 23, 2024
ec343d2
tweaks of CMake
lrineau Feb 23, 2024
9afcc20
two new buggy data sets
lrineau Feb 26, 2024
13ee2c9
More debug message in cdt.is_valid(true)
lrineau Feb 27, 2024
208019d
fix for error_mesh-p_not_equal_0-min2
lrineau Feb 27, 2024
6b3cf57
fix for data/113344-min3.off
lrineau Mar 1, 2024
d6affb0
fix for 90224.stl
lrineau Mar 4, 2024
8c5b03b
fix a debug message
lrineau Mar 6, 2024
2655765
change the distance check between constraint segment and vertex
lrineau Mar 6, 2024
7705aa3
fix the almost-coplanar regions detector
lrineau Mar 7, 2024
24c23c9
new options/criteria to choose which facets to merge
lrineau Mar 10, 2024
4e59d9d
new debug output: all borders of merged facets
lrineau Mar 10, 2024
866ece9
5.1 degrees seems right
lrineau Mar 13, 2024
bcb34a1
introduce Intel ITT for debug interaction with vtune
lrineau Mar 18, 2024
0869b41
optimizations about vtuning
lrineau Mar 18, 2024
a5c7297
reimplement does_first_triangle_intersect_second_triangle_interior
lrineau Mar 22, 2024
7457923
cleanup
lrineau Mar 22, 2024
827461b
WIP work-in-progress
lrineau Apr 3, 2024
c96e576
fix
lrineau Apr 3, 2024
bc5dd0a
protect debug code with a flag
lrineau Apr 4, 2024
71adadc
small optimization: use a Delaunay tr_3 instead of a CDT_3 for the ca…
lrineau Apr 4, 2024
7e8d4df
fix command line parameters
lrineau Apr 4, 2024
8e830fd
add flag --use-finite-edges-map
lrineau Apr 4, 2024
05c882f
final fix for `is_edge` with the hash set
lrineau Apr 5, 2024
1fd92e2
patch to speed up `incident_cells` in 3D
lrineau Apr 9, 2024
af90c7b
make_sorted_pair, for any aggregate with 2 members
lrineau Apr 10, 2024
3177352
vector<hash_set> instead of a hash_set of pairs
lrineau Apr 10, 2024
fc66bd9
minor tweak with constexpr in CT_2
lrineau Apr 11, 2024
aeba1b4
speed-up is_edge with function_output_iterator.
lrineau Apr 11, 2024
0d231ca
speed up incident_cells_threadsafe
lrineau Apr 11, 2024
25e9485
add CGAL::Scope_exit
lrineau Apr 11, 2024
c46fe96
reimplement TDS_3::is_edge (speed-up by a factor 7)
lrineau Apr 11, 2024
7f99d18
use Scope_exit
lrineau Apr 11, 2024
27591ab
use boost::unordered_flat_map to optimize Polyline_constraint_hierarc…
lrineau Apr 15, 2024
10d8a23
fix CC time_stamper
lrineau Apr 22, 2024
52a8343
fix oformat
lrineau Apr 22, 2024
85abe7b
fix missing include of <cstdint.h>
lrineau Apr 22, 2024
0db0d5b
add Orientation_3(Point_3, Point_3, Point_3, Vector_3)
lrineau Apr 22, 2024
31cec7e
make Circulator_from_container somewhat compatible with C++20 ranges
lrineau Apr 24, 2024
03a497e
remove a possible filter failure, when the target is a vertex
lrineau Apr 24, 2024
062b828
reduce symbols names
lrineau Apr 24, 2024
428c0f4
do not reinsert all vertices several times
lrineau Apr 24, 2024
77a2f15
reduce filter failures
lrineau Apr 24, 2024
1473923
add support for dumping surface mesh after merging facets
lrineau Apr 24, 2024
d31957f
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Apr 24, 2024
d5ac8eb
Revert "add Orientation_3(Point_3, Point_3, Point_3, Vector_3)"
lrineau Apr 24, 2024
28e1600
add CGAL_CAN_USE_CXX20_FORMAT macro for <format> support (C++20)
lrineau Apr 24, 2024
7a714de
remove CGAL::cpp17, useless now that CGAL requires C++17
lrineau Apr 25, 2024
4dbed03
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Apr 26, 2024
0bc4257
fix duplicate include <version>
lrineau Apr 26, 2024
90182eb
remove extra include
lrineau Apr 26, 2024
017c4ec
indentation
lrineau Apr 26, 2024
d655991
Merge branch 'CGAL-improvement_from_CDT_3_branch-GF' into Triangulati…
lrineau Apr 26, 2024
b6f95bf
Constrained_triangulation_3: add a skeleton of package and documentation
lrineau May 3, 2024
ad57aaa
add named parameters to Constrained_Delaunay_triangulation_3 constructor
lrineau May 5, 2024
69b6de3
wip for CDT_3 Cell/Vertex base concepts
lrineau May 5, 2024
42be242
new small icon for CDT_3 (working draft)
lrineau May 6, 2024
ee796e8
fix SPDX-License-Identifier headers
lrineau May 6, 2024
4cc32c8
fix groups
sloriot May 6, 2024
1dbc084
doc: fix links to the enums
lrineau May 6, 2024
f9af001
add <CGAL/license/Constrained_triangulation_3.h>
lrineau May 6, 2024
2114b00
add Constrained_Delaunay_triangulation_vertex_data_3
lrineau May 6, 2024
af30c32
add doc for Constrained_Delaunay_triangulation_cell_data_3
lrineau May 6, 2024
acaebc3
add Doxygen groups
lrineau May 6, 2024
eeade15
mv new header files from T_3/include to CT_3/include
lrineau May 6, 2024
6bacc13
wip on the compatibility with Tet remeshing
lrineau May 8, 2024
c10dcf7
allow to call save_binary_file on non-C3t3 type (like a CDT_3)
lrineau Jun 10, 2024
93fd966
use boost::unordered_flat_map to optimize Polyline_constraint_hierarc…
lrineau Apr 15, 2024
82b5359
Mesh_2: sort the sequence tr.subconstraints_begin(), tr.subconstraint…
lrineau Jun 13, 2024
68f4471
Implement Constrained_Delaunay_triangulation_3 and *_impl
lrineau Jun 19, 2024
a65df5b
CDT_vertex_base_3 no longer derives from Constrained_Delaunay_triangu…
lrineau Jun 19, 2024
c04a2d2
move Constrained_Delaunay_triangulation_vertex_base_3 in its header
lrineau Jun 19, 2024
e3d399d
implement Constrained_Delaunay_triangulation_cell_data_3
lrineau Jun 19, 2024
6fbd630
add an example, and try to use C++17 (not C++20)
lrineau Jun 20, 2024
4b50321
new documentation
lrineau Jun 20, 2024
d6b9aaa
[WIP] add an example with tet remeshing (does not work, yet)
lrineau Jun 20, 2024
5303df4
remove this file entirely from Doxygen's scope
lrineau Jun 20, 2024
a671ba6
almost fix the example with tet remeshing
lrineau Jun 20, 2024
244c49c
add a precondition: mesh without self-intersection
lrineau Jun 21, 2024
e50f7fd
add default_constrained_triangulation_3_t
lrineau Jun 21, 2024
474fc3e
document two functions in Constrained_Delaunay_triangulation_cell_data_3
lrineau Jun 21, 2024
c4c1898
fix the example
lrineau Jun 21, 2024
c31af54
reorganize and remove debug messages
lrineau Jun 21, 2024
12d333c
Fix the concept SimplicialMeshVertexBase_3
lrineau Jun 21, 2024
3325bd6
add the first example in the doc
lrineau Jun 21, 2024
c35dd84
fix the compilation of the remeshing example
lrineau Jun 21, 2024
797d606
cleanup the ref manual
lrineau Jun 21, 2024
4a95f18
wip: expose the CDT_3 class template
lrineau Jun 21, 2024
e7a3bf5
new version, after review
lrineau Jun 28, 2024
6a45cc9
CSS adapted to dark mode
lrineau Jun 28, 2024
7f4928b
merge master (WIP: need #8273)
lrineau Jul 1, 2024
0cb50bc
Merge remote-tracking branch 'lrineau/CGAL-followup_PR_8170-lrineau' …
lrineau Jul 1, 2024
578f5bc
add the construction from polygon soups
lrineau Jul 2, 2024
4d0a89b
fix license headers
lrineau Jul 2, 2024
35b4f61
include license header
lrineau Jul 3, 2024
c99886d
a trailing space?!
lrineau Jul 3, 2024
58b930a
after pre-review
lrineau Jul 3, 2024
69b03d2
fix missing includes
lrineau Jul 3, 2024
564db69
a new example
lrineau Jul 3, 2024
8ad3541
remove Default_constrained_Delaunay_triangulation_3_type_generator fr…
lrineau Jul 4, 2024
b65c2ff
fix compilation with C++17
lrineau Jul 8, 2024
cefd1e1
update doc for Doxygen 1.9.6 as well
lrineau Jul 9, 2024
72200ca
add dependencies
lrineau Jul 9, 2024
8920af9
rename template parameters
lrineau Jul 25, 2024
caf7c3a
doc improvements after review
lrineau Jul 25, 2024
21e72b4
remove Default_constrained_Delaunay_triangulation_3
lrineau Jul 25, 2024
4e7ff3d
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Jul 26, 2024
8eaabab
cdt_3 plugin
lrineau Jul 27, 2024
8ba8d99
fix memory leaks
lrineau Jul 28, 2024
1d0604c
simplification
lrineau Jul 28, 2024
34792e4
new version of the cdt_3 plugin: can take a colorized surface_mesh as…
lrineau Jul 29, 2024
647686a
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Sep 9, 2024
093d400
the basic viewer bug is now fixed in `master`
lrineau Sep 9, 2024
7789bbe
rename to add "conforming"
lrineau Oct 10, 2024
029f1a5
ugly workaround to remove the `=default` from the documentation
lrineau Oct 10, 2024
a21a5eb
use lowercase
lrineau Oct 10, 2024
9a950d3
link to TDS_3::Facet
lrineau Oct 11, 2024
9764d6f
formatting of CSS file
lrineau Oct 11, 2024
c4389ad
fix for pictures, in dark mode
lrineau Oct 11, 2024
05f3c4e
fix css linter errors (empty rulesets)
lrineau Oct 11, 2024
e66153d
css: same for Doxygen 1.9.6
lrineau Oct 11, 2024
36cee61
fix the PLY output
lrineau Oct 28, 2024
11a02ba
output to medit instead of binary.cgal
lrineau Oct 28, 2024
9cec9a5
implement new option "--debug-input-faces"
lrineau Nov 4, 2024
4311a38
add new debug code
lrineau Nov 4, 2024
82760b7
Fix a regression bug in `cdt_3_from_off`
lrineau Nov 4, 2024
75c0d7e
refactor the handling of program options
lrineau Nov 4, 2024
02ba9ac
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Nov 12, 2024
8493324
fix trailing spaces
lrineau Nov 12, 2024
f3253ad
detect self-intersecting inputs
lrineau Nov 20, 2024
8cea360
typo in variable names
lrineau Nov 20, 2024
e56adc0
incorrect use of tl::expected
lrineau Nov 20, 2024
1c9b15f
reorganise the user-code, in other to prepare a refactoring
lrineau Nov 21, 2024
ae7c807
Better --debug_input_faces (dump polygon files)
lrineau Nov 22, 2024
831f78e
add command line option --reject-self-intersections
lrineau Nov 22, 2024
03ae340
reorganize display on cerr/cout
lrineau Nov 22, 2024
ec72e08
Merge branch 'master' into Triangulation_3-CDT_3-lrineau
lrineau Nov 22, 2024
8a8df44
apply Jane's suggestions in the PR review
lrineau Nov 25, 2024
83730cb
update the documentation of CDT_3 free functions
lrineau Dec 2, 2024
cefb552
improve the text for examples
lrineau Dec 3, 2024
102d655
more changes after Jane's review
lrineau Dec 3, 2024
97cb702
factorize a paragraph to an \include[doc]
lrineau Dec 4, 2024
1ae299c
Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3…
lrineau Dec 4, 2024
ad426ee
fix and improvement during peer-review with Jane
lrineau Dec 5, 2024
b901960
commit Jane's suggestion of wording
lrineau Dec 5, 2024
0229fba
fix the CMake file after the introduction of tf::expected
lrineau Dec 6, 2024
1e84938
add a ref to does_triangle_soup_self_intersect (suggested by Mael)
lrineau Dec 6, 2024
c1efeec
add an explicit return section (discussion with Andreas)
lrineau Dec 6, 2024
e1a07a2
improve read_polygon_mesh_for_cdt_3
lrineau Dec 6, 2024
a1aba2b
cgal_stylesheet.css must be taken from ../Manual
lrineau Dec 16, 2024
345b8a4
fix build with Doxygen 1.10 and later
lrineau Dec 16, 2024
aaac2c2
Merge remote-tracking branch 'cgal/master' into pr/lrineau/8273
lrineau Jan 8, 2025
5526857
Add CGAL::unordered_flat_map implementation
lrineau Jan 8, 2025
b12625f
fix an error detected by UBSAN
lrineau Jan 8, 2025
ea151ff
fix CGAL_USE_BARE_STD_MAP with Polyline_constraint_hierarchy_2
lrineau Jan 8, 2025
bc8c1e6
new allocator type, that allocates randomly on purpose
lrineau Jan 8, 2025
364ba15
fix a missing #include
lrineau Jan 8, 2025
bdedee7
remove unnecessary INPUT variable from Doxyfile for CDT_3
lrineau Jan 10, 2025
e5807ca
TWS
sloriot Jan 10, 2025
56bb419
cleanup existing code
lrineau Jan 10, 2025
e03ba91
Boost >= 1.74 is now required
lrineau Jan 10, 2025
93ac184
CDT_plus_2 hierarchy: add Edge_iterator, that is deterministic
lrineau Jan 10, 2025
d468962
hierarchy: remove `remove_Steiner(T v, T va, T vb)`
lrineau Jan 13, 2025
926bb0c
hierarchy: remove two undefined member functions
lrineau Jan 13, 2025
eafa97a
major cleanup of Polyline_constraint_hierarchy_2
lrineau Jan 13, 2025
1f70e59
doc bug-fix
lrineau Jan 14, 2025
d4e6ffd
fix protection against min/max macros
lrineau Jan 14, 2025
2869ad8
fix compilation errors with C++<20
lrineau Jan 15, 2025
cf50ad8
document the breakng change
lrineau Jan 16, 2025
cf815b8
doc fix: add that iterators are all bidirectional
lrineau Jan 16, 2025
1ce1087
rewrite/refactor a lot of the code
lrineau Jan 22, 2025
2db7278
add failing tests (for now)
lrineau Jan 22, 2025
7808c6f
fix the failing test
lrineau Jan 22, 2025
9ddc529
cleanup in CGAL/Iterator_range.h
lrineau Jan 22, 2025
0b4dfa8
Polyline_constraint_hierarchy_2: get_contexts -> context
lrineau Jan 22, 2025
58c739c
clearnup: remove undocumnted/unused member functions
lrineau Jan 22, 2025
f95027a
Polyline_constraint_hierarchy_2: more refactoring
lrineau Jan 22, 2025
9f5bee7
rename contexts_end to contexts_not_found because that name is alread…
lrineau Jan 23, 2025
49a9efa
add a nested type using Vertex_handle_compare = Compare;
lrineau Jan 23, 2025
3d61960
use using-declarations and type aliases
lrineau Jan 23, 2025
0dcc287
add CGAL::unordered_flat_set
lrineau Jan 23, 2025
239a2ad
virtual -> override
lrineau Jan 23, 2025
7961908
derive Ct_plus_2 from the hierarchy
lrineau Jan 23, 2025
0d84f27
whitespace and comments
lrineau Jan 23, 2025
310f4bd
glue constraints_set.insert(..) and new_constraint_id()
lrineau Jan 23, 2025
b31c2dd
CDt_plus_2: lots of refactoring
lrineau Jan 24, 2025
e1e94a1
fix a warning from UBSAN (in a postcondition)
lrineau Jan 24, 2025
9fa067c
recycle the constraints indices
lrineau Jan 24, 2025
5a1f8cd
small optimization
lrineau Jan 28, 2025
7f88e5b
fix compilation errors with MSVC 2017 (VC++ 19.16)
lrineau Jan 28, 2025
b701981
fix another compilation error
lrineau Jan 28, 2025
96dbd55
extra fix for MSVC 2017 in Constrained_Delaunay_triangulation_2
lrineau Jan 29, 2025
c6d6d67
fix compilation error with gcc-12.2
lrineau Jan 29, 2025
a45ac3e
fix the detection of <format> and std::format
lrineau Jan 29, 2025
571c2cc
fix compilation errors with C++>=20, or g++12.2.0
lrineau Jan 30, 2025
d837dbd
fix for STL debug mode
lrineau Jan 30, 2025
b50579b
another fix for the buggy compiler from MSVC 2017
lrineau Jan 31, 2025
050677f
add CMake option CGAL_with_benchmarks
lrineau Feb 6, 2025
765744e
fix WKT I/O error handling
lrineau Feb 6, 2025
bc44c91
add a benchmark for Polyline_simplification_2
lrineau Feb 6, 2025
8eefb7f
Merge branch 'master' into pr/lrineau/8273
lrineau Feb 7, 2025
4e5fed8
fix a bug when `CGAL_BRANCH_BUILD` is falsy (in testsuite tarballs fo…
lrineau Feb 10, 2025
b2a6b18
Merge remote-tracking branch 'lrineau/CGAL-followup_PR_8170-lrineau' …
lrineau Feb 11, 2025
5f8d222
add `CGAL_setup_tl-excepted.cmake`
lrineau Feb 11, 2025
ec5b30d
fix a warning
lrineau Feb 12, 2025
f0a07a6
more check of the use of `<format>`
lrineau Feb 12, 2025
1361c8a
min/max issues
lrineau Feb 12, 2025
9f47170
fix the static assertions about nothrow-movable
lrineau Feb 12, 2025
4967a10
add a script to detect min/max issues
lrineau Feb 12, 2025
0785f7e
Add #include <stack>
afabri Feb 13, 2025
29dfa38
workaround doc issues
sloriot Feb 13, 2025
eca2098
relates and groups are somehow incompatible as the doc is then supposed
sloriot Feb 13, 2025
4fddcf0
Add dependency for Identity_property_map link
afabri Feb 13, 2025
af1d9f5
Add EXTENSION_MAPPING += dox-frag=md
afabri Feb 13, 2025
1b00fff
ws
afabri Feb 13, 2025
dc430fc
temporarily disable the static_assert's
sloriot Feb 13, 2025
5f101a0
Revert "Add EXTENSION_MAPPING += dox-frag=md"
sloriot Feb 13, 2025
61b7af7
one extra tmp disable
sloriot Feb 14, 2025
ab5eb88
fix warning and avoid a copy
sloriot Feb 14, 2025
c654e75
fix compilation on non fully c++2- compliant
sloriot Feb 14, 2025
96831fe
conditional thingi
sloriot Feb 14, 2025
611141e
disable case failing while it is debugged
sloriot Feb 14, 2025
f26d8d4
wip user manual cdt_3
janetournois Mar 11, 2025
7d7acff
user manual wip
janetournois Mar 11, 2025
a6e7853
fix title
janetournois Mar 11, 2025
39444ac
examples in user manual
janetournois Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1205,3 +1205,24 @@ Polygonal_surface_reconstruction/examples/build*
Polygonal_surface_reconstruction/test/build*
Solver_interface/examples/build*
/Mesh_3/examples/Mesh_3/indicator_0.inr.gz
dump-*.xyz
dump-*.binary.cgal
dump_*.txt
dump_*.off
dump-*.polylines.txt
all_segments.polylines.txt
Data/data/meshes/*.*.vtk
Data/data/meshes/*.*.ele
Data/data/meshes/*.*.face
Data/data/meshes/*.*.edge
Data/data/meshes/*.*.node
Data/data/meshes/*.*.mesh
Data/data/meshes/*.*.smesh
Data/data/meshes/*.off-cdt-output.off
Data/data/meshes/*.log
/*.off
/*.xyz
log.txt
/r0*
patches_after_merge.ply
dump.off.mesh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*!
\ingroup PkgCT_3Concepts
\cgalConcept

The concept `ConformingConstrainedDelaunayTriangulationCellBase_3` refines the concept
`TriangulationCellBase_3` and is the base cell class for
the `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.

\cgalRefines{TriangulationCellBase_3, BaseWithTimeStamp}

\cgalHasModelsBegin
\cgalHasModels{CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3}
\cgalHasModelsEnd

\sa `ConformingConstrainedDelaunayTriangulationVertexBase_3`
*/
class ConformingConstrainedDelaunayTriangulationCellBase_3 {
public:

/// @name Access Functions
///
/// The following functions return a reference to an object of type
/// `CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3`, that contains
/// the per-cell data required by the implementation of the
/// `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
/// @{
CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data();
const CGAL::Conforming_constrained_Delaunay_triangulation_cell_data_3& ccdt_3_data() const;
/// @}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*!
\ingroup PkgCT_3Concepts
\cgalConcept

The concept `ConformingConstrainedDelaunayTriangulationTraits_3` specifies the requirements
for the geometric traits class of the triangulation used as the first template
parameter `Triangulation_3` in the function template
`CGAL::make_conforming_constrained_Delaunay_triangulation_3()`.

\cgalRefines{DelaunayTriangulationTraits_3}

\cgalHasModelsBegin
\cgalHasModels{CGAL::Exact_predicates_inexact_constructions_kernel (recommended)}
\cgalHasModelsBare{all %CGAL kernels}
\cgalHasModelsEnd

\todo Add the requirements in the concept `ConformingConstrainedDelaunayTriangulationTraits_3`.

*/
class ConformingConstrainedDelaunayTriangulationTraits_3 {
public:
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*!
\ingroup PkgCT_3Concepts
\cgalConcept

The concept `ConformingConstrainedDelaunayTriangulationVertexBase_3` refines the concept
`TriangulationVertexBase_3` and is the base vertex class for
the `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.

\cgalRefines{TriangulationVertexBase_3, BaseWithTimeStamp}

\cgalHasModelsBegin
\cgalHasModels{CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3}
\cgalHasModelsEnd

\sa `ConformingConstrainedDelaunayTriangulationCellBase_3`

*/
class ConformingConstrainedDelaunayTriangulationVertexBase_3 {
public:

/// @name Access Functions
///
/// The following functions return a reference to an object of type
/// `CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3`, that contains
/// the per-vertex data required by the implementation of the
/// `CGAL::make_conforming_constrained_Delaunay_triangulation_3()` function template.
/// @{
CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data();
const CGAL::Conforming_constrained_Delaunay_triangulation_vertex_data_3& ccdt_3_data() const;
/// @}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace CGAL {
/*!

\mainpage User Manual
\anchor Chapter_CT_3
\cgalAutoToc
\author Laurent Rineau

This chapter describes the ...

* \todo Explain what is a CDT. Why a given input, like a polyhedron, might not admit a constrained Delaunay triangulation.
* Explain "conforming to the faces of a polygon mesh".
*

\section CT_3_definitions Definitions

Section on definitions here ...

\section CT_3examples Examples

\subsection myFirstExample First Example

The following example shows ...

\cgalExample{Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3.cpp }

or from a polygon soup ...

\cgalExample{Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3_from_soup.cpp }

*/
} /* namespace CGAL */
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Constrained Triangulations"

INPUT += ${CGAL_PACKAGE_INCLUDE_DIR}
EXAMPLE_PATH += ${CGAL_PACKAGE_DOC_DIR}/doc_fragments
QUIET = YES
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*!
\defgroup PkgCT_3Ref 3D Constrained Triangulations Reference

\defgroup PkgCT_3Concepts Concepts
\ingroup PkgCT_3Ref

\defgroup PkgCT_3Functions Function Templates
\ingroup PkgCT_3Ref

\defgroup PkgCT_3Classes Classes and Class Templates
\ingroup PkgCT_3Ref

\addtogroup PkgCT_3Ref
\cgalPkgDescriptionBegin{3D Constrained Triangulations,PkgCT_3}
\cgalPkgPicture{cdt3-small.png}

\cgalPkgSummaryBegin
\cgalPkgAuthors{Laurent Rineau}
\cgalPkgDesc{This package allows to build and handle 3D constrained Delaunay triangulations.}
\todo Add more description.
\cgalPkgManuals{Chapter_CT_3,PkgCT_3Ref}
\cgalPkgSummaryEnd

\cgalPkgShortInfoBegin
\cgalPkgSince{6.1}
\cgalPkgDependsOn{\ref PkgTriangulation3 "3D Triangulations"}
\cgalPkgBib{cgal:x-x}
\cgalPkgLicense{\ref licensesGPL "GPL"}
\noop \cgalPkgDemo{DEMO 2,demo2.zip}
\todo Add a demo

\cgalPkgShortInfoEnd

\cgalPkgDescriptionEnd

\cgalClassifedRefPages
`CGAL::make_conforming_constrained_Delaunay_triangulation_3()` is the main function to create
a conforming constrained Delaunay triangulation in 3D, an instance of the class template
`CGAL::Conforming_constrained_Delaunay_triangulation_3`.

\cgalCRPSection{Functions Templates}

- `CGAL::make_conforming_constrained_Delaunay_triangulation_3()`

\cgalCRPSection{Concepts}

- `ConformingConstrainedDelaunayTriangulationTraits_3`
- `ConformingConstrainedDelaunayTriangulationVertexBase_3`
- `ConformingConstrainedDelaunayTriangulationCellBase_3`

\cgalCRPSubsection{Class Templates}

- `CGAL::Conforming_constrained_Delaunay_triangulation_3<Traits, Triangulation>`
- `CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<Traits, Vertex_base>`
- `CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<Traits, Cell_base>`
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BGL
Kernel_23
Manual
SMDS_3
STL_Extension
TDS_3
Tetrahedral_remeshing
Triangulation_3
Polygon_mesh_processing
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\cgalParamNBegin{geom_traits}
\cgalParamDescription{an instance of a geometric traits class}
\cgalParamType{`Traits` as defined above in the section \ref make_conforming_constrained_Delaunay_triangulation_3_returned_type}
\cgalParamDefault{the default constructed traits object `Traits{}`}
\cgalParamNEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\tparam Triangulation an instance of the `CGAL::Conforming_constrained_Delaunay_triangulation_3` class template,
or `CGAL::Default`
\tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The input data (polygon mesh or polygon soup) represents the polygonal constraints enforced
during the triangulation process.

By default, each face of the input is considered a polygonal constraint for the triangulation. The
named parameter `face_patch_map` can be used to describe larger polygonal constraints, possibly with holes. If
used, this parameter must be a property map that associates each face of the input with a patch
identifier. Faces with the same patch identifier are considered part of the same surface patch. Each of these
surface patches (defined as the union of the input faces with a given patch identifier) is expected to be a polygon or a
polygon with holes, with coplanar vertices (or nearly coplanar up to the precision of the number type used).

The generated triangulation will conform to the faces of the input or to the surface patches
described by the `face_patch_map` property map if provided.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*!
\example Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3.cpp
Simple example demonstrating the usage of the Constrained_triangulation_3 package.

It constructs a 3D constrained Delaunay triangulation from a polygon mesh.
*/

/*!
\example Constrained_triangulation_3/conforming_constrained_Delaunay_triangulation_3_from_soup.cpp
Simple example demonstrating the usage of the Constrained_triangulation_3 package.

It constructs a constrained Delaunay triangulation from a polygon soup.
*/

/*!
\example Constrained_triangulation_3/remesh_constrained_Delaunay_triangulation_3.cpp
How to use `CGAL::tetrahedral_isotropic_remeshing` with a constrained Delaunay triangulation.
*/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.1...3.23)
project(Constrained_triangulation_3_Examples)

find_package(CGAL REQUIRED COMPONENTS Qt6)

create_single_source_cgal_program(conforming_constrained_Delaunay_triangulation_3.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)

if(CGAL_Qt6_FOUND)
target_link_libraries(conforming_constrained_Delaunay_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer)
else()
message(STATUS "NOTICE: The example 'conforming_constrained_Delaunay_triangulation_3' requires Qt6, and will not be compiled.")
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/draw_triangulation_3.h>

#include <algorithm>

using K = CGAL::Exact_predicates_inexact_constructions_kernel;

int main(int argc, char* argv[])
{
CGAL::Surface_mesh<K::Point_3> mesh;

auto filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/mpi.off");
std::ifstream in(filename);
if(!in || !CGAL::IO::read_OFF(in, mesh)) {
std::cerr << "Error: cannot read file " << filename << std::endl;
return EXIT_FAILURE;
}

std::cout << "Read " << mesh.number_of_vertices() << " vertices and "
<< mesh.number_of_faces() << " faces" << std::endl;

auto ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(mesh);

std::cout << "Number of vertices in the CDT: "
<< ccdt.triangulation().number_of_vertices() << '\n'
<< "Number of constrained facets in the CDT: "
<< ccdt.number_of_constrained_facets() << '\n';

CGAL::draw(ccdt.triangulation());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <vector>
#include <CGAL/draw_triangulation_3.h>

#include <algorithm>

using K = CGAL::Exact_predicates_inexact_constructions_kernel;

int main(int argc, char* argv[])
{
std::vector<K::Point_3> points;
std::vector<std::vector<std::size_t>> polygons;

auto filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/cubes.off");
std::ifstream in(filename);
if(!in || !CGAL::IO::read_OFF(in, points, polygons)) {
std::cerr << "Error: cannot read file " << filename << std::endl;
return EXIT_FAILURE;
}

std::cout << "Read " << points.size() << " vertices and "
<< polygons.size() << " polygons" << std::endl;

auto ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(points, polygons);

std::cout << "Number of vertices in the CDT: "
<< ccdt.triangulation().number_of_vertices() << '\n'
<< "Number of constrained facets in the CDT: "
<< ccdt.number_of_constrained_facets() << '\n';

CGAL::draw(ccdt.triangulation());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE 1
#define CGAL_TETRAHEDRAL_REMESHING_DEBUG 1

#include <CGAL/make_conforming_constrained_Delaunay_triangulation_3.h>

#include <CGAL/tetrahedral_remeshing.h>

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/draw_triangulation_3.h>

#include <fstream>
#include <string>

using K = CGAL::Exact_predicates_inexact_constructions_kernel;
using Vb = CGAL::Conforming_constrained_Delaunay_triangulation_vertex_base_3<K>;
using Cb = CGAL::Conforming_constrained_Delaunay_triangulation_cell_base_3<K>;
using Tds = CGAL::Triangulation_data_structure_3<Vb, Cb>;
using Tr = CGAL::Triangulation_3<K, Tds>;
using CCDT = CGAL::Conforming_constrained_Delaunay_triangulation_3<K, Tr>;

int main(int argc, char* argv[])
{
std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/mpi.off");
std::ifstream in(filename);

CGAL::Surface_mesh<K::Point_3> mesh;
if(!in || !CGAL::IO::read_OFF(in, mesh)) {
std::cerr << "Error: cannot read file " << filename << std::endl;
return EXIT_FAILURE;
}
CCDT ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3<CCDT>(mesh);
//! [move ccdt to tr]
Tr tr = std::move(ccdt).triangulation();
//! [move ccdt to tr]
std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl;
CGAL::tetrahedral_isotropic_remeshing(tr, 0.1,
CGAL::parameters::number_of_iterations(3));

std::cout << "Number of vertices in tr: "
<< tr.number_of_vertices() << std::endl;
CGAL::draw(ccdt.triangulation());
}
Loading
Loading