brepjs API Reference
    Preparing search index...

    Function sketchParametricFunction

    • Create a Sketch from a parametric 2D function, approximated as a B-spline.

      The function is sampled at pointsCount + 1 evenly spaced parameter values between start and stop, then fit with a B-spline approximation.

      Parameters

      • func: (t: number) => Point2D

        Parametric function mapping t to a 2D point.

      • planeConfig: PlaneConfig = {}

        Plane to sketch on (defaults to XY at origin).

      • __namedParameters: { pointsCount?: number; start?: number; stop?: number } = {}
      • approximationConfig: BSplineApproximationOptions = {}

        B-spline fitting options (tolerance, degree, etc.).

      Returns Sketch

      A Sketch containing the approximated curve.