Files
modeling-app/public/kcl-samples
Adam Chalmers 478bf34f2b Coordinate grid uses same scale as user's units (#7465)
Closes https://github.com/KittyCAD/engine/issues/3494. Thanks to @nadr0 for helping on the JS side.

If users set their units, the grid will stop auto scaling, and instead will be set to 10 of whatever unit they used. 

If users set their units, and those units are metric, then it'll include a scale bar (see screenshot). Imperial units won't have that bar. 

This behaviour is configurable via settings.

## Limitations

 - The scale bar below the grid cannot be disabled in metric units, and cannot be enabled in imperial units

<img width="1690" alt="Screenshot 2025-06-05 at 7 51 41 PM" src="https://github.com/user-attachments/assets/c597087c-f96d-4c30-95f4-b3d8ba2b5567" />
2025-06-23 17:30:26 -05:00
..
2025-05-15 07:42:48 +12:00
2025-05-29 09:59:27 -07:00
2025-05-27 16:08:15 -07:00
2025-05-17 11:16:22 -04:00
2025-05-13 14:03:52 -07:00
2025-06-14 02:27:27 +00:00
2025-05-17 11:16:22 -04:00
2025-06-14 02:27:27 +00:00
2025-05-13 14:03:52 -07:00
2025-06-14 02:27:27 +00:00
2025-06-14 02:27:27 +00:00
2025-06-14 02:27:27 +00:00

kcl-samples

KittyCAD Language (KCL) is our language for defining geometry and working with our Geometry Engine efficiently.

This repository includes a mixture of simple and complex models demonstrating the features and syntax of KCL.

The samples can be browsed in our documentation at https://zoo.dev/docs/kcl-samples.

Guidelines for adding samples

KCL samples conform to a set of style guidelines to ensure consistency and readability.

  1. File Naming: Name your KCL files descriptively and concisely, using hyphens to separate words (e.g., flange.kcl, ball-bearing.kcl).

  2. File Header: Include a title comment at the top of each file, followed by a brief description explaining what the model is and its typical use cases.

  3. Inline Comments: Use inline comments to explain non-obvious parts of the code. Each major section should have a comment describing its purpose.

  4. Constants: Define constants at the beginning of your KCL files for any values that might change or need to be reused (e.g., dimensions, angles).

Snapshot and export

When you submit a PR to add or modify KCL samples, images will be generated and added to the repository automatically.


axial-fan (screenshot)

axial-fan

ball-bearing (screenshot)

ball-bearing

ball-joint-rod-end (screenshot)

ball-joint-rod-end

bench (screenshot)

bench

bone-plate (screenshot)

bone-plate

bottle (screenshot)

bottle

bracket (screenshot)

bracket

brake-rotor (screenshot)

brake-rotor

car-wheel-assembly (screenshot)

car-wheel-assembly

clock (screenshot)

clock

cold-plate (screenshot)

cold-plate

color-cube (screenshot)

color-cube

counterdrilled-weldment (screenshot)

counterdrilled-weldment

countersunk-plate (screenshot)

countersunk-plate

cpu-cooler (screenshot)

cpu-cooler

curtain-wall-anchor-plate (screenshot)

curtain-wall-anchor-plate

cycloidal-gear (screenshot)

cycloidal-gear

dodecahedron (screenshot)

dodecahedron

enclosure (screenshot)

enclosure

engine-valve (screenshot)

engine-valve

exhaust-manifold (screenshot)

exhaust-manifold

flange (screenshot)

flange

focusrite-scarlett-mounting-bracket (screenshot)

focusrite-scarlett-mounting-bracket

food-service-spatula (screenshot)

food-service-spatula

french-press (screenshot)

french-press

gear-rack (screenshot)

gear-rack

gridfinity-baseplate (screenshot)

gridfinity-baseplate

gridfinity-baseplate-magnets (screenshot)

gridfinity-baseplate-magnets

gridfinity-bins (screenshot)

gridfinity-bins

gridfinity-bins-stacking-lip (screenshot)

gridfinity-bins-stacking-lip

hammer (screenshot)

hammer

helical-gear (screenshot)

helical-gear

helical-planetary-gearset (screenshot)

helical-planetary-gearset

helium-tank (screenshot)

helium-tank

herringbone-gear (screenshot)

herringbone-gear

herringbone-planetary-gearset (screenshot)

herringbone-planetary-gearset

hex-nut (screenshot)

hex-nut

i-beam (screenshot)

i-beam

keyboard (screenshot)

keyboard

kitt (screenshot)

kitt

lego (screenshot)

lego

makeup-mirror (screenshot)

makeup-mirror

mounting-plate (screenshot)

mounting-plate

mug (screenshot)

mug

multi-axis-robot (screenshot)

multi-axis-robot

pdu-faceplate (screenshot)

pdu-faceplate

pillow-block-bearing (screenshot)

pillow-block-bearing

pipe (screenshot)

pipe

pipe-flange-assembly (screenshot)

pipe-flange-assembly

pipe-with-bend (screenshot)

pipe-with-bend

poopy-shoe (screenshot)

poopy-shoe

prosthetic-hip (screenshot)

prosthetic-hip

router-template-cross-bar (screenshot)

router-template-cross-bar

router-template-slate (screenshot)

router-template-slate

sash-window (screenshot)

sash-window

sheet-metal-bracket (screenshot)

sheet-metal-bracket

shepherds-hook-bolt (screenshot)

shepherds-hook-bolt

socket-head-cap-screw (screenshot)

socket-head-cap-screw

spinning-highrise-tower (screenshot)

spinning-highrise-tower

spool (screenshot)

spool

spur-gear (screenshot)

spur-gear

spur-reduction-gearset (screenshot)

spur-reduction-gearset

surgical-drill-guide (screenshot)

surgical-drill-guide

t-slot-rail (screenshot)

t-slot-rail

teapot (screenshot)

teapot

telemetry-antenna (screenshot)

telemetry-antenna

thermal-block-insert (screenshot)

thermal-block-insert

tooling-nest-block (screenshot)

tooling-nest-block

truss-structure (screenshot)

truss-structure

utility-sink (screenshot)

utility-sink

walkie-talkie (screenshot)

walkie-talkie

washer (screenshot)

washer

wing-spar (screenshot)

wing-spar