* Add brake disc. * Update kcl-samples simulation test output * Update public/kcl-samples/brake-rotor/main.kcl Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> * Update public/kcl-samples/brake-rotor/main.kcl Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
159 lines
12 KiB
Markdown
159 lines
12 KiB
Markdown
# 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.
|
|
|
|
---
|
|
#### [80-20-rail](80-20-rail/main.kcl) ([screenshot](screenshots/80-20-rail.png))
|
|
[](80-20-rail/main.kcl)
|
|
#### [axial-fan](axial-fan/main.kcl) ([screenshot](screenshots/axial-fan.png))
|
|
[](axial-fan/main.kcl)
|
|
#### [ball-bearing](ball-bearing/main.kcl) ([screenshot](screenshots/ball-bearing.png))
|
|
[](ball-bearing/main.kcl)
|
|
#### [bench](bench/main.kcl) ([screenshot](screenshots/bench.png))
|
|
[](bench/main.kcl)
|
|
#### [bone-plate](bone-plate/main.kcl) ([screenshot](screenshots/bone-plate.png))
|
|
[](bone-plate/main.kcl)
|
|
#### [bottle](bottle/main.kcl) ([screenshot](screenshots/bottle.png))
|
|
[](bottle/main.kcl)
|
|
#### [bracket](bracket/main.kcl) ([screenshot](screenshots/bracket.png))
|
|
[](bracket/main.kcl)
|
|
#### [brake-rotor](brake-rotor/main.kcl) ([screenshot](screenshots/brake-rotor.png))
|
|
[](brake-rotor/main.kcl)
|
|
#### [car-wheel-assembly](car-wheel-assembly/main.kcl) ([screenshot](screenshots/car-wheel-assembly.png))
|
|
[](car-wheel-assembly/main.kcl)
|
|
#### [cold-plate](cold-plate/main.kcl) ([screenshot](screenshots/cold-plate.png))
|
|
[](cold-plate/main.kcl)
|
|
#### [color-cube](color-cube/main.kcl) ([screenshot](screenshots/color-cube.png))
|
|
[](color-cube/main.kcl)
|
|
#### [counterdrilled-weldment](counterdrilled-weldment/main.kcl) ([screenshot](screenshots/counterdrilled-weldment.png))
|
|
[](counterdrilled-weldment/main.kcl)
|
|
#### [countersunk-plate](countersunk-plate/main.kcl) ([screenshot](screenshots/countersunk-plate.png))
|
|
[](countersunk-plate/main.kcl)
|
|
#### [cpu-cooler](cpu-cooler/main.kcl) ([screenshot](screenshots/cpu-cooler.png))
|
|
[](cpu-cooler/main.kcl)
|
|
#### [curtain-wall-anchor-plate](curtain-wall-anchor-plate/main.kcl) ([screenshot](screenshots/curtain-wall-anchor-plate.png))
|
|
[](curtain-wall-anchor-plate/main.kcl)
|
|
#### [cycloidal-gear](cycloidal-gear/main.kcl) ([screenshot](screenshots/cycloidal-gear.png))
|
|
[](cycloidal-gear/main.kcl)
|
|
#### [dodecahedron](dodecahedron/main.kcl) ([screenshot](screenshots/dodecahedron.png))
|
|
[](dodecahedron/main.kcl)
|
|
#### [enclosure](enclosure/main.kcl) ([screenshot](screenshots/enclosure.png))
|
|
[](enclosure/main.kcl)
|
|
#### [engine-valve](engine-valve/main.kcl) ([screenshot](screenshots/engine-valve.png))
|
|
[](engine-valve/main.kcl)
|
|
#### [exhaust-manifold](exhaust-manifold/main.kcl) ([screenshot](screenshots/exhaust-manifold.png))
|
|
[](exhaust-manifold/main.kcl)
|
|
#### [flange](flange/main.kcl) ([screenshot](screenshots/flange.png))
|
|
[](flange/main.kcl)
|
|
#### [focusrite-scarlett-mounting-bracket](focusrite-scarlett-mounting-bracket/main.kcl) ([screenshot](screenshots/focusrite-scarlett-mounting-bracket.png))
|
|
[](focusrite-scarlett-mounting-bracket/main.kcl)
|
|
#### [food-service-spatula](food-service-spatula/main.kcl) ([screenshot](screenshots/food-service-spatula.png))
|
|
[](food-service-spatula/main.kcl)
|
|
#### [french-press](french-press/main.kcl) ([screenshot](screenshots/french-press.png))
|
|
[](french-press/main.kcl)
|
|
#### [gear-rack](gear-rack/main.kcl) ([screenshot](screenshots/gear-rack.png))
|
|
[](gear-rack/main.kcl)
|
|
#### [gridfinity-baseplate](gridfinity-baseplate/main.kcl) ([screenshot](screenshots/gridfinity-baseplate.png))
|
|
[](gridfinity-baseplate/main.kcl)
|
|
#### [gridfinity-baseplate-magnets](gridfinity-baseplate-magnets/main.kcl) ([screenshot](screenshots/gridfinity-baseplate-magnets.png))
|
|
[](gridfinity-baseplate-magnets/main.kcl)
|
|
#### [gridfinity-bins](gridfinity-bins/main.kcl) ([screenshot](screenshots/gridfinity-bins.png))
|
|
[](gridfinity-bins/main.kcl)
|
|
#### [gridfinity-bins-stacking-lip](gridfinity-bins-stacking-lip/main.kcl) ([screenshot](screenshots/gridfinity-bins-stacking-lip.png))
|
|
[](gridfinity-bins-stacking-lip/main.kcl)
|
|
#### [hammer](hammer/main.kcl) ([screenshot](screenshots/hammer.png))
|
|
[](hammer/main.kcl)
|
|
#### [helical-gear](helical-gear/main.kcl) ([screenshot](screenshots/helical-gear.png))
|
|
[](helical-gear/main.kcl)
|
|
#### [helical-planetary-gearset](helical-planetary-gearset/main.kcl) ([screenshot](screenshots/helical-planetary-gearset.png))
|
|
[](helical-planetary-gearset/main.kcl)
|
|
#### [helium-tank](helium-tank/main.kcl) ([screenshot](screenshots/helium-tank.png))
|
|
[](helium-tank/main.kcl)
|
|
#### [herringbone-gear](herringbone-gear/main.kcl) ([screenshot](screenshots/herringbone-gear.png))
|
|
[](herringbone-gear/main.kcl)
|
|
#### [herringbone-planetary-gearset](herringbone-planetary-gearset/main.kcl) ([screenshot](screenshots/herringbone-planetary-gearset.png))
|
|
[](herringbone-planetary-gearset/main.kcl)
|
|
#### [hex-nut](hex-nut/main.kcl) ([screenshot](screenshots/hex-nut.png))
|
|
[](hex-nut/main.kcl)
|
|
#### [i-beam](i-beam/main.kcl) ([screenshot](screenshots/i-beam.png))
|
|
[](i-beam/main.kcl)
|
|
#### [keyboard](keyboard/main.kcl) ([screenshot](screenshots/keyboard.png))
|
|
[](keyboard/main.kcl)
|
|
#### [kitt](kitt/main.kcl) ([screenshot](screenshots/kitt.png))
|
|
[](kitt/main.kcl)
|
|
#### [lego](lego/main.kcl) ([screenshot](screenshots/lego.png))
|
|
[](lego/main.kcl)
|
|
#### [makeup-mirror](makeup-mirror/main.kcl) ([screenshot](screenshots/makeup-mirror.png))
|
|
[](makeup-mirror/main.kcl)
|
|
#### [mounting-plate](mounting-plate/main.kcl) ([screenshot](screenshots/mounting-plate.png))
|
|
[](mounting-plate/main.kcl)
|
|
#### [multi-axis-robot](multi-axis-robot/main.kcl) ([screenshot](screenshots/multi-axis-robot.png))
|
|
[](multi-axis-robot/main.kcl)
|
|
#### [pdu-faceplate](pdu-faceplate/main.kcl) ([screenshot](screenshots/pdu-faceplate.png))
|
|
[](pdu-faceplate/main.kcl)
|
|
#### [pillow-block-bearing](pillow-block-bearing/main.kcl) ([screenshot](screenshots/pillow-block-bearing.png))
|
|
[](pillow-block-bearing/main.kcl)
|
|
#### [pipe](pipe/main.kcl) ([screenshot](screenshots/pipe.png))
|
|
[](pipe/main.kcl)
|
|
#### [pipe-flange-assembly](pipe-flange-assembly/main.kcl) ([screenshot](screenshots/pipe-flange-assembly.png))
|
|
[](pipe-flange-assembly/main.kcl)
|
|
#### [pipe-with-bend](pipe-with-bend/main.kcl) ([screenshot](screenshots/pipe-with-bend.png))
|
|
[](pipe-with-bend/main.kcl)
|
|
#### [poopy-shoe](poopy-shoe/main.kcl) ([screenshot](screenshots/poopy-shoe.png))
|
|
[](poopy-shoe/main.kcl)
|
|
#### [prosthetic-hip](prosthetic-hip/main.kcl) ([screenshot](screenshots/prosthetic-hip.png))
|
|
[](prosthetic-hip/main.kcl)
|
|
#### [router-template-cross-bar](router-template-cross-bar/main.kcl) ([screenshot](screenshots/router-template-cross-bar.png))
|
|
[](router-template-cross-bar/main.kcl)
|
|
#### [router-template-slate](router-template-slate/main.kcl) ([screenshot](screenshots/router-template-slate.png))
|
|
[](router-template-slate/main.kcl)
|
|
#### [sash-window](sash-window/main.kcl) ([screenshot](screenshots/sash-window.png))
|
|
[](sash-window/main.kcl)
|
|
#### [sheet-metal-bracket](sheet-metal-bracket/main.kcl) ([screenshot](screenshots/sheet-metal-bracket.png))
|
|
[](sheet-metal-bracket/main.kcl)
|
|
#### [shepherds-hook-bolt](shepherds-hook-bolt/main.kcl) ([screenshot](screenshots/shepherds-hook-bolt.png))
|
|
[](shepherds-hook-bolt/main.kcl)
|
|
#### [socket-head-cap-screw](socket-head-cap-screw/main.kcl) ([screenshot](screenshots/socket-head-cap-screw.png))
|
|
[](socket-head-cap-screw/main.kcl)
|
|
#### [spinning-highrise-tower](spinning-highrise-tower/main.kcl) ([screenshot](screenshots/spinning-highrise-tower.png))
|
|
[](spinning-highrise-tower/main.kcl)
|
|
#### [spur-gear](spur-gear/main.kcl) ([screenshot](screenshots/spur-gear.png))
|
|
[](spur-gear/main.kcl)
|
|
#### [spur-reduction-gearset](spur-reduction-gearset/main.kcl) ([screenshot](screenshots/spur-reduction-gearset.png))
|
|
[](spur-reduction-gearset/main.kcl)
|
|
#### [surgical-drill-guide](surgical-drill-guide/main.kcl) ([screenshot](screenshots/surgical-drill-guide.png))
|
|
[](surgical-drill-guide/main.kcl)
|
|
#### [thermal-block-insert](thermal-block-insert/main.kcl) ([screenshot](screenshots/thermal-block-insert.png))
|
|
[](thermal-block-insert/main.kcl)
|
|
#### [tooling-nest-block](tooling-nest-block/main.kcl) ([screenshot](screenshots/tooling-nest-block.png))
|
|
[](tooling-nest-block/main.kcl)
|
|
#### [utility-sink](utility-sink/main.kcl) ([screenshot](screenshots/utility-sink.png))
|
|
[](utility-sink/main.kcl)
|
|
#### [walkie-talkie](walkie-talkie/main.kcl) ([screenshot](screenshots/walkie-talkie.png))
|
|
[](walkie-talkie/main.kcl)
|
|
#### [washer](washer/main.kcl) ([screenshot](screenshots/washer.png))
|
|
[](washer/main.kcl)
|
|
#### [wing-spar](wing-spar/main.kcl) ([screenshot](screenshots/wing-spar.png))
|
|
[](wing-spar/main.kcl)
|
|
|