Add C acceleration module
A lot of the performance issues of BASEmesh v1.X were able to be resolved through refactoring and new formats. The main exception to this was the interpolation from mesh sources, which is always going to be expensive as it has to be run for every node in the quality mesh.
This process cannot really be sped up within Python itself. The solution is to re-implement the most expensive operations in C, which is generally orders of magnitude faster.
Prime candidates for conversion to C:
triangle_interpolate
half_plane_distance
point_in_polygon_convex
A pure-Python implementation should be available for compatibility. Details are TBD, but something like this should work nicely across environments:
# basemesh/algorithms/__init__.py
try:
from .c_algorithms import *
except ImportError:
from .py_algorithms import *
# Optional: Warn the user that they're using pure python
import warnings
warnings.warn('Acceleration module missing, falling back to pure-Python',
ImportWarning)