friendlysam.parts.ConstraintCollection

class friendlysam.parts.ConstraintCollection(owner)

Generates constraints from functions.

This class aggregates functions that generate constraints. It is primarily meant to be used as an attribute of the Part class.

Add functions to it, functions that return constraints. Then call the make() with an index and receive the set of all constraints generated by the contained functions with that index.

See docs for Part.constraints for details.

ConstraintCollection.add(addition) Add a constraint function, or an iterable of constraint functions.
ConstraintCollection.make(index) Create constraints from contained functions.