Great that you’re contributing code!
One small clarification: the
NotImplemented errors are actually correct, they mean that the “core” of the library leaves that implementation open to other plugins, hence, that should not be killed.
Other plugins can add implementations for those
@pluggable methods simply adding the
@plugin decorator to them (as is the case of
There can be multiple implementations of the same
@pluggable methods, the boolean operations are one such case, in which both
compas_cgal implement them, each using their respective tooling (Rhino SDK and CGAL respectively), and as a user, you just need to call the pluggable and
compas will automatically select the one that fits best based on the environment you are running: if you are inside Rhino, then it will use
compas_rhino implementation, because CGAL doesn’t run in there, and if you are in a CPython environment, it will use
compas_cgal (with the obvious prerequisite that it is installed).
If more implementations of the same thing are available for any given environment, the implementations can hint at whether they should be defaults or not using attributes on the decorator, but it is entirely up to compas to pick one.
In the future, there will be a way for a user to also actively select an implementation in these cases.