-
Notifications
You must be signed in to change notification settings - Fork 1.6k
API proposal for 3D mesh smoothing #9576
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
base: main
Are you sure you want to change the base?
Changes from 11 commits
3bccce8
59ffb37
d39cfb0
7d2aa30
0c0923c
30d445f
2da4b11
430677e
9792a23
3748179
d456da1
139c9c6
3467bab
fb234b7
e87fb37
2966fae
f35ab40
a283fe6
6a0abaf
62d9b63
d3ec736
f28b21c
453e0cc
807f960
6e72c0f
3a83780
72aaf7f
d59df6b
211b0b9
2f1d79f
d06496d
4a8249e
cd4072c
897da28
b7d3795
cae44ee
492c89c
7e82a0f
cde843b
05ba8bf
66dd9dd
be91ae8
dffa7ff
45405c3
bdfe8bd
50090f7
80eb5e4
ccdc917
67c24d1
01fe2ba
dfafa68
b902364
bde9b9a
0385457
68a5085
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| // Copyright (c) 2016 GeometryFactory SARL (France). | ||
| // All rights reserved. | ||
| // | ||
| // This file is part of CGAL (www.cgal.org) | ||
| // | ||
| // $URL$ | ||
| // $Id$ | ||
| // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial | ||
| // | ||
| // Author(s) : Andreas Fabri | ||
| // | ||
| // Warning: this file is generated, see include/CGAL/license/README.md | ||
|
|
||
| #ifndef CGAL_LICENSE_MESH_SMOOTHING_3_H | ||
| #define CGAL_LICENSE_MESH_SMOOTHING_3_H | ||
|
|
||
| #include <CGAL/config.h> | ||
| #include <CGAL/license.h> | ||
|
|
||
| #ifdef CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE | ||
|
|
||
| # if CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE | ||
|
|
||
| # if defined(CGAL_LICENSE_WARNING) | ||
|
|
||
| CGAL_pragma_warning("Your commercial license for CGAL does not cover " | ||
| "this release of the 3D Mesh Smoothing package.") | ||
| # endif | ||
|
|
||
| # ifdef CGAL_LICENSE_ERROR | ||
| # error "Your commercial license for CGAL does not cover this release \ | ||
| of the 3D Mesh Smoothing package. \ | ||
| You get this error, as you defined CGAL_LICENSE_ERROR." | ||
| # endif // CGAL_LICENSE_ERROR | ||
|
|
||
| # endif // CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE | ||
|
|
||
| #else // no CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE | ||
|
|
||
| # if defined(CGAL_LICENSE_WARNING) | ||
| CGAL_pragma_warning("\nThe macro CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE is not defined." | ||
| "\nYou use the CGAL 3D Mesh Smoothing package under " | ||
| "the terms of the GPLv3+.") | ||
| # endif // CGAL_LICENSE_WARNING | ||
|
|
||
| # ifdef CGAL_LICENSE_ERROR | ||
| # error "The macro CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE is not defined.\ | ||
| You use the CGAL 3D Mesh Smoothing package under the terms of \ | ||
| the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." | ||
| # endif // CGAL_LICENSE_ERROR | ||
|
|
||
| #endif // no CGAL_MESH_SMOOTHING_3_COMMERCIAL_LICENSE | ||
|
|
||
| #endif // CGAL_LICENSE_MESH_SMOOTHING_3_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| /*! | ||
| \ingroup PkgMeshSmoothing3Concepts | ||
| \cgalConcept | ||
|
|
||
| The concept `MeshDataStructure` describes the way the tetrahedral mesh will be accessed and modified. | ||
|
|
||
| \sa `CGAL::Mesh_smoothing_3::Mesh_smoother` | ||
|
|
||
| */ | ||
| class MeshDataStructure { | ||
| public: | ||
|
|
||
| /// \name Types | ||
| /// @{ | ||
|
|
||
| /*! | ||
| Descriptor used to access a cell (tetrahedron) information | ||
| */ | ||
| using Cell_descriptor = unspecified_type; | ||
|
|
||
|
|
||
| /*! | ||
| Descriptor used to access a vertex information | ||
| */ | ||
| using Vertex_descriptor = unspecified_type; | ||
|
|
||
|
|
||
| /*! | ||
| Point type. | ||
| */ | ||
| using Point_3 = unspecified_type; | ||
|
|
||
| /// @} | ||
|
|
||
| /// \name Operations | ||
| /// The following functions are used to access and modify the mesh data: | ||
| /// @{ | ||
|
|
||
| /*! | ||
| std::size_t is optional but will avoid warnings. | ||
| */ | ||
| std::size_t nb_cells() const; | ||
|
|
||
| /*! | ||
|
|
||
| */ | ||
| std::size_t nb_vertices() const; | ||
|
|
||
| /*! | ||
| Access the coordinates of a vertex. | ||
| */ | ||
| Point_3 vertex_coordinates(Vertex_descriptor vertex) const; | ||
|
|
||
| /*! | ||
| Change the coordinates of a vertex. | ||
| */ | ||
| void set_vertex_coordinates(Vertex_descriptor vertex, Point_3 coord); | ||
|
|
||
| /*! | ||
| Provide an iterable range over the Cell_descriptors of the mesh | ||
| */ | ||
| unspecified_type cell_range() const; | ||
|
|
||
| /*! | ||
| Access the 4 vertices of a cell. | ||
| Returns container behaving like std::array<Vertex_descriptor, 4> | ||
| */ | ||
| unspecified_type cell_vertices(Cell_descriptor cell) const; | ||
|
|
||
| /*! | ||
| Optimal shape of the given cell. | ||
| Returns container behaving like std::array<Point_3, 4> | ||
| */ | ||
| unspecified_type cell_reference_shape(Cell_descriptor cell) const; | ||
|
|
||
| /// @} | ||
|
|
||
|
|
||
|
|
||
| }; /* end MeshDataStructure */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /*! | ||
| \ingroup PkgMeshSmoothing3Concepts | ||
| \cgalConcept | ||
|
|
||
| The concept `PolylinesDataStructure` describes the way the curves on the mesh will be accessed. | ||
|
|
||
| \sa `CGAL::Mesh_smoothing_3::Mesh_smoother` | ||
| \sa `MeshDataStructure` | ||
| \sa `SurfaceDataStructure` | ||
|
|
||
| */ | ||
| class PolylinesDataStructure { | ||
| public: | ||
|
|
||
| /// \name Types | ||
| /// @{ | ||
|
|
||
| /*! | ||
| Descriptor used to access a edge information | ||
| */ | ||
| using Edge_descriptor = unspecified_type; | ||
|
|
||
| /*! | ||
| Index associated with an edge to identify the curve it belongs to. This is used to query the curve information from the user. | ||
| */ | ||
| using Curve_index = unspecified_type; | ||
|
|
||
| /*! | ||
| Descriptor used to access a vertex information. Should be compatible with the one used in MeshDataStructure. | ||
| */ | ||
| using Vertex_descriptor = unspecified_type; | ||
|
|
||
|
|
||
| /// @} | ||
|
|
||
| /// \name Operations | ||
| /// The following functions are used to access surface data: | ||
| /// @{ | ||
|
|
||
| /*! | ||
| std::size_t is optional but will avoid warnings. | ||
| */ | ||
| std::size_t nb_edges() const; | ||
|
|
||
| /*! | ||
| Provides an iterable range over the Edge_descriptor of the mesh | ||
| */ | ||
| unspecified_type edge_range() const; | ||
|
|
||
| /*! | ||
| Returns an identifier (curve id, segment id, ...) related to an edge. | ||
| */ | ||
| Curve_index curve_id(Edge_descriptor edge) const; | ||
|
|
||
| /*! | ||
| Return the ith vertex of an edge (max 2). | ||
| */ | ||
| Vertex_descriptor edge_vertex(Edge_descriptor edge, unsigned i) const; | ||
|
|
||
| /// @} | ||
|
|
||
|
|
||
| }; /* end PolylinesDataStructure */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /*! | ||
| \ingroup PkgMeshSmoothing3Concepts | ||
| \cgalConcept | ||
|
|
||
| The concept `SurfaceDataStructure` describes the way the surface mesh will be accessed. | ||
|
|
||
| \sa `CGAL::Mesh_smoothing_3::Mesh_smoother` | ||
| \sa `MeshDataStructure` | ||
|
|
||
| */ | ||
| class SurfaceDataStructure { | ||
| public: | ||
|
|
||
| /// \name Types | ||
| /// @{ | ||
|
|
||
| /*! | ||
| Descriptor used to access face information | ||
| */ | ||
| using Face_descriptor = unspecified_type; | ||
|
|
||
|
|
||
| /*! | ||
| Vector type. | ||
| */ | ||
| using Normal_3 = unspecified_type; | ||
|
|
||
| /*! | ||
| Index associated with a surface patch to identify the patch it belongs to. This is used to query the patch information from the user. | ||
| */ | ||
| using Surface_patch_index = unspecified_type; | ||
|
|
||
| /// @} | ||
|
|
||
| /// \name Operations | ||
| /// The following functions are used to access surface data: | ||
| /// @{ | ||
|
|
||
| /*! | ||
| std::size_t is optional but will avoid warnings. | ||
| */ | ||
| std::size_t nb_faces() const; | ||
|
|
||
| /*! | ||
| Provides an iterable range over the Face_descriptor of the mesh | ||
| */ | ||
| unspecified_type face_range() const; | ||
|
|
||
| /*! | ||
| Returns the number of vertices of a face. std::size_t is optional but will avoid warnings. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. std::size_t must be backticked.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean with "optional" ? That it may also be
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would be the "less wordy" way to have a "size_type" instead of std::size_t? Triangulation_3 use its own typedef, but here I would see it as unecessary. Do I just use std::size_t? |
||
| */ | ||
| std::size_t nb_face_vertices(Face_descriptor face) const; | ||
|
|
||
| /*! | ||
| Returns an identifier (patch id, face id, ...) related to a face. | ||
| */ | ||
| Surface_patch_index patch_id(Face_descriptor face) const; | ||
|
|
||
| /*! | ||
| Provides an iterable range of Vertex_descriptor as defined in `MeshDataStructure` to iterate over the vertices of a face. | ||
| */ | ||
| unspecified_type face_vertices(Face_descriptor face) const; | ||
|
|
||
| /// @} | ||
|
|
||
|
|
||
|
|
||
| }; /* end SurfaceDataStructure */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} | ||
|
|
||
| PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Mesh Smoothing" | ||
|
|
||
| # custom options for this package | ||
| EXTRACT_ALL = false | ||
| HIDE_UNDOC_MEMBERS = true | ||
| HIDE_UNDOC_CLASSES = true |
Uh oh!
There was an error while loading. Please reload this page.