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 functions

  • from_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

add_fill_with_height

Compute the weight of the fill applied based on the height.

analytical_normals

Compute normals analytically for some shapes

compute_fill_weight

Compute and returns the volume of fill in the structure.

compute_selfweight

Compute and returns the total selfweight of the structure based on the area and thickness in the data.

compute_volume

Compute and returns the vollume of the structure based on the area and thickness in the data.

create_arch

Create the shape representing a circular arch.

create_arch_polar

Create the shape representing a circular arch.

create_crossvault

Create the shape representing a Crossvault

create_dome

Create the shape representing a Hemispheric Dome

create_dome_polar

Create the shape representing a Hemispheric Dome

create_pavillionvault

Create the shape representing a Pavillion Vault

create_pointedcrossvault

Create the shape representing a Pointed Crossvault

from_assembly

Create a TNO Shape from an assembly

from_formdiagram_and_attributes

Construct a Shape from the form diagram and its attributes 'ub' and 'lb'.

from_intrados

Construct a Shape from an intrados mesh and a thickness (offset happening to both sides).

from_library

Construct a Shape from a library.

from_library_proxy

Construct a Shape from a library using a proxy implementation (compatible with Rhinoceros).

from_meshes

Construct a Shape from meshes for intrados, extrados, and middle.

from_meshes_and_formdiagram

Construct a Shape from a pair of meshes and a formdiagram that will have its topology copied and normals copied.

from_meshes_and_formdiagram_proxy

Construct a Shape from a pair of meshes and a formdiagram that will have its topology copied and normals copied.

from_middle

Construct a Shape from a middle mesh and a thickness (offset happening to compute new extrados).

from_pointcloud

Construct a Shape from a pointcloud.

from_pointcloud_and_topology

Construct a Shape from a pointcloud and a given topology.

interpolate_middle_from_ub_lb

Interpolate the middle surface based on intrados and extrados

store_normals

Store the normals of the shape

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.