-
Notifications
You must be signed in to change notification settings - Fork 101
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
information #171
Comments
Hi, thanks for the pointers. Are these data structures restricted to oriented manifolds only? In many practical cases I'd like to deal with non manifold topological spaces as well |
Thanks again for the pointers :) *: not likely to happen though. Too much time needed and no serious reward to go through this pain |
Of course you can! And it is effortless. There are two things to know:
The advantage is that all incidences and adjacencies are defined in every dimension. They come for free from the model. Since the model is well defined with the relations between the darts you even don't need unit tests... Here you have dimensionless algorithms. The I am open to discussion :) |
That's not exactly what I meant. In many practical cases when you implement an algorithm there are "semantically identical" operations require iterating over elements with different dimensionality, depending on whether you have a volume or a surface mesh. Here is a practical example: suppose you want to implement a simple flood fill algorithm that starts from a mesh seed and iteratively expands to adjacent elements. In the case of a surface mesh, you'd start from a triangle and iteratively expand on the unvisited edge-adjacent triangles. In the case of a volume mesh, you'd start from a tetrahedron and iteratively expand on the unvisited face-adjacent tetrahedra. Maybe having a generalized floodfill algorithm is not super exciting, but in my experience similar things also happen in many other cases. In cinolib I play a lot with name conventions, so that a |
haa I get it now. These kind of algorithms are not implemented (if I am correct) in these libraries. But it is still possible using the "low level API" . These libraries are written with the extensive versions of iterators (foreach_cell, foreach_incident_xxxx, foreach_adjacent_xxxx_trough_yyyy). But it is possible to get the n - 1 cell dimension type from a map of dimension n. You could have adjacencies and mix dimensions like for the floodfill algorithm. template <typename MAP>
flood(MAP& map)
{
using CellTypeOuter = cell_type(mesh_traits<MAP>::dimension );
using CellTypeIner = cell_type(mesh_traits<MAP>::dimension - 1 );
//iterate over all faces in 2d or volumes in 3d depending on the type MAP
foreach_cell(map, [&](CellTypeOuter c) -> bool {
//given the type of the top cell c (face or volume)
//iterate over all adjacent dim - 1 cells (edges in 2d or faces in 3d)
foreach_adjacent_cell<CellTypeIner>(map, c, [&](CellTypeOuter av) -> bool {
//do something with av
});
});
} |
This is interesting! Thanks |
I have updated the readme to acknowledge your data structures and their capabilities. I am looking forward to play with combinatorial maps in the way I mentioned in my previous messages. I am closing the issue here. Thanks |
Hello,
This repository was suggested to me by github and I just read the readme.
Looking at your research oriented list of mesh libraries, I wanted to suggest you CGOGN_2 and CGoGN_3 as "unified data structure for multiple dimension handling".
In fact, these libraries implement a mesh data structure (based on a theoretical model) that can handle 0D, 1D, 2D and 3D oriented open or closed manifolds whatever their discretization (polygons or polyhedrons). There is also a cgal package based on the same theoretical data model that can handle nD objects. A while ago we made some benchmarks also.
The text was updated successfully, but these errors were encountered: