Skip to content
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

Extract a mesh of general polytopes #36

Open
pmartorell opened this issue Jul 30, 2024 · 0 comments
Open

Extract a mesh of general polytopes #36

pmartorell opened this issue Jul 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pmartorell
Copy link
Collaborator

The subtriangulation() procedure returns a set of simplex meshes. However, for some applications it may be convenient to return a mesh of GeneralPolytope.

The result of compute_polyhedra! are arrays of general polytopes (Kin,Kout,Γk),. Then, inside save_cell_submesh!, these polytopes are simplexified and appended to the submesh. Instead, we need to merge these arrays of polytopes into a single polytope per background cell. Then, the merged polytopes compose a mesh.

Therefore, the main task is to merge arrays of GeneralPolytope with the following considerations.

  • The polytope nodes contain metadata about the background mesh and STL
  • It is convenient to keep polytope faces (vertex,edges,facets) linked to background faces
  • We can remove all the interior edges and vertices
  • We can generate a polytope from the interior array Kin, and another for Kout.

One possible approach is the following:

  1. Extract the polytope edges on the background cell edges
  2. Merge nodes not touching STL surface (Nk)
  3. Merge edges that share nodes (Ek)
  4. Glue cut surface Γk with merged edges Ek to generate a new GeneralPolytope

Here, one of the main complication is that an edge can be cut more than once by the STL surface. Thus, the glue is not straight forward. E.g., we need a process of sorting nodes over the background edge.

It important to note that the GenaralPolytope is represented by an oriented edge graph; see more information in the reference publication.

@pmartorell pmartorell added the enhancement New feature or request label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant