ddg.datastructures.halfedge.copy module
- ddg.datastructures.halfedge.copy.copy(surf, verts_attr_list=None, edges_attr_list=None, faces_attr_list=None, set_original_vertex_attr=False)[source]
Returns a copy of a half-edge datastructure object, including the attributes on vertices, edges and faces that are stated to be copied.
The attributes that shall be copied are handed over in lists for vertices, edges and faces, containing their string names.
- Parameters:
- surfddg.halfedge.Surface
The half-edge data that shall be copied.
- verts_attr_listiterable of str (default=None)
A list of strings naming the vertex attributes that shall be copied.
- edges_attr_listiterable of str (default=None)
A list of strings naming the edge attributes that shall be copied.
- faces_attr_listiterable of str (default=None)
A list of strings naming the face attributes that shall be copied.
- set_original_vertex_attrbool (default=False)
A Boolean defining whether an attribute that stores the corresponding original vertex (with the name ‘original_vertex’) shall be added to the vertices of the copy.
- Returns:
- surfddg.halfedge.Surface
A copy of the given half-edge data, including the attributes on vertices, edges and faces that were stated.
Notes
The attributes handed over need to be of a type that implements or allows copy.deepcopy().
- ddg.datastructures.halfedge.copy.combinatorial_copy(surf)[source]
Returns a combinatorial copy of a half-edge datastructure object.
- Parameters:
- surfddg.halfedge.Surface
The half-edge data that shall be copied.
- Returns:
- surfddg.halfedge.Surface
A combinatorial copy of the given half-edge data.
- ddg.datastructures.halfedge.copy.union(*surfaces, verts_attr_list=None, edges_attr_list=None, faces_attr_list=None)[source]
Disjoint union of surfaces as a single, new surface.
- Parameters:
- *surfacesobjects of type ddg.halfedge.Surface
- verts_attr_list, edges_attr_list, faces_attr_listlist of str (default=None)
Attributes to be copied. All input surfaces must have the attribute. Just like in copy(), the attribute values must support deepcopy().
- Returns:
- surfddg.halfedge.Surface
See also
ddg.halfedge.copy
Notes
The result will most likely be disconnected!