Assembly.add_block

Assembly.add_block(block, node=None, attr_dict=None, **kwattr)

Add a block to the assembly.

Parameters:
blockcompas_assembly.datastructures.Block

The block to add.

nodehashable, optional

The identifier of the corresponding node in the connectivity graph. If no value is provided, the identifier will be generated automatically by the graph.

attr_dictdict, optional

A dictionary of block attributes.

**kwatrdict, optional

Additional attributes in the form of named function parameters.

Returns:
hashable

The identifier of the node in the graph corresponding to the block.