Model.add_modifier
- Model.add_modifier(source, target, modifiertype)
Add a modifier between two elements, with one the source of the modifier and the other the target.
- Parameters:
- source
compas_model.elements.Element
The source element.
- target
compas_model.elements.Element
The target element.
- modifiertypeType[
compas_model.modifiers.Modifier
] The type of modifier.
- source
- Returns:
- list[Modifier]
All modifiers stored on the interaction edge between source and target.
Notes
This element should implement the protocol specified by the modifier. The methods of the source element defined by the protocol are used to compute the tools involved in the modification. The tools are used by the modifier to apply the modification to the model geometry of the target element.
The modifier defines the protocol for the modification. The protocol should be implemented by the source element. The protocol methods of the source element are used to compute the modification tool. The modifier applies the modification to the target using this tool.