* Add files via upload Adding parametric pc fan and bottle * Update and rename globals.kcl to parameters.kcl * Update fan-housing.kcl * Update fan-housing.kcl * Update fan.kcl * Update motor.kcl * Update parameters.kcl * Update kcl-samples simulation test output * Update main.kcl avoiding fn imports * Update kcl-samples simulation test output * remove functions * angledLine kwargs * tangentalArc kwargs * Update kcl-samples simulation test output * Update housing middle more tweaks because I just can't help myself * Update kcl-samples simulation test output * Update kcl-samples simulation test output --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: jgomez720 <114548659+jgomez720@users.noreply.github.com>
111 lines
8.2 KiB
Markdown
111 lines
8.2 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 and STEP files 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)
|
|
#### [bottle](bottle/main.kcl) ([screenshot](screenshots/bottle.png))
|
|
[](bottle/main.kcl)
|
|
#### [bracket](bracket/main.kcl) ([screenshot](screenshots/bracket.png))
|
|
[](bracket/main.kcl)
|
|
#### [car-wheel-assembly](car-wheel-assembly/main.kcl) ([screenshot](screenshots/car-wheel-assembly.png))
|
|
[](car-wheel-assembly/main.kcl)
|
|
#### [color-cube](color-cube/main.kcl) ([screenshot](screenshots/color-cube.png))
|
|
[](color-cube/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)
|
|
#### [dual-basin-utility-sink](dual-basin-utility-sink/main.kcl) ([screenshot](screenshots/dual-basin-utility-sink.png))
|
|
[](dual-basin-utility-sink/main.kcl)
|
|
#### [enclosure](enclosure/main.kcl) ([screenshot](screenshots/enclosure.png))
|
|
[](enclosure/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](gear/main.kcl) ([screenshot](screenshots/gear.png))
|
|
[](gear/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)
|
|
#### [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)
|
|
#### [parametric-bearing-pillow-block](parametric-bearing-pillow-block/main.kcl) ([screenshot](screenshots/parametric-bearing-pillow-block.png))
|
|
[](parametric-bearing-pillow-block/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)
|
|
#### [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)
|
|
#### [sheet-metal-bracket](sheet-metal-bracket/main.kcl) ([screenshot](screenshots/sheet-metal-bracket.png))
|
|
[](sheet-metal-bracket/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)
|
|
#### [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)
|
|
|