Skip to content

SMDS_3 - add class Simplicial_mesh_triangulation_3 to ease the use of C3t3 #8868

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

janetournois
Copy link
Member

@janetournois janetournois commented Apr 29, 2025

The example c3t3_example forces the user to have typedefs for cell base, vertex base, Tds, T3...
I suggest to add a new helper type Simplicial_mesh_triangulation_3 that holds everything needed.

Summary of Changes

Add Simplicial_mesh_triangulation_3 and an example

Release Management

  • Affected package(s): SMDS_3
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: unchanged

Todo :

  • write doc
  • small feature

@janetournois
Copy link
Member Author

@MaelRL @lrineau do you agree with the principle of that PR?
If you are ok I will write the doc and small feature

@lrineau
Copy link
Member

lrineau commented May 2, 2025

@MaelRL @lrineau do you agree with the principle of that PR? If you are ok I will write the doc and small feature

Yes. But I think Simplicial_mesh_triangulation_3 should be a template alias, instead of a class template.

Co-authored-by: Laurent Rineau <Laurent.Rineau@cgal.org>
@janetournois
Copy link
Member Author

@MaelRL @lrineau do you agree with the principle of that PR? If you are ok I will write the doc and small feature

Yes. But I think Simplicial_mesh_triangulation_3 should be a template alias, instead of a class template.

agreed!

Comment on lines 30 to 46
template<typename K,
typename SubdomainIndex = int,
typename SurfacePatchIndex = int,
typename CurveIndex = int,
typename CornerIndex = int>
using Simplicial_mesh_triangulation_3 =
public CGAL::Triangulation_3<K,
CGAL::Triangulation_data_structure_3<
CGAL::Simplicial_mesh_vertex_base_3<K,
SubdomainIndex,
SurfacePatchIndex,
CurveIndex,
CornerIndex>,
CGAL::Simplicial_mesh_cell_base_3<K, SubdomainIndex, SurfacePatchIndex>,
CGAL::Sequential_tag>
>
{};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My patch was wrong. There is an error in the CI:

/home/runner/work/cgal/cgal/Installation/../SMDS_3/include/CGAL/Simplicial_mesh_triangulation_3.h:36:7: error: expected type-specifier before ‘public’
   36 |       public CGAL::Triangulation_3<K,
      |       ^~~~~~

Here is the fix, with a bit a reformatting as well:

Suggested change
template<typename K,
typename SubdomainIndex = int,
typename SurfacePatchIndex = int,
typename CurveIndex = int,
typename CornerIndex = int>
using Simplicial_mesh_triangulation_3 =
public CGAL::Triangulation_3<K,
CGAL::Triangulation_data_structure_3<
CGAL::Simplicial_mesh_vertex_base_3<K,
SubdomainIndex,
SurfacePatchIndex,
CurveIndex,
CornerIndex>,
CGAL::Simplicial_mesh_cell_base_3<K, SubdomainIndex, SurfacePatchIndex>,
CGAL::Sequential_tag>
>
{};
template<typename K,
typename SubdomainIndex = int,
typename SurfacePatchIndex = int,
typename CurveIndex = int,
typename CornerIndex = int>
using Simplicial_mesh_triangulation_3 =
CGAL::Triangulation_3<K,
CGAL::Triangulation_data_structure_3<
CGAL::Simplicial_mesh_vertex_base_3<K,
SubdomainIndex,
SurfacePatchIndex,
CurveIndex,
CornerIndex>,
CGAL::Simplicial_mesh_cell_base_3<K, SubdomainIndex, SurfacePatchIndex>,
CGAL::Sequential_tag
> // end of CGAL::Triangulation_data_structure_3
> // end of CGAL::Triangulation_3<
{};

@MaelRL MaelRL added this to the 6.2-beta milestone May 19, 2025
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.

3 participants