-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GSoC2023 - ACVD for Simplification & Remeshing #7837
base: master
Are you sure you want to change the base?
Conversation
...gon_mesh_processing/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h
Outdated
Show resolved
Hide resolved
...gon_mesh_processing/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
need to clean up code
...gon_mesh_processing/include/CGAL/Polygon_mesh_processing/interpolated_corrected_curvatures.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
) | ||
{ | ||
typedef typename boost::graph_traits<PolygonMesh>::face_descriptor Face_descriptor; | ||
typedef typename boost::graph_traits<PolygonMesh>::vertex_descriptor Vertex_descriptor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means that the dependency on Eigen in the CMakeLists.txt can be removed.
Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/acvd/acvd.h
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This method is a vertex clustering based remeshing algorithm. It is based on | ||
\cgalCite{cgal:vc-acvdupmc-04} and extended in \cgalCite{cgal:audette2011approach} and \cgalCite{cgal:vcp-grtmmdvd-08}. | ||
|
||
The function `CGAL::Polygon_mesh_processing::approximated_centroidal_Voronoi_diagram_remeshing()` takes as input a triangle mesh and | ||
the expected number of output vertices, and it updates the mesh with the remeshed version. | ||
The number of vertices in the output mesh might be larger than the input parameters if the input is not closed | ||
or if the budget of points provided is too low to generate a manifold output mesh. | ||
Note that providing an initial low number of vertices will affect the uniformity of the output triangles | ||
in case some extra points are added to make the output manifold. The algorithm is similar to Lloyd's algorithm | ||
(or k-means) where some random input vertices are picked to initialize clusters of vertices, and then clusters | ||
are grown to minimize a particular energy, until convergence. Upon convergence, output vertices are computed | ||
from the vertices of each cluster. If the input mesh contains some sharp features or corners, it is possible | ||
to use the quadric error metrics to either move output vertices (fast but can produce bad looking triangles), | ||
of to use the quadric error metrics directly in the energy formulation of each cluster (slower but produces | ||
better quality triangles). It is also possible to use an adaptive remeshing based on curvature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is a vertex clustering based remeshing algorithm. It is based on | |
\cgalCite{cgal:vc-acvdupmc-04} and extended in \cgalCite{cgal:audette2011approach} and \cgalCite{cgal:vcp-grtmmdvd-08}. | |
The function `CGAL::Polygon_mesh_processing::approximated_centroidal_Voronoi_diagram_remeshing()` takes as input a triangle mesh and | |
the expected number of output vertices, and it updates the mesh with the remeshed version. | |
The number of vertices in the output mesh might be larger than the input parameters if the input is not closed | |
or if the budget of points provided is too low to generate a manifold output mesh. | |
Note that providing an initial low number of vertices will affect the uniformity of the output triangles | |
in case some extra points are added to make the output manifold. The algorithm is similar to Lloyd's algorithm | |
(or k-means) where some random input vertices are picked to initialize clusters of vertices, and then clusters | |
are grown to minimize a particular energy, until convergence. Upon convergence, output vertices are computed | |
from the vertices of each cluster. If the input mesh contains some sharp features or corners, it is possible | |
to use the quadric error metrics to either move output vertices (fast but can produce bad looking triangles), | |
of to use the quadric error metrics directly in the energy formulation of each cluster (slower but produces | |
better quality triangles). It is also possible to use an adaptive remeshing based on curvature. | |
This remeshing algorithm uses clustering on polygonal meshes as to approximate a Centroidal Voronoi Diagram construction. | |
It is inspired by the method presented in \cgalCite{cgal:vc-acvdupmc-04} and further developed in \cgalCite{cgal:audette2011approach} and \cgalCite{cgal:vcp-grtmmdvd-08}. | |
The algorithm is similar to Lloyd's algorithm (or k-means) where random input vertices are picked to initialize clusters of vertices, which are then grown to minimize a particular energy, until convergence. | |
Upon convergence, output vertices are computed from the vertices of each cluster. | |
The function `CGAL::Polygon_mesh_processing::approximated_centroidal_Voronoi_diagram_remeshing()` takes as input a triangle mesh and an expected number of output vertices, and updates the mesh with the remeshed version. | |
Note that the final vertex count may exceed the input parameter if the input mesh is not closed, or if the specified vertex budget was insufficient to generate a manifold mesh. | |
In this case, the uniformity of the output triangles may be affected. | |
If the input mesh contains sharp features or corners, it is possible to use quadric error metrics to either move output vertices (fast but can produce bad looking triangles), of to use quadric error metrics directly into the energy formulation of each cluster (slower but produces better quality triangles). | |
Additionally, adaptive remeshing based on surface curvature is possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the fact that topology can change should be highlighted as it is a significant difference with other methods.
Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt
Outdated
Show resolved
Hide resolved
Polygon_mesh_processing/examples/Polygon_mesh_processing/acvd_example.cpp
Outdated
Show resolved
Hide resolved
...ing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h
Show resolved
Hide resolved
...ing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h
Outdated
Show resolved
Hide resolved
|
||
/// Construct new Mesh | ||
std::vector<std::size_t> valid_cluster_map(nb_clusters, -1); | ||
std::vector<typename GT::Point_3> points; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and at other places, the type should be VPM's value type, not GT::Point_3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are the same or I'm missing your point.
...ing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h
Outdated
Show resolved
Hide resolved
...ing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h
Outdated
Show resolved
Hide resolved
...ing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h
Outdated
Show resolved
Hide resolved
Co-authored-by: Mael <mael.rouxel.labbe@geometryfactory.com>
Co-authored-by: Mael <mael.rouxel.labbe@geometryfactory.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
/force-build:v2 |
The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/7837/v2/Manual/index.html |
Release Management
TODO
interpolated_corrected_curvatures.h
after the merge of the gsoc2022 branchqem_metrics.h
andtypes.h
from history (for @sloriot)