cgal icon indicating copy to clipboard operation
cgal copied to clipboard

`Adaptive_sizing_field` fails to compile with epeck

Open efifogel opened this issue 11 months ago • 4 comments

Issue Details

The title says it all. It fails on line 266: vertex_size /= CGAL::halfedges_around_target(v, pmesh).size(); The following fixes it vertex_size /= FT(CGAL::halfedges_around_target(v, pmesh).size());

Source Code

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/Adaptive_sizing_field.h

Environment

  • Operating system (Windows/Mac/Linux, 32/64 bits): Ubuntu 22.04, (64)
  • Compiler: gcc 11.4.0
  • Release or debug mode: both
  • Specific flags used (if any): none
  • CGAL version: 6.0.1
  • Boost version: irrelevant
  • Other libraries versions if used (Eigen, TBB, etc.):

efifogel avatar Jan 27 '25 10:01 efifogel

The following fixes it vertex_size /= FT(CGAL::halfedges_around_target(v, pmesh).size());

Actually, CGAL concept for our Kernel::FT types does not require that FT is constructible from std::size_t (returned by Iterator_range.size()), but only by int: concept FromIntConstructibl.

The correct code should be:

vertex_size /= FT(static_cast<int>(CGAL::halfedges_around_target(v, pmesh).size()));

lrineau avatar Jan 28 '25 10:01 lrineau

The interpolated_corrected_curvatures function called by adaptive_sizing_filed uses square roots and trigonometric functions, which makes it incompatible with EPECK. Am I missing something?

LeoValque avatar Apr 28 '25 16:04 LeoValque

We can fix things, but let me ask you, @efifogel, what motivates the usage of Epeck with an iterative function? We just know that it creates deep dags. If there is a need, would it not make sense then to create a point property map?

afabri avatar Apr 29 '25 07:04 afabri

bump @efifogel

MaelRL avatar Sep 01 '25 09:09 MaelRL