0.3.0
Performance Optimizations
Adding
__slots__
for all classesRemoving all usage of
@property
calls from internal callers (to avoid function call overhead)Avoiding un-necessary data copying, e.g.
nodes[[0], :]
creates a copy butnodes[0, :].reshape((1, 2))
does not (more details)Adding
_verify
switches to selectively disable overly defensive value checking. Added toCurvedPolygon
constructor,Surface.evaluate_barycentric()
(doc),Surface.evaluate_cartesian()
(doc),Surface.evaluate_multi()
(doc) andSurface.intersect()
(doc). Internal callers with already verified data now skip verification stepsBailing out early if surface bounding boxes are disjoint in
Surface.intersect()
method
Breaking Changes
Requiring
degree
inCurve
(doc) andSurface
(doc) constructors, but addingCurve.from_nodes()
(doc) andSurface.from_nodes()
(doc) factories to accept nodes only (computing the degree in the constructor every time is a waste of flops, especially if the caller knows the degree)Removing custom equality checks for
Curve
(doc) andSurface
(doc) objects. The previous implementation did not factor in all relevant valuesReturning
1xD
arrays instead of flattenedD
-dimensional 1D arrays fromCurve.evaluate()
(doc),Surface.evaluate_barycentric()
(doc),Surface.evaluate_cartesian()
(doc), and related helpersRenaming
Intersection.left/right
properties asfirst/second
properties (They were poorly named originally, since “left” and “right” were in reference to where they were used in code, not geometry. This class is not part of the public interface, but it is documented.)
Bug Fixes
Handling cases where one corner of a surface touches another but their interiors don’t intersect (in the
Surface.intersect()
method). Addingignored_corner
classification to handle these curve-curve intersecions that don’t contribute to a surface-surface intersectionThrowing exception in the
Curve.locate()
method when the subdivided intervals are very far apart (#13)Improving
Surface.is_valid
property by considering the signs of the Jacobian determinant at corner nodes (#12)
Miscellany
Adding possible strategy to avoid linear convergence in
newton_refine()
helperAdding AppVeyor configuration to make sure there are no Windows issues, testing exclusively with
conda
installUpdating generated images with
matplotlib
2.0