splinepy.helpme.ffd.FFD#

class splinepy.helpme.ffd.FFD(mesh=None, spline=None, padding=None)[source]#

Bases: SplinepyBase

Free-form deformation is a method used to deform an object by a deformation function. In our case the object is given via a mesh, the currently supported mesh-types are gustaf.Vertices and its subclasses, and the deformations function by a spline, supported splines are splinepy.Spline and its subclasses. The splines parametric dimension will be scaled in to a unit-hypercube as well as the original meshes vertices.

The FFD class provides functions to modify the spline by completely overwriting the spline whole spline or parts of it. To obtain the deformed mesh mapped into the latest spline, retrieve the mesh attribute.

Parameters:
  • mesh (gustaf.Vertices) – Mesh used in the FFD. Defaults to None.

  • spline (splinepy.Spline) – Spline used in the FFD. Defaults to None.

  • padding (float) – Padding factor to scale mesh into spline’s parametric space. Ideally, this should be 0, but to avoid floating point issues during evaluation, we apply default settings.TOLERANCE

Return type:

None

Methods

FFD.show(**kwargs)

Visualize.

FFD.showable(**kwargs)

Returns a dictionary of showable items to describe the FFD at the current state.

Attributes

FFD.mesh

Returns copy of current mesh.

FFD.padding

Padding ratio for fitting mesh inside spline's parametric dimension.

FFD.spline

Returns a copy of the spline.