cellcomplex.property_topomesh.topological_operations.topomesh_collapse_edge¶
-
cellcomplex.property_topomesh.topological_operations.topomesh_collapse_edge(topomesh, eid, kept_pid=None, manifold=True, verbose=False, debug=False, loglevel=0)[source]¶ Perform an edge collapse operation on a triangular PropertyTopomesh
The edge collapse operation merges the two vertices linked by a given mesh edge, suppressed the incident faces and links the remaining elements to preserve the topological consistency of the complex. The operation is performed only if the resulting mesh is valid.
>>> •-----•-----• •-----•-----• >>> |\ / \ /| | \ | / | >>> | \ / \ / | | \ | / | >>> •--•-----•--• --> •-----•-----• >>> | / \ / \ | | / | \ | >>> |/ \ / \| | / | \ | >>> •-----•-----• •-----•-----•
- Parameters
topomesh (
cellcomplex.property_topomesh.PropertyTopomesh) – The structure on which to perform the operationeid (unsigned int) – The ID of the edge element to collapse
kept_pid (unsigned int, optional) – The ID of the edge vertex that should be kept after collapse
manifold (bool) – Whether to consider the topomesh as a 2-manifold complex
- Returns
- Return type
Note
The PropertyTopomesh passed as argument is updated.
Warning
The PropertyTopomesh must be a triangular topomesh (
cellcomplex.property_topomesh.analysis.is_triangular())