0.6.0

PyPI link to release 0.6.0 Documentation for release 0.6.0

Performance Optimizations

  • Added recommended performance flags for gfortran based on recommendations on fortran90.org (3877982).
    • Extensions can be compiled in debug mode by setting DEBUG=True (b62460b).
    • Setting BEZIER_NO_EXTENSIONS=True will build pure-Python modules only (3f6280c)
  • Added QUADPACK to use in curve.f90::compute_length (985a4c0).
  • Implemented curve-curve intersection completely in Fortran (e.g. 4a8f801) which resulted in a 10x speedup when called from Python. Also implemented surface-surface intersection completely in Fortran, resulting in a 3x speedup.

Python Changes

New Features

  • Added CurvedPolygon._metadata to track where edges originated, e.g. from a surface-surface intersection (871d23d). This is used for sanity checking in functional tests (e253da2).
  • Made speedup checks specific to the module, not all four. I.e. bezier._HAS_SPEEDUP was dropped in favor of five members, e.g. _HAS_CURVE_SPEEDUP (d798f66).
  • Added bezier.__author__ and bezier.__version__ attributes.
  • Added bezier.get_dll() for Windows (699e39b).
  • Added bezier/__config__.py that adds libbezier to %PATH% on Windows (8538af4).
  • Fortran / Cython speedups added:
    • _curve_speedup.pyx::subdivide_nodes
    • _curve_speedup.pyx::newton_refine
    • _curve_speedup.pyx::locate_point
    • _curve_speedup.pyx::elevate_nodes
    • _curve_speedup.pyx::get_curvature
    • _curve_speedup.pyx::reduce_pseudo_inverse
    • _curve_speedup.pyx::full_reduce
    • _curve_speedup.pyx::compute_length
    • _curve_intersection_speedup.pyx::all_intersections
    • _curve_intersection_speedup.pyx::free_curve_intersections_workspace
    • _helpers_speedup.pyx::contains_nd
    • _helpers_speedup.pyx::vector_close
    • _helpers_speedup.pyx::in_interval
    • _helpers_speedup.pyx::ulps_away
    • _surface_speedup.pyx::specialize_surface
    • _surface_speedup.pyx::subdivide_nodes
    • _surface_speedup.pyx::compute_edge_nodes
    • _surface_intersection_speedup.pyx::newton_refine
    • _surface_intersection_speedup.pyx::locate_point
    • _surface_intersection_speedup.pyx::surface_intersections
    • _surface_intersection_speedup.pyx::free_surface_intersections_workspace

Breaking Changes

  • Curve.intersect() returns s-t parameters rather than x-y values (c309998).
  • Surface.intersect() returns a list with a single Surface when one of the two surfaces is contained in the other (05b1fd9).
  • Surface.is_valid will only return True if the map B(s, t) determined by the surface has everywhere positive Jacobian. Previously a negative Jacobian was also allowed (260fb51).
  • Removed data members from Curve:
  • Removed data members from Surface:
  • Remove dimension argument in _curve_speedup.pyx::elevate_nodes since it can be inferred from nodes (06501c5).

ABI Changes

New Features

  • Fully implemented curve-curve intersection (as curve_intersection.h::curve_intersections) and surface-surface intersection (as surface_intersection.h::surface_intersections) at the ABI level.
  • Added the surface_intersection.h header file and implementations for the described functions (fafd9ff).
  • Newly added functions
  • Added status.h with an enum for failure states. Each Fortran procedure that returns a status documents the possible values and if each value is set directly or by a called procedure (9fc8575, c2accf7).

Breaking Changes

  • Removed functions
    • curve.h::specialize_curve_generic (d52453b)
    • curve.h::specialize_curve_quadratic (d52453b)
    • curve_intersection.h::from_linearized (d62e462)
    • curve_intersection.h::bbox_line_intersect (72c0179)
    • curve_intersection.h::linearization_error (4a3378b)
    • curve_intersection.h::segment_intersection (4060590)
    • curve_intersection.h::parallel_different (df3e195)
  • Renamed functions
    • curve.h::newton_refine to newton_refine_curve (194ce95)
    • curve.h::elevate_nodes to elevate_nodes_curve (194ce95)
    • curve_intersection.h::newton_refine_intersect to newton_refine_curve_intersect (a055525)
  • Replaced degree with num_nodes (== degree + 1) in functions that operate on curves:
    • curve.h::evaluate_curve_barycentric (13eacdd)
    • curve.h::evaluate_multi (962c288)
    • curve.h::specialize_curve (ac86233)
    • curve.h::evaluate_hodograph (9170855)
    • curve_intersection.h::newton_refine_curve_intersect (80ec491)

Miscellany

  • Added documentation for “native extensions” in DEVELOPMENT (2f9f2c4).
  • Overhauled native-libraries doc with subsections for OS X and Windows (bfa75ee, 72005fb, etc.).
  • Added Fortran unit tests (758bdd1, e8afba7, 3164365, etc.).
  • Began testing in Mac OS X on Travis (9ac5e8e, 85f7619, etc.).
  • Added a workaround (include/bezier/_bool_patch.h) for the missing support for bool in old MSVC versions that are required to work with Python 2.7 (5577178).