Compare commits

...

33 Commits

Author SHA1 Message Date
3083b7d34d Merge remote-tracking branch 'origin/main' into paultag/gpu 2025-04-04 15:38:59 -04:00
cbe27758bc Merge branch 'paultag/gpu' of github.com:kittycad/modeling-app into paultag/gpu 2025-04-04 15:37:49 -04:00
462fb10764 enter the fa/fo cycle 2025-04-04 15:37:30 -04:00
4d31fb890d Bump vite from 5.4.16 to 5.4.17 in /packages/codemirror-lang-kcl in the security group (#6150)
Bump vite in /packages/codemirror-lang-kcl in the security group

Bumps the security group in /packages/codemirror-lang-kcl with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.16 to 5.4.17
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.17/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.17/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.17
  dependency-type: indirect
  dependency-group: security
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 18:57:20 +00:00
ef451fd8f7 Bump vite from 5.4.16 to 5.4.17 in the security group (#6151)
Bumps the security group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.16 to 5.4.17
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.17/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.17/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.17
  dependency-type: direct:development
  dependency-group: security
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-04 18:40:35 +00:00
656eb0abec Update all KCL-Samples to be more ME friendly (#6132)
* update all kcl-samples

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* Update kcl-samples simulation test output

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 11:03:13 -07:00
a7896329f7 Shorten feedback cycle for legitimate failures (#6146)
Stop sooner with legitimate failures
2025-04-04 17:29:29 +00:00
5363637ee2 Merge branch 'main' into paultag/gpu 2025-04-04 13:10:28 -04:00
30eeeae684 don't merge me 2025-04-04 13:09:34 -04:00
b9e11ac201 Remove the camera projection toggle from the UI (#6077)
* Remove E2E test behavior for projection toggle UI

Even though the test is `fixme`'d this should make it easier to
ressurect. The test is still flaky but it runs now.

* Remove projection toggle from the UI
2025-04-04 16:41:56 +00:00
1aa27bd91c Use all available CPUs to run tests on CI (#6138)
* Use all available CPUs to run tests on CI

* Use less than 100% based on research

* Ensure proper types for worker value
2025-04-04 11:11:26 -04:00
118ec28b04 [fix] Get rid of risky useEffect in restart onboarding flow (#6133)
Get rid of risky useEffect in restart onboarding flow

In certain cases this would cause an infinite loop in the web version of
the app. We should eliminate all uses of this "fire and listen with a
useEffect" antipattern in the code base, it was a mistake I introduced.
This uses the XState `waitFor` function to wait **only once** for the
transition to complete, with some error handling in case it fails.
2025-04-04 14:24:30 +00:00
449b43792b Feature: Traditional menu actions in desktop application part II (#6030)
* chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu

* chore: skeleton typing for communication between nodes and web side

* chore: more skeleton for the different roles within the menu options, need more type safety

* chore: adding more skeleton and templates of what the menus could be

* chore: implemented first pass for helpRole links

* fix: syntax issue stopped the build step

* feature: loading different menus based on your page

* feature: Home page file role implemented

* chore: handling the build workflow for the signin page

* fix: moving edit actionst to the edit menu

* chore: adding preferences to the file role

* chore: redoing help roles based on the question mark widget

* fix: auto fmt

* chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts!

* chore: oddly specific toggle API for disabling MenuItems from JS. No rules!

* fix: do not implement a custom label disable thingy, use id on menu and use the native APIga

* fix: auto fmt

* fix: adding some typechecks and auto fmt fixes

* fix: trying to fix custom type?

* fix: nvm we back, the lsp on my editor borked for a second

* fix: adding one more level to the custom type for the labels

* chore: cleaning up type definitions to read easier

* fix: resolving yarn lint errors

* chore: adding file sign out

* chore: adding more file bar actions

* chore: ready for PR draft

* fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed

* fix: linking the OG source

* fix: set application menu to null to avoid default electron menu

* chore: trying to add more typescript

* chore: BIG workflow changes... better typing, less IPC junk

* fix: remapping the icp functions to the cb option select...

* chore: all og events are rehooked up with new workflow pattern

* feat: adding more options to the native bar!

* fix: todo

* chore: cleaning up some menus and adding more

* fix: desktop vs browser and lint errors

* fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals...

* fix: PR clean up

* fix: more PR cleanup

* A snapshot a day keeps the bugs away! 📷🐛

* fix: added the new help menu to the default sign in and modeling page

* fix: disabled two menu actions within sign in page since they will not do anything.

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: mergining main, auto fixes

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: saving off progress found an IPC on/off bug thanks electron!

* fix: fixed ipc renderer off/remove listener bug

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* chore: skeleton layout for the file menu in the modeling page.

* fix: adding types

* A snapshot a day keeps the bugs away! 📷🐛

* fix: more skeleton

* feat: adding file preferences project settings

* feat: adding share current part link to file menu

* fix: report a bug to refresha and report a bug

* fix: new type for webContents send payload that does not brick TS

* fix: removing import file from url since it is not working in the command palette for manual user input

* fix: removing old comment

* chore: adding user default units

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: trying to create a new file but I don't think this the correct workflow...

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* fix: disabling create a file and folder until we get it properly implemented at the commad bar level

* fix: hooking up more commands

* fix: auto fixes

* chore: adding standard views

* chore: adding some E2E tests.

* chore: added E2E tests for each file menu

* fix: auto fixes

* chore: adding more edit role E2E tests

* chore: e2e test

* chore: adding help role e2e test

* A snapshot a day keeps the bugs away! 📷🐛

* chore: e2e test for all the menu options you can interact with in the frontend

* chore: hooking up more menu actions

* chore: adding pane actions

* fix: mac only menu fix and added start sketch

* chore: big edit for state management and command registration

* fix: auto fixes, tsc

* fix: codespell typo

* chore: implementing E2E tests for the menus since we cleared them.

* chore: file export current part e2e test

* chore: added all file role tests in modeling page

* chore: modeling page edit e2e tests

* chore: implemented view e2e test for modeling page

* chore: add all design e2e playright tests

* fix: auto linter,fmt

* chore: added modeling help role e2e tests

* fix: ugh this function isn't available in electron evalulate

* fix: new default project name

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
f1e95156ea [Bug] fix some UI friction from imports (#6139)
* fix some UI friction from imports

* add test

* console

* Jon's comments
2025-04-04 19:38:53 +11:00
45e5b25cda Use scene fixture to make test more reliable on macOS (#6140) 2025-04-04 08:35:15 +00:00
bdec611cf3 Fix: function composition during playwright setup created a massive page.reload loop (#6137)
fix: prevented the largest function composition known to man
2025-04-04 03:36:51 +00:00
fa612d5f28 Alternative way to make appMachine spawned children type safe (#5890)
Co-authored-by: Frank Noirot <frank@zoo.dev>
2025-04-04 03:25:54 +00:00
d270447777 [BUG] mutate ast to keep comments for pipe split ast-mod (#6128)
* mutate ast to keep comments

* remove commented out code

* fix case where no comments in split
2025-04-04 14:01:23 +11:00
1a59fc4f99 Rename the app to Zoo Design Studio (#5974)
* WIP: Change the name of the app
Fixes #5971

* Force release build

* More renames

* Fix release builds on PR

* Remove alpha on home page, replace with nightly if nightly

* Change appId back to dev.zoo.modeling-app after updater test failure

* Cleanup towards review

* Lint

* Lint plus @jacebrowning's suggestion

* Lint
2025-04-03 22:24:51 -04:00
d38dcb9ba2 Add grouping of module instances in Feature Tree (#6125)
* Rename operations to be more generic grouping

* Add group enum

* Add module instance groups

* Change to export all operation ts-rs types to the same file

* Fix Feature Tree display of modules to use name

* Ignore clippy warning

* Update output after operation changes

* Change module instances in Feature Tree use to import icon

* Fix error message when attempting to delete module instance
2025-04-04 02:10:39 +00:00
c7b348390e Add test for #4391: "Can't select line on top of axis" (#6035)
* disable fixed PR temporarily and add test draft

* make the test empty

* fix test for selecting line on main axis

* PR feedback
2025-04-03 23:08:52 +02:00
bf6c91932c Upgrade to rust toolchain 1.86 (#6134) 2025-04-03 19:59:26 +00:00
716ed3acb3 Change default project name to 'untitled' (#5998)
* Change default project name to 'untitled'

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* Clean up

* More renaming

* Fix test

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-03 11:38:52 -07:00
65e08bea92 Feature: Disable all automatic zoom_to_fit workflows. Do not take control of users camera. (#6076)
chore: removing all force zoom_to_fit workflows in the system except on initial stream load


sending it
2025-04-03 10:58:18 -05:00
74859e99e7 Add STUN-based RTT (#6110)
* add stun rtt

* fix

* update for future types

* update

---------

Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2025-04-03 16:47:22 +02:00
aad583be2e Move axes to std constants; move helix, revolve, and mirror2d to be declared in KCL (#6105)
Move axes to std constants; move helix, revolve, and mirror2d to be declated in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-04-03 09:44:52 +00:00
3e4505e2e3 [refactor] remove 6 floating-promise ignores (#5985)
* Remove trivial floating promise in authMachine

* Add catch statement so LSP promise is considered non-floating

* Remove trivial float in AllSettingsFields

* Add error reporting for ensureWasmInit

* Remove pointless floating promise in Modeling

* Add comment and reportRejection to floating promise in "set selection"

* Read comment, put back await that should be there

* Fix dumb imports rebase botch

* Missed an import

---------

Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2025-04-03 02:53:10 +00:00
1fe1cfb397 Syntax sugar booleans (+ and -) which is intuitive for MEs (#6124)
* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-04-03 02:13:03 +00:00
2f721c84ed Bump vite from 5.4.12 to 5.4.16 in the security group (#6118)
Bumps the security group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.12 to 5.4.16
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.16/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.16/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: security
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 22:46:30 +00:00
9112ff8c0a Bump vite from 5.4.14 to 5.4.16 in /packages/codemirror-lang-kcl in the security group (#6117)
Bump vite in /packages/codemirror-lang-kcl in the security group

Bumps the security group in /packages/codemirror-lang-kcl with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.14 to 5.4.16
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.16/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.16/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
  dependency-group: security
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-02 22:22:17 +00:00
96e12b5aba update transform samples with mesh moving (#6080)
* update transform samples with mesh moving

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* chjanges

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-04-02 15:11:06 -07:00
bec3ba71cd More circular deps fixed (#6121)
* 23

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* 22

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* 21

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix known

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* 20

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* 11

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* 11

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-04-02 15:10:57 -07:00
c6766d2a73 bump kcl and friends (#6122)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-04-02 14:28:32 -07:00
475 changed files with 55779 additions and 77250 deletions

View File

@ -1,5 +1,5 @@
name: Bug Report
description: File a bug report for the Zoo Modeling App
description: File a bug report for the Zoo Design Studio
title: "[BUG]: "
labels: ["bug"]
assignees: []
@ -70,7 +70,7 @@ body:
id: version
attributes:
label: Version
description: "The version of the Zoo Modeling App you're using."
description: "The version of the Zoo Design Studio you're using."
placeholder: "example: v0.15.0. You can find this in the settings."
validations:
required: true

View File

@ -241,7 +241,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: out-arm64-${{ matrix.platform }}
# first two will pick both Zoo Modeling App-$VERSION-arm64-win.exe and Zoo Modeling App-$VERSION-win.exe
# first two will pick both Zoo Design Studio-$VERSION-arm64-win.exe and Zoo Design Studio-$VERSION-win.exe
path: |
out/*-${{ env.VERSION_NO_V }}-win.*
out/*-${{ env.VERSION_NO_V }}-arm64-win.*

View File

@ -370,8 +370,8 @@ jobs:
with:
shell: bash
command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{ env.OS_NAME }}
timeout_minutes: 45
max_attempts: 15
timeout_minutes: 30
max_attempts: 9
env:
FAIL_ON_CONSOLE_ERRORS: true
token: ${{ secrets.KITTYCAD_API_TOKEN_DEV }}

View File

@ -1,27 +1,27 @@
# Setting Up Zoo Modeling App
# Setting Up Zoo Design Studio
Compared to other CAD software, getting Zoo Modeling App up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install.
Compared to other CAD software, getting Zoo Design Studio up and running is quick and straightforward across platforms. It's about 100MB to download and is quick to install.
## Windows
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type.
1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for Windows and for your processor type.
2. Once downloaded, run the installer `Zoo Modeling App-{version}-{arch}-win.exe` which should take a few seconds.
2. Once downloaded, run the installer `Zoo Design Studio-{version}-{arch}-win.exe` which should take a few seconds.
3. The installation happens at `C:\Program Files\Zoo Modeling App`. A shortcut in the start menu is also created so you can run the app easily by clicking on it.
3. The installation happens at `C:\Program Files\Zoo Design Studio`. A shortcut in the start menu is also created so you can run the app easily by clicking on it.
## macOS
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type.
1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for macOS and for your processor type.
2. Once downloaded, open the disk image `Zoo Modeling App-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory.
2. Once downloaded, open the disk image `Zoo Design Studio-{version}-{arch}-mac.dmg` and drag the applications to your `Applications` directory.
3. You can then open your `Applications` directory and double-click on `Zoo Modeling App` to open.
3. You can then open your `Applications` directory and double-click on `Zoo Design Studio` to open.
## Linux
1. Download the [Zoo Modeling App installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type.
1. Download the [Zoo Design Studio installer](https://zoo.dev/modeling-app/download) for Linux and for your processor type.
2. Install the dependencies needed to run the [AppImage format](https://appimage.org/).
- On Ubuntu, install the FUSE library with these commands in a terminal.
@ -30,7 +30,7 @@ Compared to other CAD software, getting Zoo Modeling App up and running is quick
sudo apt install libfuse2
```
- Optionally, follow [these steps](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md#initial-setup) to install `appimaged`. It is a daemon that makes interacting with AppImage files more seamless.
- Once installed, copy the downloaded `Zoo Modeling App-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`.
- Once installed, copy the downloaded `Zoo Design Studio-{version}-{arch}-linux.AppImage` to the directory of your choice, for instance `~/Applications`.
- `appimaged` should automatically find it and make it executable. If not, run:
```bash

View File

@ -87,7 +87,7 @@ lint: install ## Lint the code
###############################################################################
# RUN
TARGET ?= web
TARGET ?= desktop
.PHONY: run
run: run-$(TARGET)
@ -103,9 +103,9 @@ run-desktop: install build-desktop ## Start the desktop app
###############################################################################
# TEST
E2E_WORKERS ?= 1
E2E_GREP ?=
E2E_WORKERS ?=
E2E_FAILURES ?= 1
E2E_GREP ?= ""
.PHONY: test
test: test-unit test-e2e
@ -121,11 +121,19 @@ test-e2e: test-e2e-$(TARGET)
.PHONY: test-e2e-web
test-e2e-web: install build-web ## Run the web e2e tests
@ curl -fs localhost:3000 >/dev/null || ( echo "Error: localhost:3000 not available, 'make run-web' first" && exit 1 )
yarn chrome:test --headed --workers=$(E2E_WORKERS) --max-failures=$(E2E_FAILURES) --grep=$(E2E_GREP)
ifdef E2E_GREP
yarn chrome:test --headed --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
else
yarn chrome:test --headed --workers='100%'
endif
.PHONY: test-e2e-desktop
test-e2e-desktop: install build-desktop ## Run the desktop e2e tests
yarn test:playwright:electron --workers=$(E2E_WORKERS) --max-failures=$(E2E_FAILURES) --grep="$(E2E_GREP)"
ifdef E2E_GREP
yarn test:playwright:electron --grep="$(E2E_GREP)" --max-failures=$(E2E_FAILURES)
else
yarn test:playwright:electron --workers='100%'
endif
###############################################################################
# CLEAN

View File

@ -1,17 +1,17 @@
![Zoo Modeling App](/public/zma-logomark-outlined.png)
![Zoo Design Studio](/public/zma-logomark-outlined.png)
## Zoo Modeling App
## Zoo Design Studio
download at [zoo.dev/modeling-app/download](https://zoo.dev/modeling-app/download)
A CAD application from the future, brought to you by the [Zoo team](https://zoo.dev).
Modeling App is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
Design Studio is our take on what a modern modelling experience can be. It is applying several lessons learned in the decades since most major CAD tools came into existence:
- All artifacts—including parts and assemblies—should be represented as human-readable code. At the end of the day, your CAD project should be "plain text"
- This makes version control—which is a solved problem in software engineering—trivial for CAD
- All GUI (or point-and-click) interactions should be actions performed on this code representation under the hood
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Modeling App
- This unlocks a hybrid approach to modeling. Whether you point-and-click as you always have or you write your own KCL code, you are performing the same action in Design Studio
- Everything graphics _has_ to be built for the GPU
- Most CAD applications have had to retrofit support for GPUs, but our geometry engine is made for GPUs (primarily Nvidia's Vulkan), getting the order of magnitude rendering performance boost with it
- Make the resource-intensive pieces of an application auto-scaling
@ -19,9 +19,9 @@ Modeling App is our take on what a modern modelling experience can be. It is app
We are excited about what a small team of people could build in a short time with our API. We welcome you to try our API, build your own applications, or contribute to ours!
Modeling App is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
Design Studio is a _hybrid_ user interface for CAD modeling. You can point-and-click to design parts (and soon assemblies), but everything you make is really just [`kcl` code](https://github.com/KittyCAD/kcl-experiments) under the hood. All of your CAD models can be checked into source control such as GitHub and responsibly versioned, rolled back, and more.
The 3D view in Modeling App is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
The 3D view in Design Studio is just a video stream from our hosted geometry engine. The app sends new modeling commands to the engine via WebSockets, which returns back video frames of the view within the engine.
## Tools
@ -198,13 +198,13 @@ If the prompt doesn't show up, start the app in command line to grab the electro
```
# Windows (PowerShell)
& 'C:\Program Files\Zoo Modeling App\Zoo Modeling App.exe'
& 'C:\Program Files\Zoo Design Studio\Zoo Design Studio.exe'
# macOS
/Applications/Zoo\ Modeling\ App.app/Contents/MacOS/Zoo\ Modeling\ App
# Linux
./Zoo Modeling App-{version}-{arch}-linux.AppImage
./Zoo Design Studio-{version}-{arch}-linux.AppImage
```
#### 4. Publish the release

View File

@ -54,7 +54,7 @@ example = extrude(exampleSketch, length = 5)
// Add color to a revolved solid.
sketch001 = startSketchOn(XY)
|> circle(center = [15, 0], radius = 5)
|> revolve(angle = 360, axis = 'y')
|> revolve(angle = 360, axis = Y)
|> appearance(color = '#ff0000', metalness = 90, roughness = 90)
```

View File

@ -9,9 +9,12 @@ layout: manual
### `std`
- [`X`](/docs/kcl/consts/std-X)
- [`XY`](/docs/kcl/consts/std-XY)
- [`XZ`](/docs/kcl/consts/std-XZ)
- [`Y`](/docs/kcl/consts/std-Y)
- [`YZ`](/docs/kcl/consts/std-YZ)
- [`Z`](/docs/kcl/consts/std-Z)
### `std::math`

15
docs/kcl/consts/std-X.md Normal file
View File

@ -0,0 +1,15 @@
---
title: "std::X"
excerpt: ""
layout: manual
---
```js
std::X
```

15
docs/kcl/consts/std-Y.md Normal file
View File

@ -0,0 +1,15 @@
---
title: "std::Y"
excerpt: ""
layout: manual
---
```js
std::Y
```

15
docs/kcl/consts/std-Z.md Normal file
View File

@ -0,0 +1,15 @@
---
title: "std::Z"
excerpt: ""
layout: manual
---
```js
std::Z
```

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ Import a CAD file.
For formats lacking unit data (such as STL, OBJ, or PLY files), the default unit of measurement is millimeters. Alternatively you may specify the unit by passing your desired measurement unit in the options parameter. When importing a GLTF file, the bin file will be imported as well. Import paths are relative to the current project directory.
Note: The import command currently only works when using the native Modeling App.
Note: The import command currently only works when using the native Design Studio.
```js
import(

View File

@ -1,6 +1,6 @@
---
title: "KCL Standard Library"
excerpt: "Documentation for the KCL standard library for the Zoo Modeling App."
excerpt: "Documentation for the KCL standard library for the Zoo Design Studio."
layout: manual
---
@ -22,6 +22,9 @@ layout: manual
* [`string`](kcl/types/string)
* [`tag`](kcl/types/tag)
* **std**
* [`Axis2d`](kcl/types/Axis2d)
* [`Axis3d`](kcl/types/Axis3d)
* [`Edge`](kcl/types/Edge)
* [`Face`](kcl/types/Face)
* [`Helix`](kcl/types/Helix)
* [`Plane`](kcl/types/Plane)
@ -29,9 +32,12 @@ layout: manual
* [`Point3d`](kcl/types/Point3d)
* [`Sketch`](kcl/types/Sketch)
* [`Solid`](kcl/types/Solid)
* [`X`](kcl/consts/std-X)
* [`XY`](kcl/consts/std-XY)
* [`XZ`](kcl/consts/std-XZ)
* [`Y`](kcl/consts/std-Y)
* [`YZ`](kcl/consts/std-YZ)
* [`Z`](kcl/consts/std-Z)
* [`abs`](kcl/abs)
* [`acos`](kcl/acos)
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
@ -68,7 +74,7 @@ layout: manual
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
* [`getOppositeEdge`](kcl/getOppositeEdge)
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
* [`helix`](kcl/helix)
* [`helix`](kcl/std-helix)
* [`hole`](kcl/hole)
* [`hollow`](kcl/hollow)
* [`inch`](kcl/inch)
@ -87,7 +93,6 @@ layout: manual
* [`map`](kcl/map)
* [`max`](kcl/max)
* [`min`](kcl/min)
* [`mirror2d`](kcl/mirror2d)
* [`mm`](kcl/mm)
* [`offsetPlane`](kcl/offsetPlane)
* [`patternCircular2d`](kcl/patternCircular2d)
@ -106,7 +111,7 @@ layout: manual
* [`push`](kcl/push)
* [`reduce`](kcl/reduce)
* [`rem`](kcl/rem)
* [`revolve`](kcl/revolve)
* [`revolve`](kcl/std-revolve)
* [`rotate`](kcl/rotate)
* [`round`](kcl/round)
* [`scale`](kcl/scale)
@ -142,6 +147,7 @@ layout: manual
* [`tan`](kcl/std-math-tan)
* **std::sketch**
* [`circle`](kcl/std-sketch-circle)
* [`mirror2d`](kcl/std-sketch-mirror2d)
* **std::turns**
* [`turns::HALF_TURN`](kcl/consts/std-turns-HALF_TURN)
* [`turns::QUARTER_TURN`](kcl/consts/std-turns-QUARTER_TURN)

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
---
title: "KCL Known Issues"
excerpt: "Known issues with the KCL standard library for the Zoo Modeling App."
excerpt: "Known issues with the KCL standard library for the Zoo Design Studio."
layout: manual
---

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
---
title: "KCL Modules"
excerpt: "Documentation of modules for the KCL language for the Zoo Modeling App."
excerpt: "Documentation of modules for the KCL language for the Zoo Design Studio."
layout: manual
---
@ -95,7 +95,7 @@ import "tests/inputs/cube.obj"
When importing a GLTF file, the bin file will be imported as well.
Import paths are relative to the current project directory. Imports currently only work when
using the native Modeling App, not in the browser.
using the native Design Studio, not in the browser.
### Supported values

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
---
title: "KCL Settings"
excerpt: "Documentation of settings for the KCL language and Zoo Modeling App."
excerpt: "Documentation of settings for the KCL language and Zoo Design Studio."
layout: manual
---
# KCL Settings
There are three levels of settings available in the KittyCAD modeling application:
There are three levels of settings available in the KittyCAD Design Studiolication:
1. [User Settings](/docs/kcl/settings/user): Global settings that apply to all projects, stored in `user.toml`
2. [Project Settings](/docs/kcl/settings/project): Settings specific to a project, stored in `project.toml`
@ -14,7 +14,7 @@ There are three levels of settings available in the KittyCAD modeling applicatio
## Configuration Files
The KittyCAD modeling app uses TOML files for configuration:
The KittyCAD Design Studio uses TOML files for configuration:
* **User Settings**: `user.toml` - See [complete documentation](/docs/kcl/settings/user)
* **Project Settings**: `project.toml` - See [complete documentation](/docs/kcl/settings/project)

View File

@ -35,7 +35,7 @@ base_unit = "in"
#### app
The settings for the modeling app.
The settings for the Design Studio.
**Default:** None

View File

@ -37,7 +37,7 @@ text_wrapping = false
#### app
The settings for the modeling app.
The settings for the Design Studio.
**Default:** None

View File

@ -146,7 +146,7 @@ exampleSketch = startSketchOn(XY)
|> line(end = [-2, 0])
|> close()
example = revolve(exampleSketch, axis = 'y', angle = 180)
example = revolve(exampleSketch, axis = Y, angle = 180)
exampleSketch002 = startSketchOn(example, 'end')
|> startProfileAt([4.5, -5], %)
@ -177,7 +177,7 @@ exampleSketch = startSketchOn(XY)
example = revolve(
exampleSketch,
axis = 'y',
axis = Y,
angle = 180,
tagEnd = $end01,
)

116
docs/kcl/std-helix.md Normal file

File diff suppressed because one or more lines are too long

246
docs/kcl/std-revolve.md Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,7 @@ helixPath = helix(
revolutions = 4,
length = 10,
radius = 5,
axis = 'Z',
axis = Z,
)
// Create a spring by sweeping around the helix path.

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
---
title: "KCL Types"
excerpt: "Documentation of types for the KCL standard library for the Zoo Modeling App."
excerpt: "Documentation of types for the KCL standard library for the Zoo Design Studio."
layout: manual
---

12
docs/kcl/types/Axis2d.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "std::Axis2d"
excerpt: "An infinite line in 2d space."
layout: manual
---
An infinite line in 2d space.

12
docs/kcl/types/Axis3d.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "std::Axis3d"
excerpt: "An infinite line in 3d space."
layout: manual
---
An infinite line in 3d space.

12
docs/kcl/types/Edge.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "std::Edge"
excerpt: "The edge of a solid."
layout: manual
---
The edge of a solid.

File diff suppressed because one or more lines are too long

View File

@ -47,11 +47,7 @@ test(
const exportButton = page.getByTestId('export-pane-button')
await expect(exportButton).toBeVisible()
// Wait for the model to finish loading
const modelStateIndicator = page.getByTestId(
'model-state-indicator-execution-done'
)
await expect(modelStateIndicator).toBeVisible({ timeout: 60000 })
await scene.waitForExecutionDone()
const gltfOption = page.getByText('glTF')
const submitButton = page.getByText('Confirm Export')

View File

@ -1274,4 +1274,45 @@ sketch001 = startSketchOn(XZ)
await middleMousePan(800, 200, 900, 300)
})
})
test('Can select lines on the main axis', async ({
page,
homePage,
toolbar,
}) => {
await page.addInitScript(async () => {
localStorage.setItem(
'persistCode',
`sketch001 = startSketchOn(XZ)
profile001 = startProfileAt([100.00, 100.0], sketch001)
|> yLine(length = -100.0)
|> xLine(length = 200.0)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()`
)
})
const width = 1200
const height = 800
const viewportSize = { width, height }
await page.setBodyDimensions(viewportSize)
await homePage.goToModelingScene()
const u = await getUtils(page)
await u.waitForPageLoad()
await toolbar.editSketch(0)
await page.waitForTimeout(1000)
// Click on the bottom segment that lies on the x axis
await page.mouse.click(width * 0.85, height / 2)
await page.waitForTimeout(1000)
// Verify segment is selected (you can check for visual indicators or state)
const element = page.locator('[data-overlay-index="1"]')
await expect(element).toHaveAttribute('data-overlay-visible', 'true')
})
})

View File

@ -22,7 +22,7 @@ sketch001 = startSketchOn(XZ)
|> angledLine([-45, length001], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
revolve001 = revolve(sketch001, axis = "X")
revolve001 = revolve(sketch001, axis = X)
triangle()
|> extrude(length = 30)
plane001 = offsetPlane(XY, offset = 10)
@ -127,7 +127,7 @@ test.describe('Feature Tree pane', () => {
await testViewSource({
operationName: 'Revolve',
operationIndex: 0,
expectedActiveLine: 'revolve001 = revolve(sketch001, axis = "X")',
expectedActiveLine: 'revolve001 = revolve(sketch001, axis = X)',
})
await testViewSource({
operationName: 'Triangle',

View File

@ -177,6 +177,25 @@ export class ElectronZoo {
this.context = this.electron.context()
await this.context.tracing.start({ screenshots: true, snapshots: true })
// We need to patch this because addInitScript will bind too late in our
// electron tests, never running. We need to call reload() after each call
// to guarantee it runs.
const oldContextAddInitScript = this.context.addInitScript
this.context.addInitScript = async function (a, b) {
// @ts-ignore pretty sure way out of tsc's type checking capabilities.
// This code works perfectly fine.
await oldContextAddInitScript.apply(this, [a, b])
await that.page.reload()
}
const oldPageAddInitScript = this.page.addInitScript
this.page.addInitScript = async function (a: any, b: any) {
// @ts-ignore pretty sure way out of tsc's type checking capabilities.
// This code works perfectly fine.
await oldPageAddInitScript.apply(this, [a, b])
await that.page.reload()
}
}
await this.context.tracing.startChunk()
@ -219,26 +238,6 @@ export class ElectronZoo {
}))
}
// We need to patch this because addInitScript will bind too late in our
// electron tests, never running. We need to call reload() after each call
// to guarantee it runs.
const oldContextAddInitScript = this.context.addInitScript
this.context.addInitScript = async function (a, b) {
// @ts-ignore pretty sure way out of tsc's type checking capabilities.
// This code works perfectly fine.
await oldContextAddInitScript.apply(this, [a, b])
await that.page.reload()
}
// No idea why we mix and match page and context's addInitScript but we do
const oldPageAddInitScript = this.page.addInitScript
this.page.addInitScript = async function (a: any, b: any) {
// @ts-ignore pretty sure way out of tsc's type checking capabilities.
// This code works perfectly fine.
await oldPageAddInitScript.apply(this, [a, b])
await that.page.reload()
}
if (!this.firstUrl) {
await this.page.getByText('Your Projects').count()
this.firstUrl = this.page.url()

View File

@ -96,7 +96,7 @@ export class HomePageFixture {
await expect(this.projectSection).not.toHaveText('Loading your Projects...')
}
createAndGoToProject = async (projectTitle = 'project-$nnn') => {
createAndGoToProject = async (projectTitle = 'untitled') => {
await this.projectsLoaded()
await this.projectButtonNew.click()
await this.projectTextName.click()

View File

@ -0,0 +1,120 @@
import { expect, test } from '@e2e/playwright/zoo-test'
import * as fsp from 'fs/promises'
import path from 'path'
test.describe('Import UI tests', () => {
test('shows toast when trying to sketch on imported face', async ({
context,
page,
homePage,
toolbar,
scene,
editor,
}) => {
await context.folderSetupFn(async (dir) => {
const projectDir = path.join(dir, 'import-test')
await fsp.mkdir(projectDir, { recursive: true })
// Create the imported file
await fsp.writeFile(
path.join(projectDir, 'toBeImported.kcl'),
`sketch001 = startSketchOn(XZ)
profile001 = startProfileAt([281.54, 305.81], sketch001)
|> angledLine([0, 123.43], %, $rectangleSegmentA001)
|> angledLine([
segAng(rectangleSegmentA001) - 90,
85.99
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude(profile001, length = 100)`
)
// Create the main file that imports
await fsp.writeFile(
path.join(projectDir, 'main.kcl'),
`import "toBeImported.kcl" as importedCube
importedCube
sketch001 = startSketchOn(XZ)
profile001 = startProfileAt([-134.53, -56.17], sketch001)
|> angledLine([0, 79.05], %, $rectangleSegmentA001)
|> angledLine([
segAng(rectangleSegmentA001) - 90,
76.28
], %)
|> angledLine([
segAng(rectangleSegmentA001),
-segLen(rectangleSegmentA001)
], %, $seg01)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02)
|> close()
extrude001 = extrude(profile001, length = 100)
sketch003 = startSketchOn(extrude001, seg02)
sketch002 = startSketchOn(extrude001, seg01)`
)
})
await homePage.openProject('import-test')
await scene.waitForExecutionDone()
await scene.moveCameraTo(
{
x: -114,
y: -897,
z: 475,
},
{
x: -114,
y: -51,
z: 83,
}
)
const [_, hoverOverNonImport] = scene.makeMouseHelpers(611, 364)
const [importedFaceClick, hoverOverImported] = scene.makeMouseHelpers(
940,
150
)
await test.step('check code highlight works for code define in the file being edited', async () => {
await hoverOverNonImport()
await editor.expectState({
highlightedCode: 'startProfileAt([-134.53,-56.17],sketch001)',
diagnostics: [],
activeLines: ['import"toBeImported.kcl"asimportedCube'],
})
})
await test.step('check code does nothing when geometry is defined in an import', async () => {
await hoverOverImported()
await editor.expectState({
highlightedCode: '',
diagnostics: [],
activeLines: ['import"toBeImported.kcl"asimportedCube'],
})
})
await test.step('check the user is warned when sketching on a imported face', async () => {
// Start sketch mode
await toolbar.startSketchPlaneSelection()
// Click on a face from the imported model
// await new Promise(() => {})
await importedFaceClick()
// Verify toast appears with correct content
await expect(page.getByText('This face is from an import')).toBeVisible()
await expect(
page.locator('.font-mono').getByText('toBeImported.kcl')
).toBeVisible()
await expect(
page.getByText('Please select this from the files pane to edit')
).toBeVisible()
})
})
})

View File

@ -0,0 +1,7 @@
export const throwError = (message: string): never => {
throw new Error(message)
}
export const throwTronAppMissing = () => {
throwError('tronApp is missing')
}

File diff suppressed because it is too large Load Diff

View File

@ -42,10 +42,10 @@ test.describe('Onboarding tests', () => {
await homePage.goToModelingScene()
// Test that the onboarding pane loaded
await expect(page.getByText('Welcome to Modeling App! This')).toBeVisible()
await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
// Test that the onboarding pane loaded
await expect(page.getByText('Welcome to Modeling App! This')).toBeVisible()
await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
// *and* that the code is shown in the editor
await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
@ -86,7 +86,7 @@ test.describe('Onboarding tests', () => {
await test.step(`Ensure we see the onboarding stuff`, async () => {
// Test that the onboarding pane loaded
await expect(
page.getByText('Welcome to Modeling App! This')
page.getByText('Welcome to Design Studio! This')
).toBeVisible()
// *and* that the code is shown in the editor
@ -147,7 +147,7 @@ test.describe('Onboarding tests', () => {
await nextButton.click()
// Ensure we see the introduction and that the code has been reset
await expect(page.getByText('Welcome to Modeling App!')).toBeVisible()
await expect(page.getByText('Welcome to Design Studio!')).toBeVisible()
await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
// There used to be old code here that checked if we stored the reset
@ -188,7 +188,7 @@ test.describe('Onboarding tests', () => {
await homePage.goToModelingScene()
// Test that the onboarding pane loaded
await expect(page.getByText('Welcome to Modeling App! This')).toBeVisible()
await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
const nextButton = page.getByTestId('onboarding-next')
const prevButton = page.getByTestId('onboarding-prev')
@ -494,7 +494,7 @@ test('Restarting onboarding on desktop takes one attempt', async ({
const tutorialProjectIndicator = page
.getByTestId('project-sidebar-toggle')
.filter({ hasText: 'Tutorial Project 00' })
const tutorialModalText = page.getByText('Welcome to Modeling App!')
const tutorialModalText = page.getByText('Welcome to Design Studio!')
const tutorialDismissButton = page.getByRole('button', { name: 'Dismiss' })
const userMenuButton = page.getByTestId('user-sidebar-toggle')
const userMenuSettingsButton = page.getByRole('button', {

View File

@ -1084,8 +1084,8 @@ openSketch = startSketchOn(XY)
}) => {
// One dumb hardcoded screen pixel value
const testPoint = { x: 620, y: 257 }
const expectedOutput = `helix001 = helix( axis = 'X', radius = 5, length = 5, revolutions = 1, angleStart = 360, ccw = false,)`
const expectedLine = `axis='X',`
const expectedOutput = `helix001 = helix( axis = X, radius = 5, length = 5, revolutions = 1, angleStart = 360, ccw = false,)`
const expectedLine = `axis=X,`
await homePage.goToModelingScene()
@ -1217,7 +1217,7 @@ openSketch = startSketchOn(XY)
cmdBar,
}) => {
page.on('console', console.log)
const initialCode = `sketch001 = startSketchOn('XZ')
const initialCode = `sketch001 = startSketchOn(XZ)
profile001 = startProfileAt([0, 0], sketch001)
|> yLine(length = 100)
|> line(endAbsolute = [100, 0])
@ -3474,7 +3474,7 @@ segAng(rectangleSegmentA002),
await cmdBar.progressCmdBar()
await cmdBar.progressCmdBar()
const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = 'X')`
const newCodeToFind = `revolve001 = revolve(sketch002, angle = 360, axis = X)`
expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy()
// Edit flow

View File

@ -828,7 +828,7 @@ test.describe(`Project management commands`, () => {
const commandButton = page.getByRole('button', { name: 'Commands' })
const commandOption = page.getByRole('option', { name: 'rename project' })
const projectNameOption = page.getByRole('option', { name: projectName })
const projectRenamedName = `project-000`
const projectRenamedName = `untitled`
// const projectMenuButton = page.getByTestId('project-sidebar-toggle')
const commandContinueButton = page.getByRole('button', {
name: 'Continue',
@ -941,7 +941,7 @@ test.describe(`Project management commands`, () => {
const commandButton = page.getByRole('button', { name: 'Commands' })
const commandOption = page.getByRole('option', { name: 'rename project' })
const projectNameOption = page.getByRole('option', { name: projectName })
const projectRenamedName = `project-000`
const projectRenamedName = `untitled`
const commandContinueButton = page.getByRole('button', {
name: 'Continue',
})
@ -1139,7 +1139,7 @@ test(`Create a few projects using the default project name`, async ({
await test.step(`Create project ${i}`, async () => {
await homePage.expectState({
projectCards: Array.from({ length: i }, (_, i) => ({
title: `project-${i.toString().padStart(3, '0')}`,
title: i === 0 ? 'untitled' : `untitled-${i}`,
fileCount: 1,
})).toReversed(),
sortBy: 'last-modified-desc',
@ -1323,9 +1323,9 @@ test(
})
await test.step('Check we can still create a project', async () => {
await createProject({ name: 'project-000', page, returnHome: true })
await createProject({ name: 'new-project', page, returnHome: true })
await expect(
page.getByTestId('project-link').filter({ hasText: 'project-000' })
page.getByTestId('project-link').filter({ hasText: 'new-project' })
).toBeVisible()
})
}

View File

@ -684,7 +684,7 @@ sketch001 = startSketchOn(XZ)
|> line(end = [12.73, -0.09])
|> tangentialArcTo([24.95, -5.38], %)
|> close()
|> revolve(axis = "X")`
|> revolve(axis = X)`
)
})
@ -771,7 +771,7 @@ sketch001 = startSketchOn(XZ)
|> tangentialArcTo([24.95, -5.38], %)
|> line(end = [1.97, 2.06])
|> close()
|> revolve(axis = "X")`,
|> revolve(axis = X)`,
{ shouldNormalise: true }
)
})
@ -1223,7 +1223,7 @@ profile001 = startProfileAt([${roundOff(scale * 69.6)}, ${roundOff(
|> xLine(endAbsolute = 0 + .001)
|> yLine(endAbsolute = 0)
|> close()
|> revolve(axis = "Y")
|> revolve(axis = Y)
return lugSketch
}

View File

@ -351,7 +351,7 @@ const extrudeDefaultPlane = async (
},
},
project: {
default_project_name: 'project-$nnn',
default_project_name: 'untitled',
},
text_editor: {
text_wrapping: true,

View File

@ -23,7 +23,7 @@ export const TEST_SETTINGS: DeepPartial<Settings> = {
camera_projection: 'perspective',
},
project: {
default_project_name: 'project-$nnn',
default_project_name: 'untitled',
directory: '',
},
text_editor: {
@ -80,7 +80,8 @@ export const TEST_SETTINGS_CORRUPTED = {
},
} satisfies Partial<SaveSettingsPayload>
export const TEST_CODE_GIZMO = `part001 = startSketchOn(XZ)
export const TEST_CODE_GIZMO = `@settings(defaultLengthUnit = in)
part001 = startSketchOn(XZ)
|> startProfileAt([20, 0], %)
|> line(end = [7.13, 4 + 0])
|> angledLine({ angle: 3 + 0, length: 3.14 + 0 }, %)

View File

@ -8,37 +8,37 @@ test.describe('Testing Gizmo', { tag: ['@skipWin'] }, () => {
const cases = [
{
testDescription: 'top view',
clickPosition: { x: 951, y: 347 },
clickPosition: { x: 951, y: 385 },
expectedCameraPosition: { x: 800, y: -152, z: 4886.02 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},
{
testDescription: 'bottom view',
clickPosition: { x: 951, y: 391 },
clickPosition: { x: 951, y: 429 },
expectedCameraPosition: { x: 800, y: -152, z: -4834.02 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},
{
testDescription: 'right view',
clickPosition: { x: 929, y: 379 },
clickPosition: { x: 929, y: 417 },
expectedCameraPosition: { x: 5660.02, y: -152, z: 26 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},
{
testDescription: 'left view',
clickPosition: { x: 974, y: 359 },
clickPosition: { x: 974, y: 397 },
expectedCameraPosition: { x: -4060.02, y: -152, z: 26 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},
{
testDescription: 'back view',
clickPosition: { x: 967, y: 383 },
clickPosition: { x: 967, y: 421 },
expectedCameraPosition: { x: 800, y: 4708.02, z: 26 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},
{
testDescription: 'front view',
clickPosition: { x: 935, y: 355 },
clickPosition: { x: 935, y: 393 },
expectedCameraPosition: { x: 800, y: -5012.02, z: 26 },
expectedCameraTarget: { x: 800, y: -152, z: 26 },
},

View File

@ -2,7 +2,11 @@ import { getUtils, orRunWhenFullSuiteEnabled } from '@e2e/playwright/test-utils'
import { expect, test } from '@e2e/playwright/zoo-test'
test.describe('Test toggling perspective', () => {
test('via command palette and toggle', async ({ page, homePage }) => {
test('via command palette and toggle', async ({
page,
homePage,
toolbar,
}) => {
test.fixme(orRunWhenFullSuiteEnabled())
const u = await getUtils(page)
@ -14,7 +18,7 @@ test.describe('Test toggling perspective', () => {
y: screenHeight * 0.2,
}
const backgroundColor: [number, number, number] = [29, 29, 29]
const xzPlaneColor: [number, number, number] = [82, 55, 96]
const xzPlaneColor: [number, number, number] = [72, 55, 96]
const locationToHaveColor = async (color: [number, number, number]) => {
return u.getGreatestPixDiff(checkedScreenLocation, color)
}
@ -26,9 +30,29 @@ test.describe('Test toggling perspective', () => {
const commandToast = page.getByText(
`Set camera projection to "orthographic"`
)
const projectionToggle = page.getByRole('switch', {
name: 'Camera projection: ',
})
const checkSettingValue = async () => {
const settingsButton = page.getByRole('link', {
name: 'Settings',
exact: false,
})
let settingValue: string | null = null
await test.step(`Check the setting value`, async () => {
await settingsButton.click()
const userTab = page.getByRole('radio', { name: 'User' })
await userTab.click()
await expect(userTab).toBeChecked()
const setting = page.locator('#cameraProjection').first()
await expect(setting).toBeAttached()
await setting.scrollIntoViewIfNeeded()
settingValue = await setting.getByRole('combobox').inputValue()
await page.getByTestId('settings-close-button').click()
})
return settingValue
}
await test.step('Setup', async () => {
await page.setBodyDimensions({ width: screenWidth, height: screenHeight })
@ -39,8 +63,8 @@ test.describe('Test toggling perspective', () => {
timeout: 5000,
message: 'This spot should have the background color',
})
.toBeLessThan(15)
await expect(projectionToggle).toHaveAttribute('aria-checked', 'true')
.toBeLessThan(30)
expect(await checkSettingValue()).toBe('perspective')
})
// Extremely wild note: flicking between ortho and persp actually changes
@ -59,33 +83,22 @@ test.describe('Test toggling perspective', () => {
timeout: 5000,
message: 'This spot should have the XZ plane color',
})
.toBeLessThan(15)
await expect(projectionToggle).toHaveAttribute('aria-checked', 'false')
.toBeLessThan(30)
expect(await checkSettingValue()).toBe('orthographic')
})
await test.step(`Refresh the page and ensure the stream is loaded in ortho`, async () => {
await page.reload()
await page.waitForTimeout(1000)
await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 15_000 })
await u.closeKclCodePanel()
await expect
.poll(async () => locationToHaveColor(xzPlaneColor), {
timeout: 5000,
message: 'This spot should have the XZ plane color',
})
.toBeLessThan(15)
.toBeLessThan(30)
await expect(commandToast).not.toBeVisible()
await expect(projectionToggle).toHaveAttribute('aria-checked', 'false')
})
await test.step(`Switch to perspective via toggle`, async () => {
await projectionToggle.click()
await expect(projectionToggle).toHaveAttribute('aria-checked', 'true')
await expect
.poll(async () => locationToHaveColor(backgroundColor), {
timeout: 5000,
message: 'This spot should have the background color',
})
.toBeLessThan(15)
expect(await checkSettingValue()).toBe('orthographic')
})
})
})

View File

@ -324,7 +324,7 @@ part009 = startSketchOn(XY)
|> line(end = [0, pipeLength])
|> angledLineToX({ angle = 60, to = pipeLargeDia }, %)
|> close()
rev = revolve(part009, axis = 'y')
rev = revolve(part009, axis = Y)
sketch006 = startSketchOn(XY)
profile001 = circle(
sketch006,
@ -381,7 +381,7 @@ profile003 = startProfileAt([40.16, -120.48], sketch006)
await page.waitForTimeout(200)
await expect(u.codeLocator).not.toContainText(
`rev = revolve(part009, axis: 'y')`
`rev = revolve(part009, axis: Y)`
)
// FIXME (commented section below), this test would select a wall that had a sketch on it, and delete the underlying extrude

View File

@ -57,7 +57,7 @@ test.describe('Testing settings', () => {
expect(storedSettings.settings?.modeling?.mouse_controls).toBe('zoo')
expect(storedSettings.settings?.project?.directory).toBe('')
expect(storedSettings.settings?.project?.default_project_name).toBe(
'project-$nnn'
'untitled'
)
})

View File

@ -4,6 +4,7 @@ directories:
buildResources: assets
files:
- .vite/**
- "!node_modules/win-ca/pem"
mac:
category: public.app-category.developer-tools
artifactName: "${productName}-${version}-${arch}-${os}.${ext}"

View File

@ -22,7 +22,7 @@
data-domain="app.zoo.dev"
src="https://plausible.corp.zoo.dev/js/script.tagged-events.js"
></script>
<title>Zoo Modeling App</title>
<title>Zoo Design Studio</title>
</head>
<body class="body-bg">
<noscript>You need to enable JavaScript to run this app.</noscript>

View File

@ -1 +1,13 @@
$ dpdm --no-warning --no-tree -T --skip-dynamic-imports=circular src/index.tsx• Circular Dependencies 01) src/lang/std/sketch.ts -> src/lang/modifyAst.ts -> src/lang/modifyAst/addEdgeTreatment.ts 02) src/lang/std/sketch.ts -> src/lang/modifyAst.ts 03) src/lang/std/sketch.ts -> src/lang/modifyAst.ts -> src/lang/std/sketchcombos.ts 04) src/clientSideScene/CameraControls.ts -> src/clientSideScene/sceneInfra.ts 05) src/lib/singletons.ts -> src/editor/manager.ts -> src/lib/selections.ts 06) src/lib/singletons.ts -> src/editor/manager.ts 07) src/lib/singletons.ts -> src/lang/KclSingleton.ts 08) src/lib/singletons.ts -> src/lang/codeManager.ts 09) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/components/Toolbar/angleLengthInfo.ts 10) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx -> src/components/LspProvider.tsx -> src/editor/plugins/lsp/copilot/index.ts 11) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx -> src/components/LspProvider.tsx -> src/editor/plugins/lsp/kcl/language.ts -> src/editor/plugins/lsp/kcl/index.ts 12) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx -> src/components/LspProvider.tsx 13) src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx -> src/components/LspProvider.tsx 14) src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx -> src/components/Settings/SettingsFieldInput.tsx 15) src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx 16) src/routes/Settings.tsx -> src/components/Settings/AllSettingsFields.tsx 17) src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/SettingsSearchBar.tsx 18) src/machines/appMachine.ts -> src/machines/settingsMachine.ts -> src/lib/commandBarConfigs/settingsCommandConfig.ts -> src/lib/createMachineCommand.ts -> src/routes/Settings.tsx -> src/components/Settings/SettingsSectionsList.tsx 19) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts 20) src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts 21) src/hooks/useModelingContext.ts -> src/components/ModelingMachineProvider.tsx -> src/components/Toolbar/Intersect.tsx -> src/components/SetHorVertDistanceModal.tsx -> src/lib/useCalculateKclExpression.ts 22) src/components/ToastTextToCad.tsx -> src/lib/textToCad.ts 23) src/hooks/useModelingContext.ts -> src/components/ModelingMachineProvider.tsx -> src/machines/modelingMachine.ts -> src/clientSideScene/ClientSideSceneComp.tsx 24) src/routes/Onboarding/index.tsx -> src/routes/Onboarding/Camera.tsx -> src/routes/Onboarding/utils.tsx
$ dpdm --no-warning --no-tree -T --skip-dynamic-imports=circular src/index.tsx
• Circular Dependencies
01) src/lang/std/sketch.ts -> src/lang/modifyAst.ts -> src/lang/modifyAst/addEdgeTreatment.ts
02) src/lang/std/sketch.ts -> src/lang/modifyAst.ts
03) src/lang/std/sketch.ts -> src/lang/modifyAst.ts -> src/lang/std/sketchcombos.ts
04) src/lib/singletons.ts -> src/editor/manager.ts -> src/lib/selections.ts
05) src/lib/singletons.ts -> src/lang/KclSingleton.ts
06) src/lib/singletons.ts -> src/lang/codeManager.ts
07) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/components/Toolbar/angleLengthInfo.ts
08) src/lib/singletons.ts -> src/clientSideScene/sceneEntities.ts -> src/clientSideScene/segments.ts -> src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts
09) src/machines/commandBarMachine.ts -> src/lib/commandBarConfigs/authCommandConfig.ts -> src/machines/appMachine.ts -> src/machines/settingsMachine.ts
10) src/hooks/useModelingContext.ts -> src/components/ModelingMachineProvider.tsx -> src/components/Toolbar/Intersect.tsx -> src/components/SetHorVertDistanceModal.tsx -> src/lib/useCalculateKclExpression.ts
11) src/routes/Onboarding/index.tsx -> src/routes/Onboarding/Camera.tsx -> src/routes/Onboarding/utils.tsx

View File

@ -2,13 +2,13 @@
"name": "zoo-modeling-app",
"version": "0.0.0",
"private": true,
"productName": "Zoo Modeling App",
"productName": "Zoo Design Studio",
"author": {
"name": "Zoo Corporation",
"email": "info@zoo.dev",
"url": "https://zoo.dev"
},
"description": "Zoo Modeling App",
"description": "Zoo Design Studio",
"main": ".vite/build/main.js",
"license": "MIT",
"dependencies": {
@ -26,7 +26,7 @@
"@fortawesome/react-fontawesome": "^0.2.0",
"@headlessui/react": "^1.7.19",
"@headlessui/tailwindcss": "^0.2.2",
"@kittycad/lib": "2.0.25",
"@kittycad/lib": "2.0.26",
"@lezer/highlight": "^1.2.1",
"@lezer/lr": "^1.4.1",
"@react-hook/resize-observer": "^2.0.1",
@ -103,6 +103,7 @@
"lint-fix": "eslint --fix --ext .ts --ext .tsx src e2e packages/codemirror-lsp-client/src rust/kcl-language-server/client/src",
"lint": "eslint --max-warnings 0 --ext .ts --ext .tsx src e2e packages/codemirror-lsp-client/src rust/kcl-language-server/client/src",
"circular-deps": "dpdm --no-warning --no-tree -T --skip-dynamic-imports=circular src/index.tsx",
"circular-deps:overwrite": "yarn circular-deps | sed '$d' | grep -v '^yarn run' > known-circular.txt",
"circular-deps:diff": "./scripts/diff-circular-deps.sh",
"files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json",
"files:set-notes": "./scripts/set-files-notes.sh",
@ -232,7 +233,7 @@
"ts-node": "^10.0.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.26.1",
"vite": "^5.4.12",
"vite": "^5.4.17",
"vite-plugin-package-version": "^1.1.0",
"vite-plugin-top-level-await": "^1.5.0",
"vite-tsconfig-paths": "^4.3.2",

View File

@ -683,9 +683,9 @@ vite-tsconfig-paths@^4.3.2:
tsconfck "^3.0.3"
vite@^5.0.0:
version "5.4.14"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.14.tgz#ff8255edb02134df180dcfca1916c37a6abe8408"
integrity sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==
version "5.4.17"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.17.tgz#4bf61dd4cdbf64b0d6661f5dba76954cc81d5082"
integrity sha512-5+VqZryDj4wgCs55o9Lp+p8GE78TLVg0lasCH5xFZ4jacZjtqZa6JUw9/p0WeAojaOfncSM6v77InkFPGnvPvg==
dependencies:
esbuild "^0.21.3"
postcss "^8.4.43"

View File

@ -1,10 +1,29 @@
import { defineConfig, devices } from '@playwright/test'
import os from 'os'
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
const platform = os.platform() // 'linux' (Ubuntu), 'darwin' (macOS), 'win32' (Windows)
let workers: number | string
if (process.env.E2E_WORKERS) {
workers = process.env.E2E_WORKERS.includes('%')
? process.env.E2E_WORKERS
: parseInt(process.env.E2E_WORKERS)
} else if (!process.env.CI) {
workers = 1 // Local dev: keep things simple and deterministic by default
} else {
// On CI: adjust based on OS
switch (platform) {
case 'linux':
workers = '100%' // CI Linux runners are generally beefier
break
case 'darwin':
case 'win32':
default:
workers = '75%' // Slightly conservative for GUI-based OSes
break
}
}
/**
* See https://playwright.dev/docs/test-configuration.
@ -19,8 +38,8 @@ export default defineConfig({
forbidOnly: !!process.env.CI,
/* Do not retry */
retries: process.env.CI ? 0 : 0,
/* Different amount of parallelism on CI and local. */
workers: process.env.CI ? 1 : 4,
/* Use all available CPU cores */
workers: workers,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
[process.env.CI ? 'dot' : 'list'],

View File

@ -1,5 +1,29 @@
import { defineConfig, devices } from '@playwright/test'
import { platform } from 'os'
import os from 'os'
const platform = os.platform() // 'linux' (Ubuntu), 'darwin' (macOS), 'win32' (Windows)
let workers: number | string
if (process.env.E2E_WORKERS) {
workers = process.env.E2E_WORKERS.includes('%')
? process.env.E2E_WORKERS
: parseInt(process.env.E2E_WORKERS)
} else if (!process.env.CI) {
workers = 1 // Local dev: keep things simple and deterministic by default
} else {
// On CI: adjust based on OS
switch (platform) {
case 'linux':
workers = '50%' // CI Linux runners are generally beefier
break
case 'darwin':
case 'win32':
default:
workers = '25%' // Lower concurrency for heavier Electron processes
break
}
}
/**
* See https://playwright.dev/docs/test-configuration.
@ -14,8 +38,8 @@ export default defineConfig({
forbidOnly: true,
/* Do not retry */
retries: 0,
/* Different amount of parallelism on CI and local. */
workers: platform() === 'win32' ? 1 : 2,
/* Use all available CPU cores */
workers: workers,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
['dot'],

View File

@ -31,7 +31,7 @@ data = {
{modified_release_body}
'''),
"username": "Modeling App Release Updates",
"username": "Design Studio Release Updates",
"avatar_url": "https://raw.githubusercontent.com/KittyCAD/modeling-app/main/public/discord-avatar.png"
}

View File

@ -4,9 +4,9 @@
First off, thank you so much for your interest in being a part of the closed Alpha program! We are thrilled to have others use our product and see what you build with it (and truthfully, how you break it too).
### Zoo Modeling App (ZMA)
### Zoo Design Studio (ZMA)
What we are introducing to you is our Zoo Modeling App (ZMA). ZMA is a CAD application that expresses a hybrid style of traditional CAD interface along with a code-CAD interface. ZMA is a great way for us to test our own APIs as well as inspire others to develop their own applications.
What we are introducing to you is our Zoo Design Studio (ZMA). ZMA is a CAD application that expresses a hybrid style of traditional CAD interface along with a code-CAD interface. ZMA is a great way for us to test our own APIs as well as inspire others to develop their own applications.
### Why Code?

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = in)
// Define function
// Create a function to make the 80-20 rail
fn rail8020(originStart, railHeight, railLength) {
// Sketch side 1 of profile
sketch001 = startSketchOn(-XZ)

View File

@ -25,8 +25,6 @@ When you submit a PR to add or modify KCL samples, images and STEP files will be
---
#### [80-20-rail](80-20-rail/main.kcl) ([screenshot](screenshots/80-20-rail.png))
[![80-20-rail](screenshots/80-20-rail.png)](80-20-rail/main.kcl)
#### [a-parametric-bearing-pillow-block](a-parametric-bearing-pillow-block/main.kcl) ([screenshot](screenshots/a-parametric-bearing-pillow-block.png))
[![a-parametric-bearing-pillow-block](screenshots/a-parametric-bearing-pillow-block.png)](a-parametric-bearing-pillow-block/main.kcl)
#### [ball-bearing](ball-bearing/main.kcl) ([screenshot](screenshots/ball-bearing.png))
[![ball-bearing](screenshots/ball-bearing.png)](ball-bearing/main.kcl)
#### [bench](bench/main.kcl) ([screenshot](screenshots/bench.png))
@ -83,6 +81,8 @@ When you submit a PR to add or modify KCL samples, images and STEP files will be
[![mounting-plate](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](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](screenshots/parametric-bearing-pillow-block.png)](parametric-bearing-pillow-block/main.kcl)
#### [pipe](pipe/main.kcl) ([screenshot](screenshots/pipe.png))
[![pipe](screenshots/pipe.png)](pipe/main.kcl)
#### [pipe-flange-assembly](pipe-flange-assembly/main.kcl) ([screenshot](screenshots/pipe-flange-assembly.png))

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = in)
// Define constants like ball diameter, inside diamter, overhange length, and thickness
// Define parameters
outsideDiameter = 1.625
sphereDia = 0.25
shaftDia = 0.75
@ -35,7 +35,7 @@ ballsSketch = startSketchOn(XY)
|> close()
// Revolve the ball to make a sphere and pattern around the inside wall
balls = revolve(ballsSketch, axis = "X")
balls = revolve(ballsSketch, axis = X)
|> patternCircular3d(
arcDegrees = 360,
axis = [0, 0, 1],
@ -60,7 +60,7 @@ chainSketch = startSketchOn(XY)
|> close()
// Revolve the chain sketch
chainHead = revolve(chainSketch, axis = "X")
chainHead = revolve(chainSketch, axis = X)
|> patternCircular3d(
arcDegrees = 360,
axis = [0, 0, 1],
@ -80,7 +80,7 @@ linkSketch = startSketchOn(XZ)
)
// Revolve the link sketch
linkRevolve = revolve(linkSketch, axis = 'Y', angle = 360 / nBalls)
linkRevolve = revolve(linkSketch, axis = Y, angle = 360 / nBalls)
|> patternCircular3d(
arcDegrees = 360,
axis = [0, 0, 1],
@ -94,6 +94,4 @@ outsideWallSketch = startSketchOn(offsetPlane(XY, offset = -overallThickness / 2
|> circle(center = [0, 0], radius = outsideDiameter / 2)
|> hole(circle(center = [0, 0], radius = shaftDia / 2 + wallThickness + sphereDia), %)
outsideWall = extrude(outsideWallSketch, length = overallThickness)
// https://www.mcmaster.com/60355K185/
outsideWall = extrude(outsideWallSketch, length = overallThickness)

View File

@ -4,8 +4,8 @@
// Set units
@settings(defaultLengthUnit = in)
// Import Constants
import caliperTolerance, caliperPadLength, caliperThickness, caliperOuterEdgeRadius, caliperInnerEdgeRadius, rotorDiameter, rotorTotalThickness, yAxisOffset from "globals.kcl"
// Import parameters
import caliperTolerance, caliperPadLength, caliperThickness, caliperOuterEdgeRadius, caliperInnerEdgeRadius, rotorDiameter, rotorTotalThickness, yAxisOffset from "parameters.kcl"
// Sketch the brake caliper profile
brakeCaliperSketch = startSketchOn(XY)
@ -80,5 +80,5 @@ brakeCaliperSketch = startSketchOn(XY)
|> close()
// Revolve the brake caliper sketch
revolve(brakeCaliperSketch, axis = "Y", angle = -70)
revolve(brakeCaliperSketch, axis = Y, angle = -70)
|> appearance(color = "#c82d2d", metalness = 90, roughness = 90)

View File

@ -4,8 +4,8 @@
// Set units
@settings(defaultLengthUnit = in)
// Import Constants
import rotorDiameter, rotorInnerDiameter, rotorSinglePlateThickness, rotorInnerDiameterThickness, lugHolePatternDia, lugSpacing, rotorTotalThickness, spacerPatternDiameter, spacerDiameter, spacerLength, spacerCount, wheelDiameter, lugCount, yAxisOffset, drillAndSlotCount from "globals.kcl"
// Import parameters
import rotorDiameter, rotorInnerDiameter, rotorSinglePlateThickness, rotorInnerDiameterThickness, lugHolePatternDia, lugSpacing, rotorTotalThickness, spacerPatternDiameter, spacerDiameter, spacerLength, spacerCount, wheelDiameter, lugCount, yAxisOffset, drillAndSlotCount from "parameters.kcl"
rotorSketch = startSketchOn(XZ)
|> circle(center = [0, 0], radius = rotorDiameter / 2)

View File

@ -4,8 +4,8 @@
// Set units
@settings(defaultLengthUnit = in)
// Import Constants
import tireInnerDiameter, tireOuterDiameter, tireDepth, bendRadius, tireTreadWidth, tireTreadDepth, tireTreadOffset from "globals.kcl"
// Import parameters
import tireInnerDiameter, tireOuterDiameter, tireDepth, bendRadius, tireTreadWidth, tireTreadDepth, tireTreadOffset from "parameters.kcl"
// Create the sketch of the tire
tireSketch = startSketchOn(XY)
@ -41,5 +41,5 @@ tireSketch = startSketchOn(XY)
|> close()
// Revolve the sketch to create the tire
revolve(tireSketch, axis = "Y")
revolve(tireSketch, axis = Y)
|> appearance(color = "#0f0f0f", roughness = 80)

View File

@ -4,8 +4,8 @@
// Set units
@settings(defaultLengthUnit = in)
// Import Constants
import lugCount, lugSpacing, offset, backSpacing, wheelWidth, wheelDiameter, spokeCount, spokeGap, spokeAngle, spokeThickness from "globals.kcl"
// Import parameters
import lugCount, lugSpacing, offset, backSpacing, wheelWidth, wheelDiameter, spokeCount, spokeGap, spokeAngle, spokeThickness from "parameters.kcl"
// Create the wheel center
lugBase = startSketchOn(XZ)
@ -54,7 +54,7 @@ wheelCenterInner = startSketchOn(XY)
|> yLine(endAbsolute = 0)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
|> appearance(color = "#ffffff", metalness = 0, roughness = 0)
wheelCenterOuter = startSketchOn(XY)
@ -68,7 +68,7 @@ wheelCenterOuter = startSketchOn(XY)
|> yLine(endAbsolute = -wheelWidth / 20)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
|> appearance(color = "#ffffff", metalness = 0, roughness = 0)
// Write a function that defines the spoke geometry, patterns and extrudes it
@ -173,5 +173,5 @@ startSketchOn(XY)
|> xLine(length = wheelWidth * 0.03)
|> yLine(length = wheelWidth * 0.05)
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
|> appearance(color = "#ffffff", metalness = 0, roughness = 0)

View File

@ -4,8 +4,8 @@
// Set units
@settings(defaultLengthUnit = in)
// Import Constants
import lugDiameter, lugHeadLength, lugThreadDiameter, lugLength, lugThreadDepth, lugSpacing from "globals.kcl"
// Import parameters
import lugDiameter, lugHeadLength, lugThreadDiameter, lugLength, lugThreadDepth, lugSpacing from "parameters.kcl"
customPlane = {
plane = {
@ -32,7 +32,7 @@ fn lug(plane, length, diameter) {
|> xLine(endAbsolute = lugThreadDiameter)
|> yLine(endAbsolute = 0)
|> close()
|> revolve(axis = "Y")
|> revolve(axis = Y)
|> appearance(color = "#dbcd70", roughness = 90, metalness = 90)
return lugSketch
}

View File

@ -4,16 +4,24 @@
// Set units
@settings(defaultLengthUnit = in)
// Import parts
import "car-wheel.kcl" as carWheel
import "car-rotor.kcl" as carRotor
import "brake-caliper.kcl" as brakeCaliper
import "lug-nut.kcl" as lugNut
import "car-tire.kcl" as carTire
import lugCount from "globals.kcl"
// Import parameters
import * from "parameters.kcl"
// Place the car rotor
carRotor
|> translate(x = 0, y = 0.5, z = 0)
// Place the car wheel
carWheel
// Place the lug nuts
lugNut
|> patternCircular3d(
arcDegrees = 360,
@ -22,6 +30,10 @@ lugNut
instances = lugCount,
rotateDuplicates = false,
)
// Place the brake caliper
brakeCaliper
|> translate(x = 0, y = 0.5, z = 0)
// Place the car tire
carTire

View File

@ -1,9 +1,9 @@
// Car wheel assembly global constants
// Car wheel assembly parameters
// Set units
@settings(defaultLengthUnit = in)
// Car Wheel
// Car wheel
export lugCount = 5
export lugSpacing = 114.3 * mm()
export offset = -35 * mm()
@ -22,7 +22,7 @@ export lugThreadDiameter = lugDiameter / 2 * .85
export lugLength = 30 * mm()
export lugThreadDepth = lugLength - (12.7 * mm())
// Car Rotor
// Car rotor
export rotorDiameter = 12
export rotorInnerDiameter = 6
export rotorSinglePlateThickness = 0.25
@ -36,7 +36,7 @@ export spacerCount = 16
export yAxisOffset = 0.5
export drillAndSlotCount = 5
// Car Tire
// Car tire
export tireInnerDiameter = 19
export tireOuterDiameter = 24
export tireDepth = 11.02
@ -45,7 +45,7 @@ export tireTreadWidth = 0.39
export tireTreadDepth = 0.39
export tireTreadOffset = 3.15
// Brake Caliper
// Brake caliper
export caliperTolerance = 0.050
export caliperPadLength = 1.6
export caliperThickness = 0.39

View File

@ -1,10 +1,10 @@
// Color Cube
// This is a color cube centered about the origin. It is used to help determine orientation in the scene.
// Set unit
// Set units
@settings(defaultLengthUnit = mm)
// Globals referenced in drawRectangle
// Parameters referenced in drawRectangle
size = 100
halfSize = size / 2
extrudeLength = 1.0

View File

@ -1,9 +1,10 @@
// Cycloidal Gear
// A cycloidal gear is a gear with a continuous, curved tooth profile. They are used in watchmaking and high precision robotics actuation
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Create a function for the cycloidal gear
fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle) {
// Create a function to draw the gear profile as a sketch. Rotate each profile about the gear's axis by an helix angle proportional to the total gear height
fn gearSketch(gHeight) {
@ -44,4 +45,5 @@ fn cycloidalGear(gearPitch, gearHeight, holeDiameter, helixAngle) {
return gearLoft
}
// Call the cycloidal gear function
cycloidalGear(.3, 1.5, 0.297, -80)

View File

@ -9,19 +9,19 @@
circR = 25
// Calculated parameters
// thickness of the dodecahedron
// Thickness of the dodecahedron
wallThickness = circR * 0.2
// angle between faces in radians
// Angle between faces in radians
dihedral = acos(-(sqrt(5) / 5))
// inscribed radius
// Inscribed radius
inscR = circR / 15 * sqrt(75 + 30 * sqrt(5))
// pentagon edge length
// Pentagon edge length
edgeL = 4 * circR / (sqrt(3) * (1 + sqrt(5)))
// pentagon radius
// Pentagon radius
pentR = edgeL / 2 / sin(toRadians(36))
// Define a plane for the bottom angled face
@ -69,7 +69,7 @@ bottomBowl = patternCircular3d(
rotateDuplicates = true,
)
// pattern the bottom to create the top face
// Pattern the bottom to create the top face
patternCircular3d(
bottom,
instances = 2,
@ -79,7 +79,7 @@ patternCircular3d(
rotateDuplicates = true,
)
// pattern the bottom angled faces to create the top
// Pattern the bottom angled faces to create the top
patternCircular3d(
bottomBowl,
instances = 2,

View File

@ -1,10 +1,10 @@
// Dual-Basin Utility Sink
// A stainless steel sink unit with dual rectangular basins and six under-counter storage compartments.
// set units
// Set units
@settings(defaultLengthUnit = mm)
// globals
// Define parameters
tableHeight = 850
tableWidth = 3400
tableDepth = 400

View File

@ -4,6 +4,7 @@
// Set units
@settings(defaultLengthUnit = mm)
// Define parameters
length = 175
width = 125
height = 70

View File

@ -1,10 +1,10 @@
// Exhaust Manifold
// A welded exhaust header for an inline 4-cylinder engine
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Define Constants
// Define parameters
primaryTubeDiameter = 1.625
wallThickness = 0.080
plateHeight = 0.125

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = in)
// Define constants
// Define parameters
mountingHoleDia = .625
baseDia = 4.625
pipeDia = 1.25

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = mm)
// define constants in mm
// define parameters
radius = 6.0
width = 144.0
length = 80.0
@ -15,7 +15,7 @@ tabLength = 25
tabWidth = 12
tabThk = 4
// define a rectangular shape func
// Define a rectangular shape func
fn rectShape(pos, w, l) {
rr = startSketchOn('xy')
|> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
@ -26,7 +26,7 @@ fn rectShape(pos, w, l) {
return rr
}
// define the bracket plane
// Define the bracket plane
bracketPlane = {
plane = {
origin = { x = 0, y = length / 2 + thk, z = 0 },
@ -36,7 +36,7 @@ bracketPlane = {
}
}
// build the bracket sketch around the body
// Build the bracket sketch around the body
fn bracketSketch(w, d, t) {
s = startSketchOn(bracketPlane)
|> startProfileAt([-w / 2 - t, d + t], %)
@ -51,7 +51,7 @@ fn bracketSketch(w, d, t) {
return s
}
// build the body of the bracket
// Build the body of the bracket
bs = bracketSketch(width, depth, thk)
bracketBody = bs
|> extrude(length = length + 2 * thk)
@ -65,7 +65,7 @@ bracketBody = bs
],
)
// define the tab plane
// Define the tab plane
tabPlane = {
plane = {
origin = { x = 0, y = 0, z = depth + thk },
@ -75,7 +75,7 @@ tabPlane = {
}
}
// build the tabs of the mounting bracket (right side)
// Build the tabs of the mounting bracket (right side)
tabsR = startSketchOn(tabPlane)
|> startProfileAt([width / 2 + thk, length / 2 + thk], %)
|> line(end = [tabWidth, -tabLength / 3], tag = $edge11)
@ -99,7 +99,7 @@ tabsR = startSketchOn(tabPlane)
)
|> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3))
// build the tabs of the mounting bracket (left side)
// Build the tabs of the mounting bracket (left side)
tabsL = startSketchOn(tabPlane)
|> startProfileAt([-width / 2 - thk, length / 2 + thk], %)
|> line(end = [-tabWidth, -tabLength / 3], tag = $edge21)
@ -123,7 +123,7 @@ tabsL = startSketchOn(tabPlane)
)
|> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3))
// define a plane for retention bumps
// Define a plane for retention bumps
retPlane = {
plane = {
origin = { x = -width / 2 + 20, y = 0, z = 0 },
@ -133,7 +133,7 @@ retPlane = {
}
}
// build the retention bump in the front
// Build the retention bump in the front
retFront = startSketchOn(retPlane)
|> startProfileAt([-length / 2 - thk, 0], %)
|> line(end = [0, thk])
@ -141,7 +141,7 @@ retFront = startSketchOn(retPlane)
|> close()
|> extrude(length = width - 40)
// build the retention bump in the back
// Build the retention bump in the back
retBack = startSketchOn(retPlane)
|> startProfileAt([length / 2 + thk, 0], %)
|> line(end = [0, thk])

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = mm)
// Define constants in millimeters (mm)
// Define parameters
flipperThickness = 3.5
flipperLength = 70.0
handleWidth = 15.0
@ -16,7 +16,7 @@ gripHeight = 20.0
gripFilletRadius = 3.0
gripSlotWidth = 8.0
// function for drawing slots on a sketch given the start and end points as well as a width
// Function for drawing slots on a sketch given the start and end points as well as a width
fn slot(sketch1, start, end, width) {
angle = if start[0] == end[0] {
if end[1] > start[1] {
@ -43,10 +43,10 @@ fn slot(sketch1, start, end, width) {
return slotSketch
}
// create a sketch on the "XY" plane
// Create a sketch on the "XY" plane
sketch000 = startSketchOn(XY)
// create a profile of the flipper
// Create a profile of the flipper
flipperProfile = startProfileAt([-flipperLength, -32.0], sketch000)
|> line(end = [flipperLength, 2.0])
|> yLine(length = 60.0, tag = $backEdge)
@ -58,25 +58,25 @@ flipperProfile = startProfileAt([-flipperLength, -32.0], sketch000)
}, %)
|> close()
// create a profile of the middle
// Create a profile of the middle
slotProfile000 = slot(sketch000, [-25, 0], [-55, 0], flipperSlotWidth)
// create a profile of the top slot
// Create a profile of the top slot
slotProfile001 = slot(sketch000, [-25, 18], [-55, 19], flipperSlotWidth)
// create a profile of the bottom slot
// Create a profile of the bottom slot
slotProfile002 = slot(sketch000, [-25, -18], [-55, -19], flipperSlotWidth)
// create a profile with slots for the spatula
// Create a profile with slots for the spatula
spatulaProfile = flipperProfile
|> hole(slotProfile000, %)
|> hole(slotProfile001, %)
|> hole(slotProfile002, %)
// extrude the profile to create the spatula flipper
// Extrude the profile to create the spatula flipper
flipper = extrude(spatulaProfile, length = flipperThickness)
// fillet the edges of the flipper
// Fillet the edges of the flipper
fillet(
flipper,
radius = flipperFilletRadius,
@ -86,10 +86,10 @@ fillet(
],
)
// create a sketch on the "XZ" plane offset by half the thickness
// Create a sketch on the "XZ" plane offset by half the thickness
sketch001 = startSketchOn(offsetPlane(XZ, offset = -handleWidth / 2))
// create a profile of the spatula handle
// Create a profile of the spatula handle
handleProfile = startProfileAt([0.0, flipperThickness], sketch001)
|> line(end = [31.819805, 31.819805], tag = $handleBottomEdge)
|> line(end = [140.953893, 51.303021])
@ -99,10 +99,10 @@ handleProfile = startProfileAt([0.0, flipperThickness], sketch001)
|> xLine(length = 7.071068)
|> close()
// create an extrusion extrude001
// Create an extrusion extrude001
handle = extrude(handleProfile, length = handleWidth)
// fillet the bend of the spatula handle
// Fillet the bend of the spatula handle
fillet(
handle,
radius = 4,
@ -112,7 +112,7 @@ fillet(
],
)
// define a plane which is at the end of the handle
// Define a plane which is at the end of the handle
handlePlane = {
plane = {
origin = [208.593833, 0.0, 75.921946],
@ -122,10 +122,10 @@ handlePlane = {
}
}
// create a sketch on the handle plane
// Create a sketch on the handle plane
sketch002 = startSketchOn(handlePlane)
// create a profile of the grip
// Create a profile of the grip
gripProfile = startProfileAt([-26.806746, -10.0], sketch002)
|> xLine(length = gripWidth - (2 * gripFilletRadius))
|> arc({
@ -153,14 +153,14 @@ gripProfile = startProfileAt([-26.806746, -10.0], sketch002)
}, %)
|> close()
// extrude the grip profile to create the grip
// Extrude the grip profile to create the grip
grip = extrude(gripProfile, length = -gripLength)
// create a sketch on the grip for the hole
// Create a sketch on the grip for the hole
sketch003 = startSketchOn(grip, gripEdgeTop)
// create a profile for the grip hole
// Create a profile for the grip hole
gripHoleProfile = slot(sketch003, [0, 200], [0, 210], gripSlotWidth)
// cut a hole in the grip
// Cut a hole in the grip
extrude(gripHoleProfile, length = -gripWidth - 20)

View File

@ -4,7 +4,7 @@
// Set units
@settings(defaultLengthUnit = in)
// Define constants
// Define parameters
carafeDiameter = 4.41
carafeHeight = 7.32
handleThickness = 0.65
@ -23,7 +23,7 @@ sketch001 = startSketchOn(XZ)
], %, $rectangleSegmentC001)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(angle = 360, axis = 'Y')
|> revolve(angle = 360, axis = Y)
// Create an angled plane to sketch the supports
plane001 = {
@ -132,7 +132,7 @@ sketch005 = startSketchOn(XZ)
|> xLine(endAbsolute = 0.15)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
// Plunger and stem
sketch006 = startSketchOn(XZ)
@ -145,7 +145,7 @@ sketch006 = startSketchOn(XZ)
|> tangentialArc({ radius = 0.6, offset = -90 }, %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
// Spiral plate
sketch007 = startSketchOn(offsetPlane(XY, offset = 1.12))
@ -201,7 +201,7 @@ sketch011 = startSketchOn(XZ)
}, %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
|> revolve(axis = 'y')
|> revolve(axis = Y)
// Draw and extrude handle
sketch012 = startSketchOn(offsetPlane(XZ, offset = handleThickness / 2))

View File

@ -1,10 +1,10 @@
// 100mm Gear Rack
// A flat bar or rail that is engraved with teeth along its length. These teeth are designed to mesh with the teeth of a gear, known as a pinion. When the pinion, a small cylindrical gear, rotates, its teeth engage with the teeth on the rack, causing the rack to move linearly. Conversely, linear motion applied to the rack will cause the pinion to rotate.
// Set Units
// Set units
@settings(defaultLengthUnit = mm)
// Define constants
// Define parameters
length = 100
pitchHeight = 11.5
width = 5

View File

@ -1,10 +1,10 @@
// Spur Gear
// A rotating machine part having cut teeth or, in the case of a cogwheel, inserted teeth (called cogs), which mesh with another toothed part to transmit torque. Geared devices can change the speed, torque, and direction of a power source. The two elements that define a gear are its circular shape and the teeth that are integrated into its outer edge, which are designed to fit into the teeth of another gear.
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Define constants
// Define parameters
nTeeth = 21
module = 0.5
pitchDiameter = module * nTeeth

View File

@ -4,7 +4,7 @@
// Set units in millimeters (mm)
@settings(defaultLengthUnit = mm)
// Define constants
// Define parameters
binLength = 42.0
cornerRadius = 4.0
firstStep = 0.7
@ -21,7 +21,7 @@ countBinLength = 3
// The total height of the baseplate is a summation of the vertical heights of the baseplate steps
height = firstStep + secondStep + thirdStep
// define a function which builds the profile of the baseplate bin
// Define a function which builds the profile of the baseplate bin
fn face(plane) {
faceSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %)
@ -33,10 +33,10 @@ fn face(plane) {
return faceSketch
}
// extrude a single side of the bin
// Extrude a single side of the bin
singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern
// Create the other sides of the bin by using a circular pattern
sides = patternCircular3d(
singleSide,
arcDegrees = 360,
@ -46,18 +46,16 @@ sides = patternCircular3d(
rotateDuplicates = true,
)
// define an axis axis000
// Define an axis axis000
axis000 = {
custom = {
axis = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
direction = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
// create a single corner of the bin
// Create a single corner of the bin
singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius)), angle = -90, axis = axis000)
// create the corners of the bin
// Create the corners of the bin
corners = patternCircular3d(
singleCorner,
arcDegrees = 360,
@ -67,7 +65,7 @@ corners = patternCircular3d(
rotateDuplicates = true,
)
// create the baseplate by patterning sides
// Create the baseplate by patterning sides
basePlateSides = patternLinear3d(
sides,
axis = [1.0, 0.0, 0.0],
@ -76,7 +74,7 @@ basePlateSides = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the corners of the baseplate by patterning the corners
// Create the corners of the baseplate by patterning the corners
basePlateCorners = patternLinear3d(
corners,
axis = [1.0, 0.0, 0.0],
@ -85,7 +83,7 @@ basePlateCorners = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the center cutout for the magnet profile
// Create the center cutout for the magnet profile
fn magnetCenterCutout(plane) {
magnetSketch = startSketchOn(plane)
|> startProfileAt([
@ -128,7 +126,7 @@ fn magnetCenterCutout(plane) {
return magnetSketch
}
// create the outside profile of the magnets
// Create the outside profile of the magnets
fn magnetBase(plane) {
magnetBaseSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %)
@ -140,7 +138,7 @@ fn magnetBase(plane) {
return magnetBaseSketch
}
// create sketch profile sketch000Profile002
// Create sketch profile sketch000Profile002
magnetsSketch = startSketchOn(XY)
|> circle(center = [cornerRadius * 2, cornerRadius * 2], radius = magOuterDiam / 2)
|> patternCircular2d(
@ -150,14 +148,14 @@ magnetsSketch = startSketchOn(XY)
rotateDuplicates = true,
)
// create a profile with holes for the magnets
// Create a profile with holes for the magnets
magnetProfile = magnetBase(XY)
|> hole(magnetsSketch, %)
// create an extrusion of the magnet cutout with holes
// Create an extrusion of the magnet cutout with holes
magnetHolesExtrude = extrude(magnetProfile, length = -magDepth)
// add a fillet to the extrusion
// Add a fillet to the extrusion
magnetHolesExtrudeFillets = fillet(
magnetHolesExtrude,
radius = cornerRadius,
@ -169,13 +167,13 @@ magnetHolesExtrudeFillets = fillet(
],
)
// create a profile without the holes for the magnets
// Create a profile without the holes for the magnets
magnetProfileNoMagnets = magnetBase(offsetPlane(XY, offset = -magDepth))
// create an extrusion of the magnet cutout without holes
// Create an extrusion of the magnet cutout without holes
magnetCutoutExtrude = extrude(magnetProfileNoMagnets, length = -magDepth)
// add a fillet to the extrusion
// Add a fillet to the extrusion
magnetCutoutExtrudeFillets = fillet(
magnetCutoutExtrude,
radius = cornerRadius,
@ -187,7 +185,7 @@ magnetCutoutExtrudeFillets = fillet(
],
)
// pattern the magnet cutouts with holes
// Pattern the magnet cutouts with holes
patternLinear3d(
magnetHolesExtrudeFillets,
axis = [1.0, 0.0, 0.0],
@ -196,7 +194,7 @@ patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// pattern the magnet cutouts without holes
// Pattern the magnet cutouts without holes
patternLinear3d(
magnetCutoutExtrudeFillets,
axis = [1.0, 0.0, 0.0],

View File

@ -4,7 +4,7 @@
// Set units in millimeters (mm)
@settings(defaultLengthUnit = mm)
// Define constants
// Define parameters
binLength = 42.0
cornerRadius = 4.0
firstStep = 0.7
@ -18,7 +18,7 @@ countBinLength = 3
// The total height of the baseplate is a summation of the vertical heights of the baseplate steps
height = firstStep + secondStep + thirdStep
// define a function which builds the profile of the baseplate bin
// Define a function which builds the profile of the baseplate bin
fn face(plane) {
faceSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %)
@ -30,10 +30,10 @@ fn face(plane) {
return faceSketch
}
// extrude a single side of the bin
// Extrude a single side of the bin
singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern
// Create the other sides of the bin by using a circular pattern
sides = patternCircular3d(
singleSide,
arcDegrees = 360,
@ -43,18 +43,16 @@ sides = patternCircular3d(
rotateDuplicates = true,
)
// define an axis axis000
// Define an axis axis000
axis000 = {
custom = {
axis = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
direction = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
// create a single corner of the bin
// Create a single corner of the bin
singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius)), angle = -90, axis = axis000)
// create the corners of the bin
// Create the corners of the bin
corners = patternCircular3d(
singleCorner,
arcDegrees = 360,
@ -64,7 +62,7 @@ corners = patternCircular3d(
rotateDuplicates = true,
)
// create the baseplate by patterning sides
// Create the baseplate by patterning sides
basePlateSides = patternLinear3d(
sides,
axis = [1.0, 0.0, 0.0],
@ -73,7 +71,7 @@ basePlateSides = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength)
// create the corners of the baseplate by patterning the corners
// Create the corners of the baseplate by patterning the corners
basePlateCorners = patternLinear3d(
corners,
axis = [1.0, 0.0, 0.0],

View File

@ -4,7 +4,7 @@
// Set units in millimeters (mm)
@settings(defaultLengthUnit = mm)
// Define constants
// Define parameters
binLength = 41.5
binHeight = 7.0
binBaseLength = 2.95
@ -33,7 +33,7 @@ countBinHeight = 1
height = firstStep + secondStep + thirdStep
lipHeight = lipStep1 + lipStep2 + lipStep3 + lipStep4 + lipStep5
// define a function which builds the profile of the baseplate bin
// Define a function which builds the profile of the baseplate bin
fn face(plane) {
faceSketch = startSketchOn(plane)
|> startProfileAt([binBaseLength + binTol, 0], %)
@ -46,10 +46,10 @@ fn face(plane) {
return faceSketch
}
// extrude a single side of the bin
// Extrude a single side of the bin
singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern
// Create the other sides of the bin by using a circular pattern
sides = patternCircular3d(
singleSide,
arcDegrees = 360,
@ -63,21 +63,19 @@ sides = patternCircular3d(
rotateDuplicates = true,
)
// define an axis axis000
// Define an axis axis000
axis000 = {
custom = {
axis = [0.0, 1.0],
origin = [
cornerRadius + binTol,
cornerRadius + binTol
]
}
direction = [0.0, 1.0],
origin = [
cornerRadius + binTol,
cornerRadius + binTol
]
}
// create a single corner of the bin
// Create a single corner of the bin
singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius + binTol)), angle = -90, axis = axis000)
// create the corners of the bin
// Create the corners of the bin
corners = patternCircular3d(
singleCorner,
arcDegrees = 360,
@ -130,7 +128,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
)
|> extrude(length = -magDepth)
// create the baseplate by patterning sides
// Create the baseplate by patterning sides
binSides = patternLinear3d(
sides,
axis = [1.0, 0.0, 0.0],
@ -139,7 +137,7 @@ binSides = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the corners of the baseplate by patterning the corners
// Create the corners of the baseplate by patterning the corners
binCorners = patternLinear3d(
corners,
axis = [1.0, 0.0, 0.0],
@ -148,7 +146,7 @@ binCorners = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the fill of the bin by patterning the corners
// Create the fill of the bin by patterning the corners
binFill = patternLinear3d(
singleBinFill,
axis = [1.0, 0.0, 0.0],
@ -157,7 +155,6 @@ binFill = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
//
binTop = startSketchOn(offsetPlane(XY, offset = height))
|> startProfileAt([0, 0], %)
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)
@ -176,7 +173,7 @@ binTop = startSketchOn(offsetPlane(XY, offset = height))
)
|> shell(faces = ["end"], thickness = binThk)
// define a function which builds the profile of the baseplate bin
// Define a function which builds the profile of the baseplate bin
fn lipFace(plane) {
faceSketch = startSketchOn(plane)
|> startProfileAt([0, 0], %)
@ -236,13 +233,13 @@ plane002 = {
}
}
// extrude a single side of the lip of the bin
// Extrude a single side of the lip of the bin
lipSingleLength = extrude(lipFace(plane000), length = binLength * countBinWidth - (2 * cornerRadius) + 2 * binTol * countBinWidth)
// extrude a single side of the lip of the bin
// Extrude a single side of the lip of the bin
lipSingleWidth = extrude(lipFace(plane001), length = binLength * countBinLength - (2 * cornerRadius) + 2 * binTol * countBinLength)
// create the other sides of the lips by using a circular pattern
// Create the other sides of the lips by using a circular pattern
lipLengths = patternCircular3d(
lipSingleLength,
arcDegrees = 360,
@ -256,7 +253,7 @@ lipLengths = patternCircular3d(
rotateDuplicates = true,
)
// create the other sides of the lips by using a circular pattern
// Create the other sides of the lips by using a circular pattern
lipWidths = patternCircular3d(
lipSingleWidth,
arcDegrees = 360,
@ -270,21 +267,19 @@ lipWidths = patternCircular3d(
rotateDuplicates = true,
)
// define an axis axis000
// Define an axis axis000
axis001 = {
custom = {
axis = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
direction = [0.0, 1.0],
origin = [cornerRadius, cornerRadius]
}
// create a single corner of the bin
// Create a single corner of the bin
lipSingleLengthCorner = revolve(lipFace(plane000), angle = -90, axis = axis001)
// create a single corner of the bin
// Create a single corner of the bin
lipSingleWidthCorner = revolve(lipFace(plane002), angle = 90, axis = axis001)
// create the corners of the bin
// Create the corners of the bin
lipCorners000 = patternCircular3d(
lipSingleLengthCorner,
arcDegrees = 360,
@ -298,7 +293,7 @@ lipCorners000 = patternCircular3d(
rotateDuplicates = true,
)
// create the corners of the bin
// Create the corners of the bin
lipCorners001 = patternCircular3d(
lipSingleWidthCorner,
arcDegrees = 360,

View File

@ -4,7 +4,7 @@
// Set units in millimeters (mm)
@settings(defaultLengthUnit = mm)
// Define constants
// Define parameters
binLength = 41.5
binHeight = 7.0
binBaseLength = 2.95
@ -26,7 +26,7 @@ countBinHeight = 2
// The total height of the baseplate is a summation of the vertical heights of the baseplate steps
height = firstStep + secondStep + thirdStep
// define a function which builds the profile of the baseplate bin
// Define a function which builds the profile of the baseplate bin
fn face(plane) {
faceSketch = startSketchOn(plane)
|> startProfileAt([binBaseLength + binTol, 0], %)
@ -39,10 +39,10 @@ fn face(plane) {
return faceSketch
}
// extrude a single side of the bin
// Extrude a single side of the bin
singleSide = extrude(face(offsetPlane(YZ, offset = cornerRadius + binTol)), length = binLength - (cornerRadius * 2))
// create the other sides of the bin by using a circular pattern
// Create the other sides of the bin by using a circular pattern
sides = patternCircular3d(
singleSide,
arcDegrees = 360,
@ -56,21 +56,19 @@ sides = patternCircular3d(
rotateDuplicates = true,
)
// define an axis axis000
// Define an axis axis000
axis000 = {
custom = {
axis = [0.0, 1.0],
origin = [
cornerRadius + binTol,
cornerRadius + binTol
]
}
direction = [0.0, 1.0],
origin = [
cornerRadius + binTol,
cornerRadius + binTol
]
}
// create a single corner of the bin
// Create a single corner of the bin
singleCorner = revolve(face(offsetPlane(YZ, offset = cornerRadius + binTol)), angle = -90, axis = axis000)
// create the corners of the bin
// Create the corners of the bin
corners = patternCircular3d(
singleCorner,
arcDegrees = 360,
@ -123,7 +121,7 @@ magCutout000 = startSketchOn(singleBinFill, "start")
)
|> extrude(length = -magDepth)
// create the baseplate by patterning sides
// Create the baseplate by patterning sides
binSides = patternLinear3d(
sides,
axis = [1.0, 0.0, 0.0],
@ -132,7 +130,7 @@ binSides = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the corners of the baseplate by patterning the corners
// Create the corners of the baseplate by patterning the corners
binCorners = patternLinear3d(
corners,
axis = [1.0, 0.0, 0.0],
@ -141,7 +139,7 @@ binCorners = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the fill of the bin by patterning the corners
// Create the fill of the bin by patterning the corners
binFill = patternLinear3d(
singleBinFill,
axis = [1.0, 0.0, 0.0],
@ -150,7 +148,7 @@ binFill = patternLinear3d(
)
|> patternLinear3d(axis = [0.0, 1.0, 0.0], instances = countBinLength, distance = binLength + binTol * 2)
// create the top of the bin
// Create the top of the bin
binTop = startSketchOn(offsetPlane(XY, offset = height))
|> startProfileAt([0, 0], %)
|> xLine(length = (binLength + 2 * binTol) * countBinWidth, tag = $line010)

View File

@ -1,10 +1,10 @@
// Hex nut
// Hex Nut
// A hex nut is a type of fastener with a threaded hole and a hexagonal outer shape, used in a wide variety of applications to secure parts together. The hexagonal shape allows for a greater torque to be applied with wrenches or tools, making it one of the most common nut types in hardware.
// Set Units
@settings(defaultLengthUnit = in)
// Define constants (5/16" - 24 thread size)
// Define parameters (5/16" - 24 thread size)
wallToWallLength = 0.5
thickness = 0.266
diameter = 0.3125

View File

@ -1,10 +1,10 @@
// I-beam
// A structural metal beam with an I shaped cross section. Often used in construction and architecture
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Define Beam Dimensions
// Define parameters
beamLength = 6 * ft()
beamHeight = 4
flangeWidth = 2.663
@ -13,13 +13,13 @@ webThickness = 0.193
rootRadius = 0.457
// Sketch a quadrant of the beam cross section, then mirror for symmetry across each axis. Extrude to the appropriate length
sketch001 = startSketchOn(-XZ)
iBeam = startSketchOn(-XZ)
|> startProfileAt([0, beamHeight / 2], %)
|> xLine(length = flangeWidth / 2)
|> yLine(length = -flangeThickness)
|> xLine(endAbsolute = webThickness / 2 + rootRadius)
|> tangentialArc({ radius = rootRadius, offset = 90 }, %)
|> yLine(endAbsolute = 0)
|> mirror2d({ axis = 'X' }, %)
|> mirror2d({ axis = 'Y' }, %)
|> mirror2d(axis = X)
|> mirror2d(axis = Y)
|> extrude(length = beamLength)

View File

@ -1,10 +1,10 @@
// Zoo Keyboard
// A custom keyboard with Zoo brand lettering
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Define constants
// Define parameters
baseColor = "#0f0f0f"
highlightColor1 = "#b0b0b0"
highlightColor2 = "#23af93"

View File

@ -1,7 +1,7 @@
// Kitt
// The beloved KittyCAD mascot in a voxelized style.
// pixel box function
// Pixel box function
fn pixelBox(kitExtrude, extrudeTag, positionY, positionZ, width, height, depth) {
pixelBoxBody = startSketchOn(kitExtrude, extrudeTag)
|> startProfileAt([positionY, positionZ], %)

View File

@ -4,8 +4,8 @@
// Set Units
@settings(defaultLengthUnit = in)
// Define constants
lbumps = 4 // number of bumps long
// Define parameters
lbumps = 3 // number of bumps long
wbumps = 2 // number of bumps wide
pitch = 8.0
clearance = 0.1

View File

@ -1,19 +1,19 @@
// Makeup Mirror
// A circular vanity mirror mounted on a swiveling arm with pivot joints, used for personal grooming.
// Settings
// Set units
@settings(defaultLengthUnit = mm)
// hinge
// Hinge parameters
hingeRadius = 8
hingeHeight = hingeRadius * 3
hingeGap = 0.5
// arm
// Arm parameters
armLength = 170
armRadius = 5
// mirror
// Mirror parameters
mirrorRadius = 170 / 2
mirrorThickness = 10
archToMirrorGap = 5
@ -21,7 +21,7 @@ archThickness = 1
archRadius = mirrorRadius + archToMirrorGap
// Geometry
// hinge
// Add a function to create the hinge
fn hingeFn(x, y, z) {
hingeBody = startSketchOn(offsetPlane(XY, offset = z))
|> circle(center = [x, y], radius = hingeRadius)
@ -39,7 +39,7 @@ hingePartB3 = hingeFn(armLength, 0, hingeHeight * 2 + hingeGap * 2)
hingePartC2 = hingeFn(armLength, -armLength, hingeHeight * 2 + hingeGap * 2)
hingePartC3 = hingeFn(armLength, -armLength, hingeHeight * 3 + hingeGap * 3)
// arm
// Add a function to create the arm
fn armFn(plane, offset, altitude) {
armBody = startSketchOn(plane)
|> circle(center = [offset, altitude], radius = armRadius)
@ -50,7 +50,7 @@ fn armFn(plane, offset, altitude) {
armPartA = armFn(YZ, 0, hingeHeight * 1.5 + hingeGap)
armPartB = armFn(XZ, armLength, hingeHeight * 2.5 + hingeGap * 2)
// mirror
// Add a function to create the mirror
fn mirrorFn(plane, offsetX, offsetY, altitude, radius, tiefe, gestellR, gestellD) {
armPlane = startSketchOn( offsetPlane(plane, offset = offsetY - (tiefe / 2)))
armBody = circle(armPlane, center = [offsetX, altitude], radius = radius)

View File

@ -6,13 +6,6 @@
"title": "80/20 Rail",
"description": "An 80/20 extruded aluminum linear rail. T-slot profile adjustable by profile height, rail length, and origin position"
},
{
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "a-parametric-bearing-pillow-block/main.kcl",
"multipleFiles": false,
"title": "A Parametric Bearing Pillow Block",
"description": "A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads."
},
{
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "ball-bearing/main.kcl",
@ -157,7 +150,7 @@
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "hex-nut/main.kcl",
"multipleFiles": false,
"title": "Hex nut",
"title": "Hex Nut",
"description": "A hex nut is a type of fastener with a threaded hole and a hexagonal outer shape, used in a wide variety of applications to secure parts together. The hexagonal shape allows for a greater torque to be applied with wrenches or tools, making it one of the most common nut types in hardware."
},
{
@ -209,12 +202,19 @@
"title": "Robot Arm",
"description": "A 4 axis robotic arm for industrial use. These machines can be used for assembly, packaging, organization of goods, and quality inspection processes"
},
{
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "parametric-bearing-pillow-block/main.kcl",
"multipleFiles": false,
"title": "Parametric Bearing Pillow Block",
"description": "A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads."
},
{
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "pipe/main.kcl",
"multipleFiles": false,
"title": "Pipe",
"description": "A tubular section or hollow cylinder, usually but not necessarily of circular cross-section, used mainly to convey substances that can flow."
"description": "Piping for the pipe flange assembly"
},
{
"file": "main.kcl",
@ -248,7 +248,7 @@
"file": "main.kcl",
"pathFromProjectDirectoryToFirstFile": "router-template-slate/main.kcl",
"multipleFiles": false,
"title": "Router template for a slate",
"title": "Router Template for a Slate",
"description": "A guide for routing a slate for a cross bar."
},
{

View File

@ -1,10 +1,10 @@
// Mounting Plate
// A flat piece of material, often metal or plastic, that serves as a support or base for attaching, securing, or mounting various types of equipment, devices, or components.
// Set Units
// Set units
@settings(defaultLengthUnit = in)
// Define constants
// Define parameters
plateLength = 10
plateWidth = 6
filletRadius = 0.5

View File

@ -4,6 +4,7 @@
// Set Units
@settings(defaultLengthUnit = in)
// Import parts
import "robot-arm-base.kcl" as robotArmBase
import "robot-rotating-base.kcl" as rotatingBase
import "robot-arm-j2.kcl" as j2RobotArm

View File

@ -1,10 +1,10 @@
// A Parametric Bearing Pillow Block
// Parametric Bearing Pillow Block
// A bearing pillow block, also known as a plummer block or pillow block bearing, is a pedestal used to provide support for a rotating shaft with the help of compatible bearings and various accessories. Housing a bearing, the pillow block provides a secure and stable foundation that allows the shaft to rotate smoothly within its machinery setup. These components are essential in a wide range of mechanical systems and machinery, playing a key role in reducing friction and supporting radial and axial loads.
// Set units
@settings(defaultLengthUnit = in)
// Define constants such as length, width, height, counter-bore depth and diameter, bearing diameter, hole location padding, and more
// Define parameters
length = 6
width = 4
height = 1
@ -14,15 +14,15 @@ holeDia = .375
padding = 1.5
bearingDia = 3
// (Needs to be updated). Sketch the block and extrude up to where the counterbore diameter starts.
extrude001 = startSketchOn(XY)
// Sketch the block body
body = startSketchOn(XY)
|> startProfileAt([-width / 2, -length / 2], %)
|> line(endAbsolute = [width / 2, -length / 2])
|> line(endAbsolute = [width / 2, length / 2])
|> line(endAbsolute = [-width / 2, length / 2])
|> close()
|> extrude(length = height)
extrude002 = startSketchOn(extrude001, 'end')
counterBoreHoles = startSketchOn(body, 'end')
|> circle(
center = [
-(width / 2 - (padding / 2)),
@ -34,7 +34,7 @@ extrude002 = startSketchOn(extrude001, 'end')
|> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
|> extrude(%, length = -cbDepth)
extrude003 = startSketchOn(extrude001, 'start')
boltHoles = startSketchOn(body, 'start')
|> circle(
center = [
-(width / 2 - (padding / 2)),
@ -46,6 +46,6 @@ extrude003 = startSketchOn(extrude001, 'start')
|> patternLinear2d(instances = 2, distance = width - padding, axis = [1, 0])
|> extrude(length = -height + cbDepth)
extrude004 = startSketchOn(extrude001, 'end')
centerHole = startSketchOn(body, 'end')
|> circle(center = [0, 0], radius = bearingDia / 2)
|> extrude(length = -height)

Some files were not shown because too many files have changed in this diff Show More