Skip to content

compas_cra.datastructures ¤

Classes¤

CRA_Assembly ¤

CRA_Assembly()

Extended data structure for concave assemblies.

Methods:¤

add_blocks_from_rhinomeshes ¤
add_blocks_from_rhinomeshes(guids)

Add multiple blocks from their representation as as Rhino meshes.

Parameters:

  • guids (list of str) –

    A list of GUIDs identifying the meshes representing the blocks of the assembly.

Returns:

  • list

    The keys of the added blocks.

add_interface_to_interfaces ¤
add_interface_to_interfaces(u, v, interface)

Add interface to edge (u, v) interfaces.

Parameters:

  • u (int) –

    block_j id.

  • v (int) –

    block_k id.

  • interface (class:`compas_assembly.datastructures.Interface`) –

    Interface.

Returns:

  • None
add_interfaces_from_meshes ¤
add_interfaces_from_meshes(meshes, u, v)

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

Parameters:

  • meshes (list of compas.datastructures.Mesh) –

    Meshes.

  • u (int) –

    block_j id.

  • v (int) –

    block_k id.

Returns:

  • None
add_to_interfaces ¤
add_to_interfaces(u, v, size, points, frame)

Add interface to edge (u, v) interfaces.

Parameters:

  • u (int) –

    block_j id.

  • v (int) –

    block_k id.

  • size (float) –

    Interface area.

  • points (int) –

    Interface vertices.

  • frame (int) –

    Local coordinate.

Returns:

  • None
delete_block ¤
delete_block(key)

Delete block.

Parameters:

  • key (int) –

    Assembly node key.

Returns:

  • None
delete_blocks ¤
delete_blocks(keys)

Delete blocks.

Parameters:

  • keys (list of int) –

    Assembly node keys.

Returns:

  • None
get_weight_mean ¤
get_weight_mean(density=1)

Get assembly mean weight.

Parameters:

  • density (float, default: 1 ) –

    Material density.

Returns:

  • None
get_weight_total ¤
get_weight_total(density=1)

Get total assembly weight.

Parameters:

  • density (float, default: 1 ) –

    Material density.

Returns:

  • None
is_block_support ¤
is_block_support(key)

Check if the block is a support.

Parameters:

  • key (int) –

    Assembly node key.

Returns:

  • None
move_block ¤
move_block(key, vector=(0, 0, 0))

Move block with vector.

Parameters:

  • key (int) –

    Assembly node key.

  • vector (list, default: (0, 0, 0) ) –

    Translation vector.

Returns:

  • None
rotate_assembly ¤
rotate_assembly(o, axis, angle, is_rad=False)

Rotate the entire assembly.

Parameters:

  • o (list) –

    Rotation origin.

  • axis (list) –

    Rotation axis.

  • angle (float) –

    Rotation angle.

  • is_rad (bool, default: False ) –

    True: angle is radian. False: angle is degree.

Returns:

  • None
set_boundary_condition ¤
set_boundary_condition(key)

Set block as boundary condition.

Parameters:

  • key (int) –

    Assembly node key.

Returns:

  • None
set_boundary_conditions ¤
set_boundary_conditions(keys)

Set blocks as boundary conditions.

Parameters:

  • keys (list of int) –

    Assembly node keys.

Returns:

  • None