Settings
KCL Settings
There are three levels of settings available in Zoo Design Studio:
- User Settings: Global settings that apply to all projects, stored in
user.toml - Project Settings: Settings specific to a project, stored in
project.toml - Per-file Settings: Settings that apply to a single KCL file, specified using the
@settingsattribute
Configuration Files
Zoo Design Studio uses TOML files for configuration:
- User Settings:
user.toml- See complete documentation - Project Settings:
project.toml- See complete documentation
Per-file settings
Settings which affect a single file are configured using the settings attribute. This must be at the top of the KCL file (comments before the attribute are permitted). For example:
The settings attribute may contain multiple properties separated by commas. Valid properties are:
defaultLengthUnit: the default length unit to use for numbers declared in this file.- Accepted values:
mm,cm,m,in(inches),ft(feet),yd(yards).
- Accepted values:
defaultAngleUnit: the default angle unit to use for numbers declared in this file.- Accepted values:
deg(degrees),rad(radians). - Deprecated with a warning in KCL 2.0 and earlier, and an error in KCL 3.0-preview and later. Use explicit suffixes for angles, e.g.
180degor3.14rad, instead.
- Accepted values:
experimentalFeatures: how experimental features are handled within this file.- Accepted values:
allow(experimental features can be used freely),warn(experimental features cause a warning),deny(the default, experimental features cause an error).
- Accepted values:
kclVersion: the version of the KCL language and standard libary to execute with.- Accepted values:
1.0,2.0,"3.0-preview"(experimental). - When the file being executed declares
"3.0-preview", that version governs the whole execution, including any files it imports. Under"3.0-preview":returnimmediately exits the enclosing function; statements after an executedreturndo not run.- Each
if/else if/elsebranch body introduces its own scope: a variable declared inside a branch is visible from its declaration to the branch's closing brace, never outside it, and may shadow a variable from an enclosing scope. - A member expression evaluates its object before its property: in
a[b],ais evaluated beforeb. Earlier versions evaluatebfirst. filletandchamferare sent to the engine immediately, in order with other modeling commands, instead of being deferred until the end of the file. The engine replaces a cut edge with a new face, so look up an edge (for example withgetOppositeEdgeorgetNextAdjacentEdge) before thefilletorchamferthat consumes it, and store the result in a variable.
- Accepted values:
These settings override any project-wide settings (configured in project.toml or via the UI).