brepjs API Reference
    Preparing search index...

    Function sketchText

    • Render text as 3D sketch outlines on a plane.

      Combines textBlueprints with sketchOnPlane to produce a Sketches collection that can be extruded, revolved, etc.

      Parameters

      • text: string

        The string to render.

      • OptionaltextConfig: { fontFamily?: string; fontSize?: number; startX?: number; startY?: number }

        Font size, family, and start position.

      • planeConfig: { origin?: number | PointInput; plane?: Plane | PlaneName } = {}

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

      Returns Sketches

      A Sketches collection of the text outlines.

      await loadFont("/fonts/Roboto.ttf");
      const textSketches = sketchText("Hello", { fontSize: 24 });
      const solid = textSketches.extrude(2);