HalfFace
- class compas.datastructures.HalfFace(name=None, default_vertex_attributes=None, default_edge_attributes=None, default_face_attributes=None, default_cell_attributes=None)[source]
Bases:
compas.datastructures.datastructure.Datastructure
Base half-face data structure fore representing volumetric meshes.
- Parameters
name (str, optional) – The name of the graph. Defaults to “Graph”.
default_vertex_attributes (dict, optional) – Default values for vertex attributes.
default_edge_attributes (dict, optional) – Default values for edge attributes.
default_face_attributes (dict, optional) – Default values for face attributes.
default_cell_attributes (dict, optional) – Default values for cell attributes.
- Attributes
attributes (dict) – Named attributes related to the data structure as a whole.
default_vertex_attributes (dict) – Named attributes and default values of the vertices of the data structure.
default_edge_attributes (dict) – Named attributes and default values of the edges of the data structure.
default_face_attributes (dict) – Named attributes and default values of the faces of the data structure.
name (str) – Name of the data structure. Defaults to the value of self.__class__.__name__.
data (dict) – The data representation of the data structure.
Attributes
DATASCHEMA
The schema of the data of this object.
JSONSCHEMANAME
data
A data dict representing the volmesh data structure for serialization.
name
The name of the data structure.
Inherited Attributes
JSONSCHEMA
The schema of the JSON representation of the data of this object.
dtype
The type of the object in the form of a '2-level' import and a class name.
guid
The globally unique identifier of the object.
jsondefinitions
Reusable schema definitions.
jsonstring
The representation of the object data in JSON format.
jsonvalidator
JSON schema validator for draft 7.
Methods
Add a cell to the volmesh object.
Add a face to the volmesh object.
Add a vertex to the volmesh object.
Get or set an attribute of a cell.
Get or set multiple attributes of a cell.
The faces of a cell.
The halfedges of a cell.
Get the identifiers of a set of random cells.
Ordered faces connected to a vertex of a cell.
Ordered vertex neighbors of a vertex of a cell.
The vertices of a cell.
Iterate over the cells of the volmesh.
Get or set an attribute of multiple cells.
Get or set multiple attributes of multiple cells.
Find the cells on the boundary.
Clear all the volmesh data.
Remove all unused vertices from the volmesh object.
Delete a cell from the volmesh.
Delete a vertex from the volmesh and everything that is attached to it.
Get or set an attribute of an edge.
Get or set multiple attributes of an edge.
Ordered cells around edge (u, v).
Ordered halffaces around edge (u, v).
Get the identifiers of a set of random edges.
Iterate over the edges of the volmesh.
Get or set an attribute of multiple edges.
Get or set multiple attributes of multiple edges.
Get or set an attribute of a face.
Get or set multiple attributes of a face.
Get the identifiers of a set of random faces.
"Iterate over the halffaces of the volmesh and yield faces.
Get or set an attribute of multiple faces.
Get or set multiple attributes of multiple faces.
Get the identifier of a random face.
Get the identifier of a random vertex of a specific face.
Get the identifier of a random vertex.
Return the halfface adjacent to the halfface across the halfedge.
The cell to which the halfface belongs to.
The halfedges of a halfface.
Return the halfface neighborhood of a halfface across their edges.
The cell to which the opposite halfface belongs to.
The opposite face of a face.
Return the vertex before the specified vertex in a specific face.
Return the vertex after the specified vertex in a specific face.
The vertices of a halfface.
Iterate over the halffaces of the volmesh.
Find the faces on the boundary.
Verify that the volmesh contains a directed edge (u, v).
Verify that a face is part of the volmesh.
Verify that a vertex is in the volmesh.
Returns a dictionary that maps the indices of a vertex list to keys in the vertex dictionary.
Verify that a cell is on the boundary.
Verify that an edge is on the boundary.
Verify that a face is on the boundary.
Verify that a vertex is on a boundary.
Count the number of faces in the volmesh.
Count the number of edges in the volmesh.
Count the number of faces in the volmesh.
Count the number of vertices in the volmesh.
Remove all unused vertices from the volmesh object.
Unset the attribute of a cell.
Unset the attribute of an edge.
Unset the attribute of a face.
Unset the attribute of a vertex.
Update the default cell attributes.
Update the default edge attributes.
Update the default face attributes.
Update the default vertex attributes.
Get or set an attribute of a vertex.
Get or set multiple attributes of a vertex.
Return all cells connected to a vertex.
Count the neighbors of a vertex.
Return all halffaces connected to a vertex.
Returns a dictionary that maps vertex dictionary keys to the corresponding index in a vertex list or array.
Compute the maximum degree of all vertices.
Compute the minimum degree of all vertices.
Return the vertices in the neighborhood of a vertex.
Return the vertex neighbors of a vertex.
Get the identifiers of a set of random vertices.
Iterate over the vertices of the volmesh.
Get or set an attribute of multiple vertices.
Get or set multiple attributes of multiple vertices.
Find the vertices on the boundary.
Inherited Methods
Make an independent copy of the data object.
Construct an object of this type from the provided data.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Validate the object's data against its data schema (self.DATASCHEMA).
Validate the object's data against its json schema (self.JSONSCHEMA).