FormDiagram
- class compas_tno.diagrams.FormDiagram[source]
Bases:
compas_tna.diagrams.formdiagram.FormDiagram
The
FormDiagram
represents the projection of the internal force network within the structure.The class imports the attributes and set ups from
compas_tna.diagrams.FormDiagram
and include some functionalities useful for the assessment of masonry structures. Most relevant edge and vertex attributes are listed below:- Attributes
* Vertex attributes
x (float) – x-coordinate of the vertex.
y (float) – y-coordinate of the vertex.
z (float) – z-coordinate of the vertex.
is_roller (bool) – Whether or not the attibute is set to be a roller. Takes only horizontal reaction.
tubmax (float) – Maximum allowable increase in the extrados
tlbmax (float) – Maximum allowable increase in the intradoss
tub_reac (float) – Maximum allowable increase in the horizontal projection of the reaction.
* Edge attributes
q (float) – Force density of an edge.
f (float) – Force magnitude of an edge.
is_ind (bool) – Whether or not the edge is an independent edge.
qmin (float) – The minimum force density magnitude.
qmax (float) – The maximum force density magnitude.
Examples
>>> from compas_tno.diagrams import FormDiagram >>> data = {'type': 'fan_fd', 'xy_span': [[0, 10], [0, 10]], 'discretisation': [10, 10], 'fix': 'corners'} >>> form = FormDiagram.from_library(data)
Methods
_summary_
Assign manually independent edges to the pattern
Build the dual of the form diagram considering half-faces in the edges on the perimeter.
Build the dual of the form diagram.
Build the dictionary mapsym (i -> j) that associate one edge j per group of symmetry i.
Construct a FormDiagram based on an arch linear discretisation.
Construct a circular radial FormDiagram with hoops not equally spaced in plan.
Construct a circular radial FormDiagram with hoops not equally spaced in plan, but equally spaced with regards to the projection on a hemisphere.
Construct a circular radial FormDiagram with hoops not equally spaced in plan, but equally spaced with regards to the projection on a hemisphere.
Construct a FormDiagram based on a mixture of cross and fan discretiastion
Construct a FormDiagram based on cross discretiastion with orthogonal arrangement and diagonal.
Construct a FormDiagram based on cross discretiastion with diagonals.
Helper to construct a FormDiagram based on fan discretiastion with straight lines to the corners.
Helper to construct a FormDiagram based on fan discretiastion with straight lines to the corners.
Helper to create a arch linear form-diagram with equaly spaced (in 2D) nodes.
Helper to create a arch linear form-diagram with equaly spaced (in 2D) nodes.
Helper to construct a FormDiagram based on a simple orthogonal discretisation.
Helper to construct a FormDiagram envelop that includes fan and cross diagrams.
Delete boundary edges on a diagram.
Compute the squared vertical distance from a target.
Return the keys of the fixed vertices of the diagram.
Return the keys of the fixed-in-x vertices of the diagram.
Return the keys of the fixed-in-y vertices of the diagram.
Construct a FormDiagram the library of FormDiagrams available.
Create form diagram from singular dense mesh.
Create form diagram from compas_skeleton
Generates a Form Diagram from triangle
Return the identifiers for the edges selected as independents on the diagram.
Compute loadpath in the current configuration based on the force attributes stored in the
FormDiagram
.Returns the lumped selfweight on the nodes.
Modify the diagram boundary adding the outer perimeter around the fixed vertices with edges having
_is_edge
False.Compute the number of independent edges.
Return the identifiers for the edges selected as independents on the diagram.
Compute the number of supports.
Compute the symmetric edges.
Compute the symmetric supports.
Compute the symmetric vertices.
Print an overview of the forces in the
Form Diagram
.Plot a form diagram with a plotter with all the default settings.
Return the force densities
q
of the diagram.Remove faces of the diagram with area zero.
Set boundary vertices as rollers.
Set all node on the boundary of a pattern as supports.
Store the indset with the information about the independent edges (used within algorithms)
Computes the the (horizontal) thrust
Make a tributary dictionary to help in the calculation of the tributary weights to the nodes afterwards.
Returns the Matrices used for computation of the tributary area.
Update attributes force
f
based on force densitiesq``and lengths ``l
.Update the indset with the information about the independent edges (used within algorithms)
Update the lumped weights based on the curent geometry of the thrust network The loads are computed based on the tributary area times the thickness times the density.
Return the
xy
coordinates of the diagram.Inherited Methods
Converts the instance to a string.
Add a face to the mesh object.
Add a vertex to the mesh object.
Vertices with
is_anchor
set toTrue
.Calculate the total mesh area.
Compute the (axis aligned) bounding box of a mesh.
Compute the (axis aligned) bounding box of a projection of the mesh in the XY plane.
Calculate the mesh centroid.
Clear all the mesh data.
Collapse an edge to its first or second vertex, or to an intermediate point.
Find the connected components of the mesh.
Make an independent copy of the data object.
Vertices with degree 2.
Remove all unused vertices from the mesh object.
Delete a face from the mesh object.
Delete a vertex from the mesh and everything that is attached to it.
Draw the form diagram in Rhino.
Construct the dual of a mesh.
Construct the dual of the FormDiagram.
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.
Find the two faces adjacent to an edge.
Return the length of an edge.
Find all edges on the same loop as a given edge.
Return the location of the midpoint of an edge.
Return the location of a point along an edge.
A random sample of the edges.
Find all edges on the same strip as a given edge.
Return the vector of an edge.
Iterate over the edges of the mesh.
Get or set an attribute of multiple edges.
Get or set multiple attributes of multiple edges.
Find the edges on all boundaries of the mesh.
Find the edges on the longest boundary.
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.
Calculate the Euler characteristic.
Build a face adjacency dict.
Find one half-edge over which two faces are adjacent.
Find all vertices over which two faces are adjacent.
Compute the area of a face.
Face aspect ratio as the ratio between the lengths of the maximum and minimum face edges.
Get or set an attribute of a face.
Get or set multiple attributes of a face.
Compute the location of the center of mass of a face.
Compute the location of the centroid of a face.
Compute the coordinates of the vertices of a face.
Return triplets of face vertices forming the corners of the face.
Dimensionless face curvature.
Count the neighbors of a face.
Compute the flatness of the mesh face.
The halfedges of a face.
Compute the maximum degree of all faces.
Compute the minimum degree of all faces.
Return the faces in the neighborhood of a face.
Return the neighbors of a face across its edges.
Compute the normal of a face.
A plane defined by the centroid and the normal of the face.
A random sample of the faces.
Face skewness as the maximum absolute angular deviation from the ideal polygon angle.
Return the n-th vertex after the specified vertex in a specific face.
Return the n-th vertex before the specified vertex in a specific face.
Return the n-th vertex before the specified vertex in a specific face.
Return the n-th vertex after the specified vertex in a specific face.
The vertices of a face.
Iterate over the faces of the mesh.
Get or set an attribute of multiple faces.
Get or set multiple attributes of multiple faces.
Find the faces on all boundaries of the mesh.
Find the faces on the longest boundary.
Get faces for which a certain condition or set of conditions is true.
Get faces for which a certain condition or set of conditions is true using a lambda function.
Flip the cycle directions of all faces.
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.
Construct a FormDiagram from a list of lines described by start and end point coordinates.
Construct a FormDiagram from a Mesh.
Create a mesh from faces and vertices on a regular grid.
Construct a mesh object from the data described in an OBJ file.
Construct a mesh object from the data described in a OFF file.
Construct a mesh object from the data described in a PLY file.
Construct a mesh from a delaunay triangulation of a set of points.
Construct a mesh from a series of polygons.
Construct a mesh from a platonic solid.
Construct mesh from polylines.
Construct a FormDiagram from a set of Rhino lines represented by their GUIDs.
Construct a FormDiagram from a Rhino mesh represented by a guid.
Construct a FormDiagram from a Rhino surface represented by its GUID.
Construct a mesh from a primitive shape.
Construct a mesh object from the data described in a STL file.
Construct a mesh object from a list of vertices and faces.
Calculate the genus.
Get the identifier of a random face.
Get the identifier of a random vertex.
Get a list of identifiers of a random set of n vertices.
Returns a dictionary that maps geometric keys of a certain precision to the keys of the corresponding vertices.
Returns a dictionary that maps geometric keys of a certain precision to the keys of the corresponding vertices.
Find the halfedge after the given halfedge in the same face.
Find the halfedge before the given halfedge in the same face.
Find the face corresponding to a halfedge.
Find all edges on the same loop as the halfedge, in the direction of the halfedge.
Find all edges on the same strip as a given halfedge.
Verify that the mesh contains a specific edge.
Verify that a face is part of the mesh.
Verify that a halfedge is part of the mesh.
Verify that a vertex is in the mesh.
Returns a dictionary that maps the indices of a vertex list to keys in a vertex dictionary.
Returns a dictionary that maps edges in a list to the corresponding vertex key pairs.
Returns a dictionary that maps the indices of a vertex list to keys in a vertex dictionary.
Insert a vertex in the specified face.
Verify that the mesh is closed.
Verify that the mesh is connected.
Verify that an edge is on the boundary.
Verify that the mesh is empty.
Verify that a face is on a boundary.
Verify that the mesh is manifold.
Verify that the mesh is orientable.
Verify that the mesh consists of only quads.
Verify that the mesh is regular.
Verify that the mesh consists of only triangles.
Verify that the mesh is valid.
Verify that a vertex is connected.
Verify that a vertex is on a boundary.
Add the vertices and faces of another mesh to the current mesh.
Returns a dictionary that maps vertex dictionary keys to the corresponding geometric key up to a certain precision.
Returns a dictionary that maps vertex dictionary keys to the corresponding index in a vertex list or array.
Vertices with degree 1.
Merge two faces of a mesh over their shared edge.
Compute the (axis aligned) bounding box of a mesh.
Compute the (axis aligned) bounding box of a projection of the mesh in the XY plane.
Calculate the average mesh normal.
Count the number of edges in the mesh.
Count the number of faces in the mesh.
Count the number of vertices in the mesh.
Compute the (axis aligned) bounding box of a mesh.
Compute the (axis aligned) bounding box of a projection of the mesh in the XY plane.
Convert all quadrilateral faces of a mesh to triangles by adding a diagonal edge.
Remove all unused vertices from the mesh object.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Slice a mesh with a plane and construct the resulting submeshes.
Smooth a mesh by moving each vertex to the barycenter of the centroids of the surrounding faces, weighted by area.
Smooth a mesh by moving every free vertex to the centroid of its neighbors.
Split and edge by inserting a vertex along its length.
Split a face by inserting an edge between two specified vertices.
Split the srip of faces corresponding to a given edge.
Subdivide the input mesh.
Print a summary of the mesh.
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 mesh as pairs of start and end point coordinates.
Write the mesh to an OBJ file.
Write a mesh object to an OFF file.
Write a mesh object to a PLY file.
Convert the mesh to a collection of points.
Convert the mesh to a collection of polygons.
Convert the mesh to a collection of polylines.
Write a mesh to an STL file.
Return the vertices and faces of a mesh.
Transform a mesh.
Return a transformed copy of the mesh.
Unify the cycle directions of all faces.
Unset the attribute of an edge.
Unset the attribute of a face.
Unset the attribute of a vertex.
Update the boundaries to add outside faces.
Update the default edge attributes.
Update the default face attributes.
Update the default vertex attributes.
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.
Compute the tributary area of a vertex.
Get or set an attribute of a vertex.
Get or set multiple attributes of a vertex.
Return the coordinates of a vertex.
Dimensionless vertex curvature.
Count the neighbors of a vertex.
Find all edges connected to a given vertex.
The faces connected to a vertex.
Returns a dictionary that maps vertex dictionary keys to the corresponding geometric key up to a certain precision.
Returns a dictionary that maps vertex dictionary keys to the corresponding index in a vertex list or array.
Compute the vector from a vertex to the centroid of its neighbors.
Compute the maximum degree of all vertices.
Compute the minimum degree of all vertices.
Return the vertices in the neighborhood of a vertex.
Compute the centroid of the neighbors of a vertex.
Return the neighbors of a vertex.
Return the normal vector at the vertex as the weighted average of the normals of the neighboring faces.
A random sample of the vertices.
Iterate over the vertices of the mesh.
Get or set an attribute of multiple vertices.
Get or set multiple attributes of multiple vertices.
Find the vertices on all boundaries of the mesh.
Find the vertices on the longest boundary.
Get vertices for which a certain condition or set of conditions is true.
Get vertices for which a certain condition or set of conditions is true using a lambda function.