Add functions to compute the kernel of a mesh
## Release Management
* Affected package(s): `PMP`, `BGL`
* Issue(s) solved (if any):
* Feature/Small Feature (if any):
[Mesh_Kernel](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Mesh_Kernel)
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*]()
* License and copyright ownership: GF
## Summary of Changes
This PR fixes the error reported in issue #781. The main two changes
are:
- in `Refine_edges.h`: allow the refinement point of a constrained edge
to be an existing close encroaching vertex,
- in `Refine_faces.h`: skip tiny bad faces when their bbox are smaller
than a few ulp.
## Release Management
* Affected package(s): Triangulation_2, Mesh_2
* Issue(s) solved (if any): fix#781
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*](httpssss://wrong_URL_to_be_changed/Manual/Pkg)
* License and copyright ownership: maintenance by GeometryFactory, now
copyright change
## Summary
This PR adds a new debugging utility `bisect_failures` to the
STL_Extension package. This function helps identify minimal failing test
cases from complex input data by using a bisection-like approach.
**Small feature: [bisect failures debugging
utility](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/bisect_failures_debugging_utility)**
## Features
- **Multiple failure type support**: Handles CGAL exceptions,
std::exceptions, and exit codes
- **Automatic granularity adjustment**: Starts with ratio=0.5,
automatically halves when no fault is found
- **Debug output**: Saves intermediate states (`current`, `bad`,
`error`, `final_bad`)
- **Template-based design**: Works with any copyable/assignable data
type
## Testing
Added comprehensive test suite (`test_bisect_failures.cpp`) with 14
tests:
- ✅ Edge cases (empty data, no failures)
- ✅ Single element failures (CGAL exception, std::exception, exit code)
- ✅ Pair combinations (all 2-element permutations)
- ✅ Triple combinations (all 3 failure types together)
All tests pass in both Debug and Release configurations.
## Use Case
This utility is particularly useful for:
- Debugging complex geometric algorithms with large input datasets
- Finding minimal reproducible test cases from failing inputs
- Isolating problematic elements in mesh processing, triangulation, etc.
## Example Usage
```cpp
auto get_size = [](const Mesh& m) { return m.number_of_faces(); };
auto simplify = [](Mesh& m, std::size_t start, std::size_t end) -> bool {
// Remove faces from start to end
for(std::size_t i = start; i < end && i < m.number_of_faces(); ++i) {
m.remove_face(start);
}
return true;
};
auto run = [](const Mesh& m) -> int { return algorithm(m); };
auto save = [](const Mesh& m, const std::string& prefix) {
std::ofstream out(prefix + ".off");
out << m;
};
int result = bisect_failures(mesh, get_size, simplify, run, save);
```
## Files Changed
- `STL_Extension/include/CGAL/bisect_failures.h` (new) - Main utility
header
- `STL_Extension/test/STL_Extension/test_bisect_failures.cpp` (new) -
Test suite
- `STL_Extension/test/STL_Extension/CMakeLists.txt` (modified) - Added
test
## Checklist
- [x] Code compiles without errors (Debug and Release)
- [x] All tests pass
- [x] Comprehensive documentation with Doxygen comments
- [x] Example usage in documentation
- [x] Follows CGAL coding style conventions
- [x] Deal with false positive in the testsuite
## Release Management
* Affected package(s): `STL_Extension`
* Feature/Small Feature (if any): [bisect failures debugging
utility](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/bisect_failures_debugging_utility)
* Link to compiled documentation (obligatory for small feature)
[doc](https://cgal.github.io/9118/v2/STL_Extension/group__PkgSTLExtensionUtilities.html#gad56d708faac9063d3de057394a6d8c52)
* License and copyright ownership: no change
The `message()` of a CGAL exception might have been generated at runtime.
It makes no sense to compare messages: the CGAL assertion is already identified
by the filename, and line number (plus the expression that was tested).
## Summary of Changes
New package for 3D barycentric coordinates in a convex polyhedron
## Release Management
* Affected package(s): New package
* Feature/Small Feature (if any):
[here](https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Barycentric_coordinates_3)
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*](httpssss://wrong_URL_to_be_changed/Manual/Pkg)
* License and copyright ownership: GF
## TODO
- [x] check branch size (@sloriot)
- [x] check usage of `get_tolerance()` from
`Barycentric_coordinates_3/include/CGAL/Barycentric_coordinates_3/internal/utils_3.h`
Replaces the `FetchContent` mechanism with a vendored copy of
`tl/expected.hpp` (v1.1.0).
The header is placed in `CGAL/tl/expected.hpp` to avoid namespace
pollution.
This also removes the CMake module `CGAL_setup_tl-excepted.cmake`.
## Release Management
* Affected package(s): Constrained_triangulation_3
* Issue(s) solved (if any): #9145
* License and copyright ownership: CC0 1.0 Universal (tl/expected.hpp)
## Summary of Changes
Replaced manual ternary operator logic with `std::clamp` in
`CGAL/Spatial_lock_grid_3.h`.
The changes include:
- Replacing manual index clamping (ternary operators) with C++17
`std::clamp`.
- Removing commented-out code and a `@TODO` comment suggesting this
exact change.
## Release Management
* Affected package(s): `STL_Extension`
* Issue(s) solved (if any): Resolves in-code `@TODO: use std::clamp`
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature):
* License and copyright ownership: I confirm that I have the right to
contribute these changes under the CGAL license terms.
## Summary of Changes
improve `TDS_3::is_valid`:
- for a vertex, verify that its `cell()` that is not removed from the
`Compact_container`,
- for a cell, verify that its `neighbor(i)` and `vertex(i)` are not
removed,
- and display using `CGAL::IO::oformat`.
## Release Management
* Affected package(s): TDS_3, and all 3D triangulation packages
* License and copyright ownership: no change, maintenance by GF
## Summary of Changes
Avoid computing them when they are known.
* Normals are only used for estimating the angle between neighbor faces.
PCA is used to estimate the plane.
* sorting should be reusing the triangulation of faces that is already
done in regions (pass the internal map to `sort()` for exemple). PCA is
also used here to estimate the flatness score of a face in its
neighborhood
* About sorting: I'm not sure it wouldn't be a better idea to simply
sort using the area of the faces and ignore flatness of the
neighborhood.
## Release Management
* Affected package(s): `Shape_detection`
* small feature:
[Pass_face_normals_for_region_growing](https://cgalwiki.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Pass_face_normals_for_region_growing)
* Issue(s) solved (if any):