Assembly.add_part
- Assembly.add_part(part, key=None, **kwargs)[source]
Add a part to the assembly.
- Parameters
part (
compas.datastructures.Part
) – The part to add.key (int or str, optional) – The identifier of the part in the assembly. Note that the key is unique only in the context of the current assembly. Nested assemblies may have the same
key
value for one of their parts. Default isNone
in which case the key will be automatically assigned integer value.kwargs (dict) – Additional named parameters collected in a dict.
- Returns
int or str – The identifier of the part in the current assembly graph.