The lossless, open, fast CAD file format

{
  ...standard glTF code...
  {
  "extensions": {
    "KITTYCAD_boundary_representation": {
      "solids": [
        {
          "outerShell": 0,
          "mesh": 0
        }
      ],
      "shells": [
        {
          "faces": [
            0,
            1
          ]
        }
      ],
      "faces": [
        {
          "surface": 0,
          "outerLoop": 0,
          "innerLoops": [
            1
          ]
        },
        {
          "surface": 1,
          "outerLoop": 2,
          "innerLoops": [
            3
          ]
        }
      ],
      "loops": [
        {
          "edges": [
            0
          ]
        },
        {
          "edges": [
            -1
          ]
        },
        {
          "edges": [
            0
          ]
        },
        {
          "edges": [
            1
          ]
        }
      ],
      "edges": [
        {
          "curve": 0,
          "closed": true
        },
        {
          "curve": 1,
          "closed": true
        }
      ],
      "vertices": [
        [
          0.15018,
          0,
          0
        ],
        [
          -0.04982,
          0,
          0
        ]
      ],
      "surfaces": [
        {
          "type": "plane",
          "plane": {
            "normal": [
              0,
              0,
              -1
            ],
            "point": [
              0,
              0,
              0
            ]
          }
        },
        {
          "type": "torus",
          "torus": {
            "origin": [
              0,
              0,
              0
            ],
            "circle": {
              "radius": 0.05018,
              "normal": [
                0,
                0,
                1
              ],
              "xbasis": [
                1,
                0,
                0
              ]
            },
            "radius": 0.1
          }
        }
      ],
      "curves": [
        {
          "type": "circle",
          "circle": {
            "origin": [
              0,
              0,
              0
            ],
            "radius": 0.15018,
            "normal": [
              0,
              0,
              1
            ],
            "xbasis": [
              1,
              0,
              0
            ]
          },
          "domain": {
            "min": 0,
            "max": 6.28319
          }
        },
        {
          "type": "circle",
          "circle": {
            "origin": [
              0,
              0,
              0
            ],
            "radius": 0.04982,
            "normal": [
              0,
              0,
              -1
            ],
            "xbasis": [
              -1,
              0,
              0
            ]
          },
          "domain": {
            "min": 0,
            "max": 6.28319
          }
        }
      ]
    }
  }
}
}

KittyCAD is built on an extension of the open glTF file format which we will soon submit to its standards body. It’s human-readable and blazingly fast to load.

How it works

glTF is a file format for 3D models maintained by an open standards body called the Khronos Group. It has historically been used for mesh-based models for film and games, but our extension makes it possible to define boundary representation (B-Rep) models using the same format, written as simple JavaScript Object Notation (JSON) metadata.

B-Rep succinctly defines 3D objects using surfaces composed of vertices, edges, and faces, outlining their external shape. Unlike implicit modeling, B-Rep provides precise control over the object's geometry and topology, facilitating accurate and efficient design modifications, essential for manufacturing processes where exact dimensions and tolerances are crucial.

View our draft

Why we need it

This isn’t a case of yet-another-standard. Instead of creating a new format, we’re extending a great pre-existing standard. CAD file formats have many long-standing issues: being proprietary, being inextensible, being incomplete for manufacturing use. glTF can serve as an open foundation for working with files in the KittyCAD API and beyond.

    Fast

    We can parse glTF fast, because we can build upon the optimizations of countless open source developers who have pushed JSON serialization to be as fast as possible.

    Lossless

    Our format stores mesh approximations alongside geometrically perfect boundary representations, and even tooling and material data. The most common CAD formats can be converted to our glTF extension reliably. If you notice anything missing, please let us know and we'll fix it!

    Open

    Our glTF extension will be an open standard, not a moat around KittyCAD. We believe in open formats and protocols, and we encourage all hardware design tools to support them too.

    Human-readable

    JSON is a familiar, easy-to-read standard of keys and their values. This means you can open a .gltf file and actually make sense of it, and building tools to inspect CAD files is that much easier.

glTF vs kcl

kcl is our domain-specific language for defining models in Zoo Modeling App, while our extension to glTF is an open standard file format. We envision our glTF file extension to be used similarly to how STEP files are used today, sending parts and assemblies to manufacturers. For the software engineers in the audience, you can think of kcl as your source code and glTF as your compiled binary.

Try it out today

All our APIs already support our new format. You can upload your own models today to test it out, or set it as the output format of any API call. Convert from SolidWorks or any other common CAD format seamlessly, or use our tools to include metadata like material properties and manufacturing instructions directly in the file.