Skip to content

Extract a mesh of general polytopes #36

@pmartorell

Description

@pmartorell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions