This utilities located in module ezdxf.algebra
:
from ezdxf.algebra import Vector
Functions¶

ezdxf.algebra.
is_close
(a, b)¶ Returns True if value is close to value b, uses
math.isclose(a, b, abs_tol=1e9)
for Python 3, and emulates this function for Python 2.7.

ezdxf.algebra.
is_close_points
(p1, p2)¶ Returns True if all axis of p1 and p2 are close.

ezdxf.algebra.
bspline_control_frame
(fit_points, degree=3, method='distance', power=.5)¶ Generates the control points for the Bspline control frame by Curve Global Interpolation. Given are the fit points and the degree of the Bspline. The function provides 3 methods for generating the parameter vector t:
 method =
uniform
, creates a uniform t vector, form 0 to 1 evenly spaced; see uniform method  method =
distance
, creates a t vector with values proportional to the fit point distances, see chord length method  method =
centripetal
, creates a t vector with values proportional to the fit point distances^power; see centripetal method
Parameters:  fit_points – fit points of Bspline, as list of (x, y[, z]) tuples
 degree – degree of Bspline
 method – calculation method for parameter vector t
 power – power for centripetal method
Returns: a
BSpline
object, withBSpline.control_points
containing the calculated control points, alsoBSpline.knot_values()
returns the used knot values. method =