Shape
- class compas_tno.shapes.Shape[source]
Bases:
compas.datastructures.datastructure.Datastructure
The
Shape
class deals with the geometry of a masonry vault, where the definition of Extrados, Intrados and Middle surfaces are of interest.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:- Parameters
intrados (MeshDos) – Mesh representing the intrados of the masonry
extrados (MeshDos) – Mesh representing thhe extrados of the masonry
middle (MeshDos) – Mesh representing the midde surface of the masonry
name (str) – The name of the shape
total_selfweight (float) – Total weight of the masonry in kN.
area (float) – Area of the middle surface of the masonry
ro (float) – The density of the masonry
fill (bool) – Whether or not a fill should be considered up to a given elevation
fill_ro (float) – The density of the masonry in the fill
- Attributes
type (str) – The type of the masory. Types include: [‘crossvault’, ‘pavillionvault’, ‘dome’, ‘dome_polar’, ‘dome_spr’, ‘parabolic_shell’, ‘arch’, ‘pointed_arch’, ‘pointed_crossvault’]
thk (float) – The thickness of the masonry
discretisation (int) – The discretisation level
xy_span (list) – The limits of the xy box (for rectangular form diagram)
t (float) – The parameter assumed when no intrados projection is found
Examples
>>> from compas_tno.shapes import Shape >>> data = {'type': 'crossvault', 'thk': 0.5, 'discretisation': 10, 'xy_span': [[0.0, 10.0], [0.0, 10.0]], 't': 0.0 } >>> shape = Shape.from_library(data)
Notes
A
Shape
has the following constructor functionsfrom_library
: Construct the shape from a dictionary with instructions, the library supports the creation of parametric arches, domes, and vaults.from_rhinomesh
: Construct Extrados, Intrados and Middle surfaces from RhinoMeshes.from_rhinosurface
: Construct Extrados, Intrados and Middle surfaces using the U and V isolines.
A
Shape
has the following elements:data
type
: The type of the vault to be constructed.xy_span
: Planar range of the structure.discretisation
: Density of the highfield.thickness
: Mean thickness of the vault.t
: The numerical for the negative bounds on the height of the fixed nodes.
discretisation
array
: (2 x n) array with the coordinate of the n points with intrados, extrados and middle evaluated.
intrados
Mesh
: Mesh representing intrados.
extrados
Mesh
: Mesh representing extrados.
middle
Mesh
: Mesh representing middle surface
Methods
Compute the weight of the fill applied based on the height.
Compute normals analytically for some shapes
Compute and returns the volume of fill in the structure.
Compute and returns the total selfweight of the structure based on the area and thickness in the data.
Compute and returns the vollume of the structure based on the area and thickness in the data.
Create the shape representing a circular arch.
Create the shape representing a circular arch.
Create the shape representing a Crossvault
Create the shape representing a Hemispheric Dome
Create the shape representing a Hemispheric Dome
Create the shape representing a Pavillion Vault
Create the shape representing a Pointed Crossvault
Create a TNO Shape from an assembly
Construct a Shape from the form diagram and its attributes 'ub' and 'lb'.
Construct a Shape from an intrados mesh and a thickness (offset happening to both sides).
Construct a Shape from a library.
Construct a Shape from a library using a proxy implementation (compatible with Rhinoceros).
Construct a Shape from meshes for intrados, extrados, and middle.
Construct a Shape from a pair of meshes and a formdiagram that will have its topology copied and normals copied.
Construct a Shape from a pair of meshes and a formdiagram that will have its topology copied and normals copied.
Construct a Shape from a middle mesh and a thickness (offset happening to compute new extrados).
Construct a Shape from a pointcloud.
Construct a Shape from a pointcloud and a given topology.
Interpolate the middle surface based on intrados and extrados
Store the normals of the shape
Inherited Methods
Converts the instance to a string.
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.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
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.
Validate the object's data against its json schema.