PlateElement

class compas_model.elements.PlateElement(polygon, thickness, compute_loft=True, name=None)

Bases: Element

A block represented by a central point and a mesh.

The implementation is inspired by the compas_assembly block class: BlockResearchGroup/compas_assembly

Parameters:
polygoncompas.geometry.Polygon

The outline of the plate.

thicknessfloat

The thickness of the plate.

compute_loftbool

If True, the geometry is set as a mesh from lofting the two outlines, otherwise the geometry is set as two outlines.

namestr

The name of the element.

Attributes:
guiduuid

The unique identifier of the element.

geometryUnion[Geometry, Mesh]

The geometry of the element.

framecompas.geometry.Frame

The frame of the element.

namestr

The name of the element.

graph_nodecompas.datastructures.GraphNode

The graph node of the element.

tree_nodecompas.datastructures.TreeNode

The tree node of the element.

dimensionslist

The dimensions of the element.

aabbcompas.geometry.Box

The Axis Aligned Bounding Box (AABB) of the element.

obbcompas.geometry.Box

The Oriented Bounding Box (OBB) of the element.

collision_meshcompas.datastructures.Mesh

The collision geometry of the element.

featuresdict

These are custom geometrical objects added to the elements through operations made by the user. For example, a cutting shape for boolean difference operations, text identifiers.

insertioncompas.geometry.Vector

The insertion vector of the element. Default is (0, 0, -1), representing a downwards insertion. This attribute is often used for simulating an assembly sequence.

face_polygonslist, read-only

Flat area list of the face polygons of the element, used for interface detection.

Methods

__init__

compute_aabb

Computes the Oriented Bounding Box (OBB) of the element.

compute_collision_mesh

Computes the collision geometry of the element.

compute_loft

Computes the lofted mesh of the element.

compute_obb

Computes the Axis Aligned Bounding Box (AABB) of the element.

from_two_polygons

Create a plate from two polygons.¨

get_average_frame

mesh_from_loft

Create a mesh from two lists of points.

transform

Transforms all the attrbutes of the class.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

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

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transformed

Creates a transformed copy of the class.

validate_data

Validate the data against the object's data schema.