FormGraph
- class compas_ags.diagrams.FormGraph
Bases:
Graph
A graph representing the geometry and connectivity of the lines of a form diagram.
Methods
Compute a geometry for the graph that embeds it in the plane.
Verify that all nodes of the graph lie in a horizontal plane.
Verify that the current embedding of the graph is planar.
Returns a dictionary that maps node identifiers to their corresponding index in a node list or array.
Inherited Methods
Converts the instance to a string.
Calculate the axis aligned bounding box of the graph.
Add an edge and specify its attributes.
Add a node and specify its attributes (optional).
Creates a node adjacency matrix from a Graph datastructure.
Clear all the graph data.
Generate the complement of a graph.
Compute the axis-aligned bounding box of the datastructure.
Compute the oriented bounding box of the datastructure.
Get groups of connected edges.
Get groups of connected nodes.
Creates a connectivity matrix from a Graph datastructure.
Make an independent copy of the data object.
Count the number of crossings (pairs of crossing edges) in the graph.
Return the number of neighbors of a node.
Return the numer of incoming neighbors of a node.
Creates a degree matrix from a Graph datastructure.
Return the number of outgoing neighbors of a node.
Delete an edge from the graph.
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.
Return the end point of an edge.
Returns a dictionary that maps edge identifiers (i.e. pairs of vertex identifiers) to the corresponding edge index in a list or array of edges.
Return the length of an edge.
Return the line of an edge.
Return the location of the midpoint of an edge.
Return the point at a parametric location along an edge.
Get the identifiers of a set of random edges.
Return the start point of an edge.
Return the vector of an edge.
Iterate over the edges of the graph.
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 graph in the plane.
Explode the graph into its connected components.
Identify all pairs of crossing edges in a graph.
Find the faces of a graph.
Create a new graph instance from information about the edges.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Construct a graph 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 graph from nodes and edges.
Construct a graph from the data contained in an OBJ file.
Construct a graph from random connections between the points of a pointcloud.
Returns a dictionary that maps geometric keys of a certain precision to the identifiers of the corresponding nodes.
Verify if the graph contains a specific edge.
Verify if a specific node is present in the graph.
Returns a dictionary that maps edges in a list to the corresponding vertex identifier pairs.
Returns a dictionary that maps the indices of a node list to keys in a node dictionary.
Verify that the graph is connected.
Verify if a graph has crossing edges.
Verify if a node is a leaf.
Verify if a specific node is connected.
Check if the graph is planar.
Verify that a graph lies in the XY plane.
Join the edges incidental on the given node, if there are exactly two incident edges.
Creates a Laplacian matrix from a Graph datastructure.
Return all leaves of the graph.
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.
Get or set an attribute of a node.
Get or set multiple attributes of a node.
Return the coordinates of a node.
Return the edges connected to a node.
Returns a dictionary that maps node identifiers to the corresponding geometric key up to a certain precision.
Return the vector from the node to the centroid of its 1-ring neighborhood.
Return the computed centroid of the neighboring nodes.
Return the point of a node.
Get a list of identifiers of a random set of n nodes.
Iterate over the nodes of the graph.
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.
Compute the number of nodes of the graph.
Calculate the oriented bounding box of the graph.
Rotate the datastructure.
Returns a rotated copy of this geometry.
Scale the datastructure.
Returns a scaled copy of this geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Find the shortest path between two nodes using the A* algorithm.
Smooth a graph 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.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Return the lines of the graph as pairs of start and end point coordinates.
Create a new NetworkX graph instance from a graph.
Return the nodes and edges of a graph.
Write the graph to an OBJ file.
Return the coordinates of the graph.
Transform all nodes of the graph.
Transforms the data structure.
Returns a transformed copy of this data structure.
Returns a transformed copy of this data structure.
Translate the datastructure.
Returns a translated copy of this geometry.
Unset the attribute of an edge.
Unset the attribute of a node.
Update the default edge attributes.
Update the default node attributes.
Validate the data against the object's data schema.