CRA_Assembly

class compas_cra.datastructures.CRA_Assembly

Bases: Assembly

Extended data structure for concave assemblies.

Methods

__init__

add_blocks_from_rhinomeshes

Add multiple blocks from their representation as as Rhino meshes.

add_interface_to_interfaces

Add interface to edge (u, v) interfaces.

add_interfaces_from_meshes

Add interfaces from meshes to edge (u, v) interfaces.

add_to_interfaces

Add interface to edge (u, v) interfaces.

delete_block

Delete block.

delete_blocks

Delete blocks.

get_weight_mean

Get assembly mean weight.

get_weight_total

Get total assembly weight.

is_block_support

Check if the block is a support.

move_block

Move block with vector.

rotate_assembly

Rotate the entire assembly.

set_boundary_condition

Set block as boundary condition.

set_boundary_conditions

Set blocks as boundary conditions.

Inherited Methods

ToString

Converts the instance to a string.

add_block

Add a block to the assembly.

add_block_block_interfaces

Add an interface between two blocks.

add_block_from_mesh

Add a block to the assembly from a normal mesh.

block_node

Retrieve the graph node corresponding to a block.

blocks

Iterate over the blocks of the assembly.

compute_aabb

Compute the axis-aligned bounding box of the datastructure.

compute_obb

Compute the oriented bounding box of the datastructure.

copy

Make an independent copy of the data object.

edge_blocks

Retrieve the two blocks corresponding to a graph edge.

edge_interfaces

Retrieve the interface corresponding to a graph edge.

edge_line

Retrieve the line segment between the nodes of the edge.

edges

Iterate over the edges of the graph of the assembly.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_polysurfaces

Construct an assembly from Rhino polysurfaces.

from_rhinomeshes

Construct an assembly from Rhino meshes.

from_template

Construct an assembly from a parameteric template.

has_block

Verify that the assembly contains a given block.

has_interface

Verify that the assembly contains a given interface.

interfaces

Yield the interfaces of the assembly.

node_block

Retrieve the block corresponding to a graph node.

node_point

Retrieve a point representing the location of the node.

nodes

Iterate over the nodes of the graph of the assembly.

number_of_blocks

Return the number of blocks in the assembly.

number_of_edges

Return the number of edges in the assembly graph.

number_of_interfaces

Return the number of interfaces in the assembly.

number_of_nodes

Return the number of nodes in the assembly graph.

rotate

Rotate the datastructure.

rotated

Returns a rotated copy of this geometry.

scale

Scale the datastructure.

scaled

Returns a scaled copy of this geometry.

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.

transform

Transform this assembly by the given transformation matrix.

transform_numpy

Transforms the data structure.

transformed

Transform a copy of this assembly by the given transformation matrix.

transformed_numpy

Returns a transformed copy of this data structure.

translate

Translate the datastructure.

translated

Returns a translated copy of this geometry.

unset_boundary_conditions

Unset all boundary conditions.

validate_data

Validate the data against the object's data schema.