TopologyDiagram
- class compas_cem.diagrams.TopologyDiagram(*args, **kwargs)[source]
Bases:
Diagram
,MeshMixins
The very heart of life.
- Parameters:
*args (
list
) – Arguments.**kwargs (
dict
) – Keyword arguments.
- Returns:
topology (
compas_cem.diagrams.Topology
) – A form diagram.
Methods
Applies a load.
Adds a support.
Iterates over the keys of all trail edges in the auxiliary trails.
Iterate over all the available auxiliary trails in the topology diagram.
Automatically generate the trails in the topology diagram.
Finds the deviation edges connected to a node.
Finds the trail edges connected to a node.
Iterates over the keys of all the deviation edges in the diagram.
Iterates over the keys of all the direct deviation edges in the diagram.
Gets the sequence of the nodes of a given edge.
Check if the topology diagram has trails.
Iterates over the keys of all indirect deviation edges in the diagram.
Tests whether or not an edge is the edge of an auxiliary trail.
Tests whether or not an edge is a deviation edge.
Tests if a deviation edge is direct.
Tests if a deviation edge is indirect.
Checks if a node is an origin node.
Tests if a node is a support node.
Tests whether or not an edge is a trail edge.
Gets the sequence a node is assigned to.
The number of auxiliary trails in the topology diagram.
The number of deviation edges in the topology diagram.
The number of direct deviation edges in the topology diagram.
The number of direct deviation edges in the topology diagram.
The number of sequences in the topology diagram.
The number of trail edges in the topology diagram.
The number of trails in the topology diagram.
Starting nodes of all trails.
The key of the last sequence in the topology diagram.
Iterate over all the sequences in the topology diagram in ascending order.
Shift all the nodes in a trail to start at a given sequence.
Gets the keys of the nodes in a trail.
Iterates over the keys of all the trail edges in the diagram.
Create a mapping between topological sequences and the nodes in a trail.
Iterate over all the existing trails in the topology diagram.
Creates a mapping of mappings between the nodes of the trails and the sequences.
Inherited Methods
Converts the instance to a string.
Adds a deviation or a trail edge.
Adds double
Creates a node adjacency matrix from a Network datastructure.
Clear all the network data.
Generate the complement network of a network.
Return the edges connected to a node.
Creates a connectivity matrix from a Network datastructure.
Make an independent copy of the data object.
Count the number of crossings (pairs of crossing edges) in the network.
Return the number of neighbors of a node.
Return the numer of incoming neighbors of a node.
Creates a node degree matrix from a Network datastructure.
Return the number of outgoing neighbors of a node.
Delete an edge from the network.
Delete a node from the graph.
Get or set an attribute of an edge.
Get or set multiple attributes of an edge.
Return the coordinates of the start and end point of an edge.
Return the direction vector of an edge.
Gets the force value at an edge.
Return the length of an edge.
Gets the length of an edge.
Return the location of the midpoint of an edge.
Gets the projection plane at an edge.
Return the location of a point along an edge.
Get the identifiers of a set of random edges.
Return the vector of an edge.
Iterate over the edges of the network.
Get or set an attribute of multiple edges.
Get or set multiple attributes of multiple edges.
Get edges for which a certain condition or set of conditions is true.
Get edges for which a certain condition or set of conditions is true using a lambda function.
Embed the network in the plane.
Identify all pairs of crossing edges in a network.
Find the faces of a network.
Construct an object of this type from the provided data.
Generate a topology diagram from the dual of a quad mesh.
Create a new graph instance from information about the edges.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Construct a network from a set of lines represented by their start and end point coordinates.
Create a new graph instance from a NetworkX DiGraph instance.
Construct a network from nodes and edges.
Construct a network from the data contained in an OBJ file.
Construct a network from random connections between the points of a pointcloud.
Get the identifier of a random edge.
Get the identifiers of a set of random edges.
Get the identifier of a random node.
Get a list of identifiers of a random set of n nodes.
Gets
Returns a dictionary that maps geometric keys of a certain precision to the keys of the corresponding nodes.
Verify if the network contains a specific edge.
Verify if a specific node is present in the network.
Returns a dictionary that maps the indices of a node list to keys in a node dictionary.
Returns a dictionary that maps edges in a list to the corresponding vertex key pairs.
Verify that the network is connected.
Verify if a network has crossing edges.
Checks if any of the nodes of an edge is a support.
Verify if a node is a leaf.
Verify if a specific node is connected.
Checks if there is a large-enough load applied to a node.
Check if the network is planar.
Verify that a network is embedded in the plane without crossing edges.
Verify that a network lies in the XY plane.
Returns a dictionary that maps node dictionary keys to the corresponding geometric key up to a certain precision.
Returns a dictionary that maps node identifiers to their corresponding index in a node list or array.
Construct a Laplacian matrix from a Network datastructure.
Return all leaves of the network.
Iterates over all the nodes with a large-enough load applied.
Return the nodes in the neighborhood of a node.
Return the neighbors of a node.
Return the incoming neighbors of a node.
Return the outgoing neighbors of a node.
Creates a node adjacency matrix from a Network datastructure.
Creates a connectivity matrix from a Network datastructure.
Creates a node degree matrix from a Network datastructure.
Embed the network in the plane.
Check if the network is planar.
Verify that a network is embedded in the plane without crossing edges.
Construct a Laplacian matrix from a Network datastructure.
Get or set an attribute of a node.
Get or set multiple attributes of a node.
Return the coordinates of a node.
Checks
Returns a dictionary that maps node dictionary keys to the corresponding geometric key up to a certain precision.
Gets
Return the vector from the node to the centroid of its 1-ring neighborhood.
Gets the load applied at a node.
Compute the centroid of the neighboring nodes.
Get a list of identifiers of a random set of n nodes.
Gets or sets node coordinates.
Iterate over the nodes of the network.
Get or set an attribute of multiple nodes.
Get or set multiple attributes of multiple nodes.
Get nodes for which a certain condition or set of conditions is true.
Get nodes for which a certain condition or set of conditions is true using a lambda function.
Compute the number of edges of the graph.
Number of nodes in the topology diagram where a load is applied.
Compute the number of nodes of the graph.
Number of nodes in the topology diagram with an assigned support.
Gets the reaction force vector at a node.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Find the shortest path between two nodes of the network.
Smooth a network by moving every free node to the centroid of its neighbors.
Split and edge by inserting a node along its length.
Return a summary of the graph.
Nodes where a support has been assigned.
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.
Return the lines of the network as pairs of start and end point coordinates.
Create a new NetworkX graph instance from a graph.
Return the nodes and edges of a network.
Write the network to an OBJ file.
Return the coordinates of the network.
Transform a network.
Return a transformed copy of the network.
Unset the attribute of an edge.
Unset the attribute of a node.
Update the default edge attributes.
Update the default edge attributes.
Update the default node attributes.
Update the default node attributes.
Modifies
Returns a dictionary that maps edge keys (i.e.
Validate the object's data against its data schema.
Validate the object's data against its json schema.