Utilities#

bspleval(x, knots, coeffs, order, periodic=False)#

Evaluate a B-spline at a set of points. The designability can be kept when coeffs contains Dv.

Parameters
  • x (list or ndarray) – The set of points at which to evaluate the spline. Can be given by scipy.

  • knots (list or ndarray) – The set of knots used to define the spline. Can be given by scipy.

  • coeffs (list of ndarray) – The set of spline coefficients. Can be given by scipy.

  • order (int) – The order of the spline.

Returns

y (ndarray)

The value of the spline at each point in x.

More details here.

createBspline(xCoords, yCoords, zCoords, nknots, axis='xyz', periodic=False)#

Return the knots, coef and order of x/y/z spline. Compute the deviation from the sampling points and return it as well. Return None if a specific direction is not designable.

curveReadyForDesignable(curve)#

Check if the given Curve is ready to be made designable.

This is a method of the Curve class.

dcurveReadyForDesignable(dcurve, rm=None)#

Check if the given DeformableCurve is ready to be made Designable.

This is a method of the DeformableCurve class.

makeCurveDesignable(curve, nknots=0, axis='xyz', xbound=None, ybound=None, zbound=None, tol=0.001, periodic=False)#

Make the 3D Curve Designable. The number of Dvs is n*knots, where n is the number of designable axes. If curve.matrix is already designable, then a warning is raised.

This is a method of the Curve class.

makeDeformableCurveDesignable(dcurve, nknots=0, axis='xyz', rm=None, xbound=None, ybound=None, zbound=None, tol=0.001, periodic=False)#

Make the DeformableCurve Designable. The number of Dvs is n*knots, where n is the number of designable axes. If dcurve.markers are already designable, then a warning is raised.

This is a method of the DeformableCurve class.