brepjs API Reference
    Preparing search index...

    Function sketchRectangle

    • Create a rectangular Sketch centered on a given plane.

      Parameters

      • xLength: number

        Width along the plane X direction.

      • yLength: number

        Height along the plane Y direction.

      • planeConfig: PlaneConfig = {}

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

      Returns Sketch

      A closed rectangular Sketch.

      const rect = sketchRectangle(30, 20);
      const box = rect.extrude(10);