ddg.datastructures.halfedge.get module
- ddg.datastructures.halfedge.get.in_edges(v)[source]
Get the incoming edges of a vertex,
- Parameters:
- vvertex
- Yields:
- edge
All edges pointing to the vertex
v(i.e.,edge.head=v).
- ddg.datastructures.halfedge.get.out_edges(v)[source]
Get the outgoing edges of a vertex.
- Parameters:
- vvertex
- Yields:
- edge
All edges pointing away from the vertex
v(i.e.,edge.tail==v).
- ddg.datastructures.halfedge.get.get_edge_loop(e)[source]
Get all consecutive edges of a given edge, forming a loop.
- Parameters:
- eedge
Starting edge of the edge loop.
- Yields:
- edge
The consecutive edges in a loop starting with argument edge
e.
- ddg.datastructures.halfedge.get.count_edges_in_loop(e)[source]
Counts the number of consecutive half-edges in a loop along a given one.
- Parameters:
- eedge
The edge whose number of consecutive half-edges in a loop is counted.
- Returns:
- int
The number of half-edges belonging to the edge loop along
e.
- ddg.datastructures.halfedge.get.get_length_from_co(e, co_attr='co')[source]
Calculates the euclidean length of an edge, provided its vertices have coordinates.
- Parameters:
- eedge
The edge whose length will be calculated.
- co_attrstring (default=’co’)
Name of the vertex attribute storing the coordinates.
- Returns:
- ffloat
The length of the edge ‘e’.
- Raises:
- AttributeError
If head or tail of the edge has no coordinate attribute ‘co’.
- ddg.datastructures.halfedge.get.get_vertices(f)[source]
Get the boundary vertices of a face in cyclic order.
- Parameters:
- fface
- Yields:
- vertex
The boundary vertices of the face
fin cyclic order.
- ddg.datastructures.halfedge.get.get_edges(f)[source]
Get the edges of a face in cyclic order.
- Parameters:
- fface
- Yields:
- edge
The edges of the face
fin cyclic order.
- ddg.datastructures.halfedge.get.get_number_of_edges(f)[source]
Counts the number of half-edges associated with the given face.
- Parameters:
- fface
The face whose number of half-edges is counted.
- Returns:
- int
The number of half-edges belonging to face f.
- ddg.datastructures.halfedge.get.complement(cells, type, surface)[source]
- Parameters:
- cells: iterable
Iterable of cells of a surface to find the complement from.
- type: str
Type of the cells, “verts”, “edges” or “faces”
- surface: ddg.halfedge.Surface
Surface that the cells belong to.
- Returns:
- set
set of complement cells
- ddg.datastructures.halfedge.get.get_vertex(s)[source]
Get one vertex of the given surface.
- Parameters:
- sddg.halfedge.Surface
- Returns:
- vvertex
One of the vertices of the given surface.
- ddg.datastructures.halfedge.get.get_edge(s)[source]
Get one edge of the given surface.
- Parameters:
- sddg.halfedge.Surface
- Returns:
- eedge
One of the edges of the given surface.
- ddg.datastructures.halfedge.get.get_face(s)[source]
Get one face of the given surface.
- Parameters:
- sddg.halfedge.Surface
- Returns:
- fface
One of the faces of the given surface.
- ddg.datastructures.halfedge.get.is_triangulation(surf)[source]
Checks if a surface is a triangulation.
- Parameters:
- surfddg.halfedge.Surface
The surface that is checked for being a triangulation.
- Returns:
- bool
- ddg.datastructures.halfedge.get.is_connected(s)[source]
Whether a half-edge object is connected.
The empty set counts as connected.
- Parameters:
- sddg.halfedge.Surface
- Returns:
- bool
- ddg.datastructures.halfedge.get.single_edges(surf)[source]
Yields a generator that iterates through half of the half-edges of a surface
- Parameters:
- surf: surface
The half-edge data through which must be iterated
- Yields:
- edge:
half of the half-edges
- ddg.datastructures.halfedge.get.boundary_vertices(surf)[source]
Get all boundary vertices of a surface.
- Parameters:
- surfsurface
- Yields:
- vertex
All boundary vertices of a surface.
- ddg.datastructures.halfedge.get.boundary_edges(surf)[source]
Get a list of all boundary half-edges of a surface.
- Parameters:
- surfddg.halfedge.Surface
- Yields:
- edge
All boundary half-edges of a surface.
- ddg.datastructures.halfedge.get.interior_vertices(surf)[source]
Get all interior vertices of a surface.
- Parameters:
- surfddg.halfedge.Surface
- Yields:
- vertex
All interior vertices of a surface.
- ddg.datastructures.halfedge.get.interior_edges(surf)[source]
Get all interior half-edges of a surface.
- Parameters:
- surfddg.halfedge.Surface
- Yields:
- edge
All interior half-edges of a surface.