Skip to content

[Surface_mesh] Add static assertion when Eigen is not available and default traits is used - #9864

Merged
sloriot merged 3 commits into
CGAL:mainfrom
shellyco-code:Surface_mesh_deformation-static_assert_default_traits-shellyco
Nov 20, 2026
Merged

sloriot merged 3 commits into
CGAL:mainfrom
shellyco-code:Surface_mesh_deformation-static_assert_default_traits-shellyco

Conversation

@shellyco-code

@shellyco-code shellyco-code commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

Surface_mesh_deformation and Mean_curvature_flow_skeletonization rely on Eigen 3 as their default linear solver / closest rotation traits. When compiled without Eigen 3 (CGAL_EIGEN3_ENABLED not defined) and the user relies on default traits, the compiler attempts to instantiate operations on CGAL::Default, producing hundreds of lines of cryptic template failure messages.

This PR adds static_assert statements with clear, descriptive error messages instructing the user to either provide custom traits or link with the Eigen library, following the exact precedent established in Fixed_border_parameterizer_3.h and Orbifold_Tutte_parameterizer_3.h.

Release Management

…s used

Surface_mesh_deformation and Mean_curvature_flow_skeletonization
rely on Eigen 3 as default traits. When compiled without Eigen3 and
default traits are used, a static assertion with an explicit error
message is now triggered instead of producing deep template error cascades.

Assisted-by: Antigravity:gemini-2.5-pro
@sloriot

sloriot commented Nov 16, 2026

Copy link
Copy Markdown
Member

Thanks for the PR, that's indeed a good idea. I think it's already implemented at some places but clearly not here. I'll check where else we could have the same patch.

@shellyco-code

Copy link
Copy Markdown
Contributor Author

Thanks for the PR, that's indeed a good idea. I think it's already implemented at some places but clearly not here. I'll check where else we could have the same patch.

Thanks for reviewing! Let me know what you find.

@sloriot

sloriot commented Nov 20, 2026

Copy link
Copy Markdown
Member

Successfully tested in CGAL-6.3-Ic-137

@sloriot
sloriot merged commit a71715e into CGAL:main Nov 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add static assertion when Eigen3 is unavailable and default traits are used in Surface_mesh_deformation and Mean_curvature_flow_skeletonization

2 participants