Zoo Design Studio Documentation
repository·main·Indexed 22 days ago
https://github.com/kittycad/modeling-appA hybrid CAD modeling application that treats geometric artifacts as human-readable KCL code. It features a GPU-accelerated, cloud-hosted geometry engine for high-performance rendering via video streams. The project includes the @kittycad/registry reactive framework for declarative composition, @kittycad/ui-components for app-agnostic UI elements, and a KCL Language Server for VSCode and Neovim.
What's inside Zoo Design Studio
- Source Code Pro is a set of OpenType fonts specifically designed for user interface (UI) environments. It is available as an open-source project.
Overview of the KCL Standard Library
mainThe KCL Standard Library provides a comprehensive set of modules for geometric modeling, mathematical operations, data manipulation, and geometric dimensioning and tolerancing (GDT). It is organized into specialized modules that allow users to perform complex CAD tasks such as sketching, solid modeling, hole creation, and geometric constraints.Overview of the KCL standard library (std)
mainThe KCL standard library (std) provides frequently used constants, utility functions, and functions for interacting with KittyCAD servers to create sketches and geometry. While the library is organized into specific modules, most members are available globally in KCL programs without explicit imports.Overview of KCL Syntax
mainThe
kcl-syntaxcrate provides a lossless lexer and (future) parser for the KCL language. It is designed to be used by both the Language Server Protocol (LSP) and the KCL evaluator.The core data structure is an immutable Concrete Syntax Tree (CST). Unlike a standard Abstract Syntax Tree (AST), the CST is lossless, meaning it preserves all information from the original source text, including:
- Comments
- Whitespace
- Code
- Erroneous or incomplete input
Developers can interact with this data through typed AST wrapper APIs, which provide different views depending on the use case: an AST for evaluation or a syntax tree for text querying and manipulation.
Overview of kcl-wasm-lib
mainThekcl-wasm-libis a WebAssembly (WASM) build of thekcl-libRust crate. It is intended for use in environments that support WASM, providing the core KCL functionality in a portable format.Overview of Zoo Design Studio
mainZoo Design Studio is a modern CAD application that uses a hybrid modeling approach. It combines a point-and-click GUI with a code-based representation using the KCL language.
Key characteristics include:
- Code-as-Artifact: All parts and assemblies are represented as human-readable KCL code, making them compatible with standard version control systems like GitHub.
- Hybrid Interface: GUI interactions are translated into KCL code under the hood, allowing users to switch between visual modeling and manual coding.
- GPU-Accelerated Rendering: The geometry engine is built for GPUs (primarily Nvidia's Vulkan) to provide high-performance rendering.
- Cloud-Native Architecture: The 3D view is delivered as a video stream from a hosted geometry engine via WebSockets, offloading resource-intensive rendering and analysis from the local machine.
Use @kittycad/ui-components
main@kittycad/ui-components is a library of documented and tested UI components. It is intended for components that have an app-agnostic API and are decoupled from application-specific state machines, routing, or network clients. Components in this package are verified with Storybook stories and Vitest coverage for rendering and behavior.KCL Language Reference Overview
mainKCL is the language used within the Zoo Design Studio. This reference provides technical documentation for the language's core features. For a tutorial-based learning experience, use the KCL Guide. For details on built-in functions and types, refer to the KCL Standard Library documentation.Use the math module in KCL
mainThemathmodule in the KCL standard library (std) provides functions for mathematical operations and several useful mathematical constants. It includes support for trigonometry, logarithms, rounding, and geometric calculations like leg length and angle.Use the transform module in KCL
mainThetransformmodule in thestdlibrary provides a set of functions for performing geometric transformations on sketches and solids. It includes operations for translation, rotation, scaling, mirroring (both 2D and 3D), hiding elements, and deleting them.Use the `array` module in KCL std
mainThearraymodule in the KCL standard library (std) provides a set of functions for manipulating arrays of values. It includes common functional programming utilities such asmap,reduce,flatten, andconcat, as well as stack-like operations likepushandpop.Use the `hole` module for drilling and cutting solids
mainTheholemodule in thestdlibrary provides definitions for standard holes that can be drilled or cut into solids. It includes functions for various hole types (blind, counterbore, countersink, etc.) and methods for positioning them (single holes, arrays of holes, or linear patterns).