desc.geometry.FourierPlanarCurve.to_FourierXY

FourierPlanarCurve.to_FourierXY(N=10, grid=None, s=None, basis='xyz', name='')Source

Convert Curve to FourierXYCurve representation.

Note that some types of curves may not be representable in this basis. In this case, a least-squares fit will be done to find the planar curve that best represents the curve.

Parameters:
  • N (int) – Fourier resolution of the new FourierXYCurve representation.

  • grid (Grid, int or None) – Grid used to evaluate curve coordinates on to fit with FourierXYCurve. If an integer, uses that many equally spaced points.

  • s (ndarray or "arclength") – Arbitrary curve parameter to use for the fitting. Should be monotonic, 1D array of same length as coords. if None, defaults linearly spaced in [0,2pi) Alternative, can pass “arclength” to use normalized distance between points.

  • basis ({'xyz', 'rpz'}) – Coordinate system for center and normal vectors. Default = ‘xyz’.

  • name (str) – name for this curve

Returns:

curve (FourierXYCurve) – New representation of the curve parameterized by Fourier series for the X and Y coordinates in a plane specified by a center position and normal vector.