Zoo (KCL) Kernel

KittyCAD Language for cloud-native CAD with AI integration.

Setup

Set the KITTYCAD_API_TOKEN environment variable for Zoo API access.

Usage

  1. Load/create a file ending with .kcl or set the build asset language to zoo.
  2. The CAD machine will automatically choose the Zoo kernel and spin up the zoo.worker.
  3. All viewer features work including mesh display, STL export, and STEP export.

Example

send({
  type: 'initializeModel',
  code: `
const width = 10
const height = 10
const depth = 10

const cube = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([width, 0], %)
  |> line([0, height], %)
  |> line([-width, 0], %)
  |> close(%)
  |> extrude(depth, %)
  `,
  parameters: {},
  kernelType: 'zoo',
});

KCL Syntax

KCL uses a functional, pipe-based syntax:

const part = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> line([0, 10], %)
  |> line([-10, 0], %)
  |> close(%)
  |> extrude(5, %)