* constrain profile start
* add test
* make sure it works on segment drag too, fix tests
* remove old log
* some tests fixes
* Bump more segment counters
* Two more fixes
* Two more test fixes
* small test fix
* moretest fixes
* another test
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
The ability to orbit while in sketch mode is not well-tested or
well-used, so we should pull it from the app. The easiest way to do that
is leave the setting in the WASM definition, but configure the setting
to be uneditable from the interface.
* Remove gnarly fake union hotkeys
* Enable hotkey for items buried in ActionButtonDropdown
I'm kinda over `useHotkeys` as a hook
* Add hotkeys for other sketch tools
* Fix lint and tsc
* Fix duplicate locator
* The circular dependecies got reordered somehow
* Update src/lib/toolbar.ts
* Add `cursor-not-allowed` to onboarding backdrops that block clicks
Some follow-up feedback after #6714 from @jacebrowning, so that users
know why they can't click around.
* Make anything in the onboarding card `cursor-auto`
* Remove snapshottoken
Fixes#6800
* Add placeholder in .env.development
* Clean up language
* Update CONTRIBUTING.md
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Add dotenv to secrets for local testing
* Lint
* Reorg things
* Quick fix
* Last one for windows
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Remove unused `telemetryLoader`
* Remove onboarding redirect behavior
* Allow subRoute to be passed to navigateToProject
* Replace warning dialog routes with toasts
* Wire up new utilities and toasts to UI components
* Add home sidebar buttons for tutorial flow
* Rename menu item
* Add flex-1 so home-layout fills available space
* Remove onboarding avatar tests, they are becoming irrelevant
* Consolidate onboarding tests to one longer one
and update it to not use pixel color checks, and use fixtures.
* Shorten warning toast button text
* tsc, lint, and circular deps
* Update circular dep file
* Fix mistakes made in circular update tweaking
* One more dumb created circular dep
* Update src/routes/Onboarding/utils.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Fix narrow screen home layout breaking
* fix: kevin, navigation routes fixed
* fix: filename parsing is correct now for onboarding with the last file sep
* Fix e2e test state checks that are diff on Linux
* Create onboarding project entirely through systemIOMachine
* Fix Windows path construction
* Make utility to verify a string is an onboarding value
* Little biome formatting suggestion fix
* Units onboarding step was not using OnboardingButtons
* Add type checking of next and previous status, fix useNextClick
* Update `OnboardingStatus` type on WASM side
* Make onboarding different on browser and web, placeholder component
* Show proof of concept with custom content per route
* Make text type args not insta dismiss when you click anywhere
* Make some utility hooks for the onboarding
* Update requestedProjectName along with requestedProjectName
* Build out a rough draft of desktop onboarding
* Remove unused onboarding route files
* Build out rough draft of browser onboarding content
* @jgomez720 browser flow feedback
* @jgomez420 desktop feedback
* tsc and lints
* Tweaks
* Import is dead, long live Add files
* What's up with my inability to type "highlight"?
* Codespell and String casting
* Update browser sample to be axial fan
* lint and tsc
* codespell again
* Remove unused nightmare function `useDemoCode`
* Add a few unit tests
* Update desktop to use bulk file creation from #6747
* Oops overwrote main.kcl on the modify with text-to-cad step
* Undo the dumb use of `sep` that I introduced
* Fix up project test
which was fragile to the number of steps in the onboarding smh
* Fix up onboarding flow test
* typo
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
* fix: how?
* fix: 0 byte thumbnail png loading bug
* fix: adding navigate to single file back
* fix: cargo fmt
* fix: sorting files to match manifest and unit test
* fix: restoring back to main
* fix: cargo fmt
* fix: ope, I forgot I deleted some code that renamed single files to the samples name to track easier within the file tree
* fix: ope
* Update src/lib/commandBarConfigs/applicationCommandConfig.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
* fix: unique name for project, ope
* fix: filtered samples for web and skeleton create a sample command
* fix: Create A Sample specifically desktop home page instead of overloading the add to file
* fix: hiding source
* fix: gotcha on add to file with existing project default args and assemblies
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change array functions to call user function with keyword args
* Fix KCL to use keyword params
* Remove unneeded positional call code
* Update docs
* Update output
* Fix trackball camera by weaving through EngineStream
Fixes#6472. Just a missing setting moved in #5312, which wasn't caught
because testing that the orbit maneuver is actually performing a
"trackball-like" movement is nonexistent. I don't know how to test that
reliably, but typing this object provides the red squiggles to reveal
the missing property.
* Update src/components/EngineStream.tsx
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Breaking changes:
- Fully removed positional arguments from function calls. Keyword arguments are now the only way to call a function.
Added:
- Warn on usage of the unknown numeric suffix (#6690)
Fixed:
- Fix units bug with involuteCircular (#6711)
- Importing 3D files on Windows (#6697)
* Fix various docs errors around std module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* remove KCL from lang docs titles and move settings docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Include functions declared in Rust in module docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* start of migrate to multi file endpoint
* get some relative path stuff sorted
* blobifying files, and making selections work with imports working
* add write to disk
* warn about big projects
* update known circular
* update snapshot
* remove log
* tweak selection filters
* Update src/components/ModelingMachineProvider.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* fmt
* fix one thing
* typo
* raw dog form data like a fucking peasant
* remove fake data
* fmt
* steal Kevin's stuff
* good progress
* clean up
* fix writing to files when response returns
* comment the terriable code
* push fix of sorts
* better fix
* spot of clean up
* fix: Needed to support the bad request flow, the toast will hang forever, the return control flows don't dismiss a forever toast
* fix: handling more error flows by dismissing the toast
* chore: leaving a comment for a confusing workflow
* fix: trying to clean up some async logic
* fix: trying to fix a few things at once...
* fix: fixing toast success
* fix: how did this desync?
* fix: removing useless logic, we write to disk ahead of time, the continue is to say ya no problem
* fix: typo
* Change back to `spawnChild`, forego `actors` by reference
* fix: updating PR comments
* fix: found a bug with paths from rust! it is actually OS paths!
* fix: updated type still is failing tsc
* fix: the type of the machine was wrong, we always set it to at least ''
* fix: idk man
* Fix happy path test (button labels)
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* put xy back into default plane feature tree
* color code
* Update src/components/ModelingSidebar/ModelingPanes/FeatureTreePane.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* submit zoom_to_fit when kcl file is created on web
* add test for zoom to fit on shared model on web - only works with a hack so far
* resolve circular deps
* fix Zoom to fit to shared model on web, test still not passing without timeout
* Clean up zoom_to_fit for web sharing, stabilize test
* fmt
* small import refactor
* fmt
* Make Zoom to fit test web-only
* fix: trying to figure out this pathing issue
* fix: found the bug
* fix: adding linter rule
* fix: rule for join('/') as well
* fix: removing useless string template
* fix: removing useless string template
* fix: ???? What ????
* fix: remove unused import
* fix: circular dep was added when I cleaned up the path logic, fixed the circular dep by passing args from the parent function
* Fake modules for Rust std lib functions
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Include the missing @ in Rust std lib fns
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move revolve and mirror2d to better modules
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Use docs from KCL mods for type summaries
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Use type docs to describe types from KCL std lib
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support modules in docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* shuffle around directories
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make "experimental" a valid status for toolbar and commands
* Wire up status through createMachineCommand
* Add beaker icon
* Show UI elements if status is experimental
* Make ML operations experimental, powered by a flag
* Update command descriptions
* Add tooltip to home page Text-to-CAD button
* Splelnig erorrs
* 🧹lints
* Oopsie daisy Add KCL file isn't experimental
* Add warning message element to text area arg input
* Update message to common named constant
Fix resetting onboarding in web after #6564
Oversight on my part while refactoring the onboarding system in #6564.
The new centralized `acceptOnboarding` workflow constructs a relative
path, so we have to get out of the settings before invoking it.
* Remove unused `telemetryLoader`
* Remove onboarding redirect behavior
* Allow subRoute to be passed to navigateToProject
* Replace warning dialog routes with toasts
* Wire up new utilities and toasts to UI components
* Add home sidebar buttons for tutorial flow
* Rename menu item
* Add flex-1 so home-layout fills available space
* Remove onboarding avatar tests, they are becoming irrelevant
* Consolidate onboarding tests to one longer one
and update it to not use pixel color checks, and use fixtures.
* Shorten warning toast button text
* tsc, lint, and circular deps
* Update circular dep file
* Fix mistakes made in circular update tweaking
* One more dumb created circular dep
* Update src/routes/Onboarding/utils.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Fix narrow screen home layout breaking
* fix: kevin, navigation routes fixed
* fix: filename parsing is correct now for onboarding with the last file sep
* Fix e2e test state checks that are diff on Linux
* Create onboarding project entirely through systemIOMachine
* Fix Windows path construction
* Make utility to verify a string is an onboarding value
* Little biome formatting suggestion fix
* Units onboarding step was not using OnboardingButtons
* Add type checking of next and previous status, fix useNextClick
* Thanks Graphite Diamond, I should use that new util
* Remove TODO comment
* Fix botched merge because IS_PLAYWRIGHT moved or something
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
* Add NodePath to artifact graph
Since this is cached, this should make PathToNode computation correct
even when code is formatted, whitespace changes, and source ranges
are different.
* Remove dead code
* Add unit tests
* Add tests for PathToNode conversion
* Remove unused parameter
* Add missing PathToNode cases
* Fix to handle unlabeled arg
* Cherry pick unlabeled arg fix
* Change PathToNode comment to match TS implementation
* feature: initialize system to view_isometric, playwright(e2e) does zoom_to_fit
* fix: PR fixes
* fix: removing testing code
* fix: I definitely bricked my .spacemacs config and it is using the wrong eslint when I save files :(
* fix: typo
* fix: typoos
* fix: fuking hack
* chore: move exported var from e2e to src then reimport
* fix: got em
* fix: remove console log
* fix: how did this get in that file?? moved it
* fix: location for scene empty check zzz:
* fix: removed debugging code
* fix: forgot the hack for the load view without geometry workflow
* fix: copy
Preparing for the removal of positional functions from the language. The first big step is to change all our KCL code examples, test code, public samples etc to all use keyword functions.
Apologies for how large this PR is. Most of it is:
- Changing example KCL that defined its own functions, so the functions now use keyword arguments rather than positional arguments. E.g. change `cube([20, 20])` to be `cube(center = [20, 20])`.
- Some parts of the code assumed positional code and didn't handle keyword calls, e.g. the linter would only check for positional calls to startSketchOn. Now they should work with either positional or keyword.
- Update all the artifacts
This does _not_ remove support for positional calls. That will be in a follow-up PR.
* Remove unused `telemetryLoader`
* Remove onboarding redirect behavior
* Allow subRoute to be passed to navigateToProject
* Replace warning dialog routes with toasts
* Wire up new utilities and toasts to UI components
* Add home sidebar buttons for tutorial flow
* Rename menu item
* Add flex-1 so home-layout fills available space
* Remove onboarding avatar tests, they are becoming irrelevant
* Consolidate onboarding tests to one longer one
and update it to not use pixel color checks, and use fixtures.
* Shorten warning toast button text
* tsc, lint, and circular deps
* Update circular dep file
* Fix mistakes made in circular update tweaking
* One more dumb created circular dep
* Update src/routes/Onboarding/utils.tsx
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Fix narrow screen home layout breaking
* fix: kevin, navigation routes fixed
* fix: filename parsing is correct now for onboarding with the last file sep
* Fix e2e test state checks that are diff on Linux
* Create onboarding project entirely through systemIOMachine
* Fix Windows path construction
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
* Fix operations to reflect concurrent module import behavior
* Add new generated output
* Fix root module import tracking
* Rename test so that it's easier to filter
* Update output ops
* Fix clippy
* Update output after rebase
* Update multi-axis-robot flowchart output
* Disable e2e tests until future PR
* WIP: Update Insert and Transform codemods to match new import behavior
Fixes#6570
* Fix operations to reflect concurrent module import behavior
* Add new generated output
* Fix root module import tracking
* Rename test so that it's easier to filter
* Update output ops
* Fix clippy
* Update output after rebase
* Disable e2e tests until future PR
* Update one of the tests
* Somewhat working very ugly translate
* Working translate and rotate
* Fix deletion
* Clean up things and disable tests deleting the *first* import due to unclear issue
* Fix Clone
* Clean up ahead of review
* Support cases with translate and rotate in two different pipes (but not for deletion)
* Fix generated output; probably from recent merge
* Find all pipes and look for last in most cases, adding fallbacks to set translate/rotate on the right ones
* More fixups
* Delete unused snap file
* Update src/lang/queryAst.ts
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Change lint ignore to be more specific
* Add test that checks we can still translate, rotate, and delete weird import code
* Clean up
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Show a more reasonable name in function docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Fix buggy docs for union types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make types in the docs signatures into links
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* fix length constrainting
* conflicet
* fix circle center constraints
* fix up circle remove constraints more and add test
* fix three point arc overlays and add test for it
* fixes
* console log
* fix tangential arc stuff
* fmt
* fix unit test
* fix console error when selectiong arc
* Remove deprecated syntax
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* fix one test
* fix sketch on revolved face test
* fix test: empty-scene default-planes act as expected
* fix up more tests
* another fix
* remove another const
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Partition nextest runs
* move name back to 'cargo test'
* Fix duplicate name
There were two jobs both named `build-test-artifacts`. Changed the latter
to `run-test-artifacts`
* cd into rust/ before running nextest
* Get token when running the tests
* Try getting archive into correct dir via different method
* Bump shards to 6
* Replace llvm-cov with nextest
* Adjust job name
* Remove unnecessary comments
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* chore: saving off skeleton
* fix: saving skeleton
* chore: skeleton for loading projects from project directory path
* chore: cleaning up useless state transition to be an on event direct to action state
* fix: new structure for web vs desktop vs react machine provider code
* chore: saving off skeleton
* fix: skeleton logic for react? going to move it from a string to obj.string
* fix: trying to prevent error element unmount on global react components. This is bricking JS state
* fix: we are so back
* chore: implemented navigating to specfic KCL file
* chore: implementing renaming project
* chore: deleting project
* fix: auto fixes
* fix: old debug/testing file oops
* chore: generic create new file
* chore: skeleton for web create file provide
* chore: basic machine vitest... need to figure out how to get window.electron implemented in vitest?
* chore: save off progress before deleting other project implementation, a few missing features still
* chore: trying a different init skeleton? most likely will migrate
* chore: first attempt of purging projects context provider
* chore: enabling toast for some machine state
* chore: enabling more toast success and error
* chore: writing read write state to the system io based on the project path
* fix: tsc fixes
* fix: use file system watcher, navigate to project after creation via the requestProjectName
* chore: open project command, hooks vs snapshot context helpers
* chore: implemented open and create project for e2e testing. They are hard coded in poor spot for now.
* fix: codespell fixes
* chore: implementing more project commands
* chore: PR improvements for root.tsx
* chore: leaving comment about new Router.tsx layout
* fix: removing debugging code
* fix: rewriting component for readability
* fix: improving web initialization
* chore: implementing import file from url which is not actually that?
* fix: clearing search params on import file from url
* fix: fixed two e2e tests, forgot needsReview when making new command
* fix: fixing some import from url business logic to pass e2e tests
* chore: script for diffing circular deps +/-
* fix: formatting
* fix: massive fix for circular depsga!
* fix: trying to fix some errors and auto fmt
* fix: updating deps
* fix: removing debugging code
* fix: big clean up
* fix: more deletion
* fix: tsc cleanup
* fix: TSC TSC TSC TSC!
* fix: typo fix
* fix: clear query params on web only, desktop not required
* fix: removing unused code
* fmt
* Bring back `trap` removed in merge
* Use explicit types instead of `any`s on arg configs
* Add project commands directly to command palette
* fix: deleting debugging code, from PR review
* fix: this got added back(?)
* fix: using referred type
* fix: more PR clean up
* fix: big block comment for xstate architecture decision
* fix: more pr comment fixes
* fix: saving off logic, need a big cleanup because I hacked it together to get a POC
* fix: extra business?
* fix: merge conflict just added them back why dude
* fix: more PR comments
* fix: big ciruclar deps fix, commandBarActor in appActor
* chore: writing e2e test, still need to fix 3 bugs
* chore: adding more scenarios
* fix: formatting
* fix: fixing tsc errors
* chore: deleting the old text to cad and using the new application level one, almost there
* fix: prompt to edit works
* fix: large push to get 1 text to cad command... the usage is a little buggy with delete and navigate within /file
* fix: settings for highlight edges now works
* chore: adding another e2e test
* fix: cleaning up e2e tests and writing more of them
* fix: tsc type
* chore: more e2e improvements, unique project name in text to cad
* chore: e2e tests should be good to go
* fix: gotcha comment
* fix: enabled web t2c, codespell fixes
* fix: fixing merge conflcits??
* feat: implemented load external for kcl samples
* feat: load external model from disk
* fix: trying to delete old stuff
* fix: all command trigger locations now have defaults for current project
* fix: gotcha comment for the future
* chore: hiding import file from url command, two separate commands for 3d and kcl file adding
* chore: commands are now add file to project, 3rd iteration
* fix: t2c in file menu fixed
* chore: updating file menu for new global actions
* fix: auto fixes
* fix: the command bar arg flow for web add kcl file seems backwards?
* chore: updated home layout, added create from kcl sample button
* chore: remapping some menu actions
* fix: fixing open dialog copy
* fix: an e2e test
* fix: fixed e2e tests
* fix: fixed e2e tests
* fix: auto fixes
* fix: pr clean up
* fix: removing console log
* fix: PR updates
* fix: the reviewed stage boolean required the expected state to change. Also I progressed the command bar too soon
* fix: no idea how this passed locally yesterday? I removed the {dir} unused but I need the function's logic but not the return value...
* fix: should be good to go?
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
These little helper functions (legAng, segLen etc) were already using keyword arguments, but when the frontend created AST nodes, it was creating them as CallExpression not CallExpressionKw. We have backwards-compatibility so it's fine, but we should not be relying on that anymore.
This PR should not have any user-observable change.
* wip hack to delete line segments
* unrelated: clean up console
* better check if current selection is segment before deletion
* lint
* add test for delete segment with key
* Declare chamfer in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Ignore more in the simulation tests
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Declare fillet in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move shell and hollow to KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* WIP: Assemblies: Point-and-click Clone
Fixes#6209
* Make assemblies commands available for release
Fixes#6497
* Break insert out of the group, new icon, add Clone disabled
* Add rotate thanks to @franknoirot
* Update relevant snapshots
* Fix pathToNode
* Add clone to stdlibmap
* Cleaned more things
* Add custom icon
* Add variable name for clone
* Add e2e test for import and translated import
* Remove stale comment
* Add test for selection based extrude clone
* First batch of suggestions from @lee-at-zoo-corp, tysm!
* Clean up test names
* Second batch of @lee-at-zoo-corp's suggestion for modelingMachine error handling
* chore: saving off skeleton
* fix: saving skeleton
* chore: skeleton for loading projects from project directory path
* chore: cleaning up useless state transition to be an on event direct to action state
* fix: new structure for web vs desktop vs react machine provider code
* chore: saving off skeleton
* fix: skeleton logic for react? going to move it from a string to obj.string
* fix: trying to prevent error element unmount on global react components. This is bricking JS state
* fix: we are so back
* chore: implemented navigating to specfic KCL file
* chore: implementing renaming project
* chore: deleting project
* fix: auto fixes
* fix: old debug/testing file oops
* chore: generic create new file
* chore: skeleton for web create file provide
* chore: basic machine vitest... need to figure out how to get window.electron implemented in vitest?
* chore: save off progress before deleting other project implementation, a few missing features still
* chore: trying a different init skeleton? most likely will migrate
* chore: first attempt of purging projects context provider
* chore: enabling toast for some machine state
* chore: enabling more toast success and error
* chore: writing read write state to the system io based on the project path
* fix: tsc fixes
* fix: use file system watcher, navigate to project after creation via the requestProjectName
* chore: open project command, hooks vs snapshot context helpers
* chore: implemented open and create project for e2e testing. They are hard coded in poor spot for now.
* fix: codespell fixes
* chore: implementing more project commands
* chore: PR improvements for root.tsx
* chore: leaving comment about new Router.tsx layout
* fix: removing debugging code
* fix: rewriting component for readability
* fix: improving web initialization
* chore: implementing import file from url which is not actually that?
* fix: clearing search params on import file from url
* fix: fixed two e2e tests, forgot needsReview when making new command
* fix: fixing some import from url business logic to pass e2e tests
* chore: script for diffing circular deps +/-
* fix: formatting
* fix: massive fix for circular depsga!
* fix: trying to fix some errors and auto fmt
* fix: updating deps
* fix: removing debugging code
* fix: big clean up
* fix: more deletion
* fix: tsc cleanup
* fix: TSC TSC TSC TSC!
* fix: typo fix
* fix: clear query params on web only, desktop not required
* fix: removing unused code
* fmt
* Bring back `trap` removed in merge
* Use explicit types instead of `any`s on arg configs
* Add project commands directly to command palette
* fix: deleting debugging code, from PR review
* fix: this got added back(?)
* fix: using referred type
* fix: more PR clean up
* fix: big block comment for xstate architecture decision
* fix: more pr comment fixes
* fix: saving off logic, need a big cleanup because I hacked it together to get a POC
* fix: extra business?
* fix: merge conflict just added them back why dude
* fix: more PR comments
* fix: big ciruclar deps fix, commandBarActor in appActor
* chore: writing e2e test, still need to fix 3 bugs
* chore: adding more scenarios
* fix: formatting
* fix: fixing tsc errors
* chore: deleting the old text to cad and using the new application level one, almost there
* fix: prompt to edit works
* fix: large push to get 1 text to cad command... the usage is a little buggy with delete and navigate within /file
* fix: settings for highlight edges now works
* chore: adding another e2e test
* fix: cleaning up e2e tests and writing more of them
* fix: tsc type
* chore: more e2e improvements, unique project name in text to cad
* chore: e2e tests should be good to go
* fix: gotcha comment
* fix: enabled web t2c, codespell fixes
* fix: fixing merge conflcits??
* fix: t2c is back
* Rework home layout to have a sidebar
fmt I think
* Add two links to the bottom of the sidebar
Mostly to visually anchor it
* Tweak some style things
* update test util whose locator needs to change
* tsc and fmt
* Stupid heading change broke the dang E2E tests
* Make that heading locator a part of the home page fixture
* pierremtb/new-snaps-for-frank (#6516)
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
---------
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Common edge faces into artifact graph
* clean up
* kingdom of tags
* add tests
* hook up tags with edge treatments
* update unit tests
* update e2e
* clean up
* more fix up after main merge
* fmt
* revolve fix
* fix new circular dependency
* fix revolve
* remove numbers from circ deps, makes diffs bad
* sim test updates
* try and get tests working
* update
* Fix tsc error
---------
Co-authored-by: max-mrgrsk <156543465+max-mrgrsk@users.noreply.github.com>
Co-authored-by: max <margorskyi@gmail.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* chore: saving off skeleton
* fix: saving skeleton
* chore: skeleton for loading projects from project directory path
* chore: cleaning up useless state transition to be an on event direct to action state
* fix: new structure for web vs desktop vs react machine provider code
* chore: saving off skeleton
* fix: skeleton logic for react? going to move it from a string to obj.string
* fix: trying to prevent error element unmount on global react components. This is bricking JS state
* fix: we are so back
* chore: implemented navigating to specfic KCL file
* chore: implementing renaming project
* chore: deleting project
* fix: auto fixes
* fix: old debug/testing file oops
* chore: generic create new file
* chore: skeleton for web create file provide
* chore: basic machine vitest... need to figure out how to get window.electron implemented in vitest?
* chore: save off progress before deleting other project implementation, a few missing features still
* chore: trying a different init skeleton? most likely will migrate
* chore: first attempt of purging projects context provider
* chore: enabling toast for some machine state
* chore: enabling more toast success and error
* chore: writing read write state to the system io based on the project path
* fix: tsc fixes
* fix: use file system watcher, navigate to project after creation via the requestProjectName
* chore: open project command, hooks vs snapshot context helpers
* chore: implemented open and create project for e2e testing. They are hard coded in poor spot for now.
* fix: codespell fixes
* chore: implementing more project commands
* chore: PR improvements for root.tsx
* chore: leaving comment about new Router.tsx layout
* fix: removing debugging code
* fix: rewriting component for readability
* fix: improving web initialization
* chore: implementing import file from url which is not actually that?
* fix: clearing search params on import file from url
* fix: fixed two e2e tests, forgot needsReview when making new command
* fix: fixing some import from url business logic to pass e2e tests
* chore: script for diffing circular deps +/-
* fix: formatting
* fix: massive fix for circular depsga!
* fix: trying to fix some errors and auto fmt
* fix: updating deps
* fix: removing debugging code
* fix: big clean up
* fix: more deletion
* fix: tsc cleanup
* fix: TSC TSC TSC TSC!
* fix: typo fix
* fix: clear query params on web only, desktop not required
* fix: removing unused code
* fmt
* Bring back `trap` removed in merge
* Use explicit types instead of `any`s on arg configs
* Add project commands directly to command palette
* fix: deleting debugging code, from PR review
* fix: this got added back(?)
* fix: using referred type
* fix: more PR clean up
* fix: big block comment for xstate architecture decision
* fix: more pr comment fixes
* fix: saving off logic, need a big cleanup because I hacked it together to get a POC
* fix: extra business?
* fix: merge conflict just added them back why dude
* fix: more PR comments
* fix: big ciruclar deps fix, commandBarActor in appActor
* chore: writing e2e test, still need to fix 3 bugs
* chore: adding more scenarios
* fix: formatting
* fix: fixing tsc errors
* chore: deleting the old text to cad and using the new application level one, almost there
* fix: prompt to edit works
* fix: large push to get 1 text to cad command... the usage is a little buggy with delete and navigate within /file
* fix: settings for highlight edges now works
* chore: adding another e2e test
* fix: cleaning up e2e tests and writing more of them
* fix: tsc type
* chore: more e2e improvements, unique project name in text to cad
* chore: e2e tests should be good to go
* fix: gotcha comment
* fix: enabled web t2c, codespell fixes
* fix: fixing merge conflcits??
* fix: t2c is back
* Remove spaces in command bar test
* fmt
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
Co-authored-by: lee-at-zoo-corp <lee@zoo.dev>
* Change so that var definitions can be a module's return value
* Change car wheel assembly to use the new return mechanism
* Add sim test
* Update output
* Update module docs
* Add safety check to only work with modules
* Fix to use updated keyword args
* Make assemblies commands available for release
Fixes#6497
* Break insert out of the group, new icon, add Clone disabled
* Add rotate thanks to @franknoirot
* Update relevant snapshots
* Trigger CI
* add first version of DefaultPlanes to FeatureTreePane
* fix lint issues
* don't show default planes UI in sketch mode
* lint
* toggling default planes: implementation in xstate
* revert malformed modelingMachine.ts
* lint
* save and restore default plane visibility when returning to modeling mode
* fmt
* tsc
* introduce new cleanup state with actor when exiting sketch mode
* temp remove restore default plane visibility - causes error on starting up a project
* set selection filter after executeAst - this is a wip hacky fix
* remove unused early return: this also caused plane selection to only work with double click
* lint
* no need to set selection filter to curves only, we want faces to be selectable in modeling mode, even though this means default planes are also selectable
* tightening types for visibility map
* lint
* cleanups
* fix border issue when visibility toggle is not active and props.visible === true
* ui updates on FeatureTreePane/default planes
* no pointer cursor for unselectable default planes
* show default planes initially even for non-empty projects
* dont show default planes initially when project is not empty
* fix test: Only show axis planes when there are no errors
* fixes for sketch tests
* better initialize for planes
* lint
* fix uneccessary 'reset camera position' in sketch entry
* revert hiding/showing content depending on artifact graph for tests
* only show default planes when there are no errors
* disable Restore default plane visibility, was causing temporary flashing of default planes when exiting sketch mode
* Always show default plane visibility toggles, regardless of being on/off
* revert modelingMachine to original idle states to avoid 'zoom_to_fit' test regression - probably racing condition
* fmt
* Quick prototype: open in new window in file tree
* WIP: refresh on imported file change
* Fix up reexecution
* Clean up
* Add test 'Assembly gets reexecuted when imported models are updated externally'
* Clean up
* bump three point arc up
* Update tests to select tangential arc from dropdown
* Fix another test that used tangential arc
* Fix up snapshot tests' use of Tangential Arc
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* chore: saving off skeleton
* fix: saving skeleton
* chore: skeleton for loading projects from project directory path
* chore: cleaning up useless state transition to be an on event direct to action state
* fix: new structure for web vs desktop vs react machine provider code
* chore: saving off skeleton
* fix: skeleton logic for react? going to move it from a string to obj.string
* fix: trying to prevent error element unmount on global react components. This is bricking JS state
* fix: we are so back
* chore: implemented navigating to specfic KCL file
* chore: implementing renaming project
* chore: deleting project
* fix: auto fixes
* fix: old debug/testing file oops
* chore: generic create new file
* chore: skeleton for web create file provide
* chore: basic machine vitest... need to figure out how to get window.electron implemented in vitest?
* chore: save off progress before deleting other project implementation, a few missing features still
* chore: trying a different init skeleton? most likely will migrate
* chore: first attempt of purging projects context provider
* chore: enabling toast for some machine state
* chore: enabling more toast success and error
* chore: writing read write state to the system io based on the project path
* fix: tsc fixes
* fix: use file system watcher, navigate to project after creation via the requestProjectName
* chore: open project command, hooks vs snapshot context helpers
* chore: implemented open and create project for e2e testing. They are hard coded in poor spot for now.
* fix: codespell fixes
* chore: implementing more project commands
* chore: PR improvements for root.tsx
* chore: leaving comment about new Router.tsx layout
* fix: removing debugging code
* fix: rewriting component for readability
* fix: improving web initialization
* chore: implementing import file from url which is not actually that?
* fix: clearing search params on import file from url
* fix: fixed two e2e tests, forgot needsReview when making new command
* fix: fixing some import from url business logic to pass e2e tests
* chore: script for diffing circular deps +/-
* fix: formatting
* fix: massive fix for circular depsga!
* fix: trying to fix some errors and auto fmt
* fix: updating deps
* fix: removing debugging code
* fix: big clean up
* fix: more deletion
* fix: tsc cleanup
* fix: TSC TSC TSC TSC!
* fix: typo fix
* fix: clear query params on web only, desktop not required
* fix: removing unused code
* fmt
* Bring back `trap` removed in merge
* Use explicit types instead of `any`s on arg configs
* Add project commands directly to command palette
* fix: deleting debugging code, from PR review
* fix: this got added back(?)
* fix: using referred type
* fix: more PR clean up
* fix: big block comment for xstate architecture decision
* fix: more pr comment fixes
* fix: merge conflict just added them back why dude
* fix: more PR comments
* fix: big ciruclar deps fix, commandBarActor in appActor
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Declare std::offsetPlane in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Use two axes to define planes in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* shorten tron app setup fail
* fmt
* more tweaks to tronapp setup
* bump initial timeout back to 120s
* Update e2e/playwright/zoo-test.ts
---------
Co-authored-by: Zookeeper Lee <lee@zoo.dev>
* dodec
* fmt
* comment
* Update kcl-samples simulation test output
* Update kcl-samples simulation test output
* Fix so that just commands regenerate ast output
* overwrite
* Update just command to include manifest
* Update generated output
* merge main post
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Remove bug button from LowerRightControls
There is a "report a bug" button in the help menus, both native and
lower-right corner. This is overkill, and users are not using coredump
well.
* Remove coredump from refresh UI button
* Add a "Refresh app" command to palette
* Update snapshots
* Rework "Refresh and report bug" menu item to "Report a bug"
* Add refresh button to sidebar
* Convert upper-right refresh button to Share
* Tweak styles of command button
* Make anonymous user icon same size as known user image
* Remove ModelStateIndicator
* Use hotkeyDisplay for the sidebar too
* Update snapshots
* Remove tooltip from command bar open button
* tsc, lint, and fmt
* Back button on SignIn page leads to Home page
Fixes#6413
* Add regression test for the bug, and for new cancel button
* Full sign in e2e test
* Good bot
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* Turn on uom checks
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Convert all lengths to mm for engine calls
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Change polygon to keyword args
* Update docs
* Update generated output
* Update docs to mention the default for inscribed
* Appease clippy
* Remove tag parameter
* Update docs since removing tag
* Remove inscribed from autocomplete snippet since the default is true
Update onboarding interactive numbers test to use editor fixture
Trying to bring it down from the leaderboard of failed tests.
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update test to check for deletion of only operation
* Allow updateEditorWithAstAndWriteToFile to clear AST
* Update src/lang/codeManager.ts
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Weave `isDeleting` through to `deleteSelectionPromise`
* fmt
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Add error to console exception
* Ignore in codespell
* Increase retry on snapshots
* Fixme's all around
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Add fixmes to bad snapshots tests
* max attempts to 5 on snapshots
* Skip revolve on windows
* Another one
* Add fixme to edit with ML snapshot test
* fmt
* Use absolute import, fix lint
* Disable another test
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Remove all use of bold mono font
A few mono font points are left, mostly for numbers which look better in
monospace.
* make React happy with `clipRule`
* WIP: Add point-and-click Import for geometry
Will eventually fix#6120
Right now the whole loop is there but the codemod doesn't work yet
* Better pathToNOde, log on non-working cm dispatch call
* Add workaround to updateModelingState not working
* Back to updateModelingState with a skip flag
* Better todo
* Change working from Import to Insert, cleanups
* Sister command in kclCommands to populate file options
* Improve path selector
* Unsure: move importAstMod to kclCommands onSubmit 😶
* Add e2e test
* Clean up for review
* Add native file menu entry and test
* No await yo lint said so
* WIP: UX improvements around foreign file imports
Fixes#6152
* WIP: Set translate and rotate via point-and-click on imports. Boilerplate code
Will eventually close#6020
* Full working loop of rotate and translate pipe mutation, including edits, only on module imports. VERY VERBOSE
* Add first e2e test for set transform. Bunch of caveats listed as TODOs
* @lrev-Dev's suggestion to remove a comment
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Update to scene.settled(cmdBar)
* Add partNNN default name for alias
* Lint
* Lint
* Fix unit tests
* Add sad path insert test
Thanks @Irev-Dev for the suggestion
* Add step insert test
* Lint
* Add test for second foreign import thru file tree click
* WIP: Add point-and-click Load to copy files from outside the project into the project
Towards #6210
* Move Insert button to modeling toolbar, update menus and toolbars
* Add default value for local name alias
* Aligning tests
* Fix tests
* Add padding for filenames starting with a digit
* Lint
* Lint
* Update snapshots
* Merge branch 'main' into pierremtb/issue6210-Add-point-and-click-Load-to-copy-files-from-outside-the-project-into-the-project
* Add disabled transform subbutton
* Allow start of Transform flow from toolbar with selection
* Merge kcl-samples and local disk load into one 'Load external model' command
* Fix em tests
* Fix test
* Add test for file pick import, better input
* Fix non .kcl loading
* Lint
* Update snapshots
* Fix issue leading to test failure
* Fix clone test
* Add note
* Fix nested clone issue
* Clean up for review
* Add valueSummary for path
* Fix test after path change
* Clean up for review
* Support much wider range for transform
* Set display names
* Bug fixed itself moment...
* Add test for extrude tranform
* Oops missed a thing
* Clean up selection arg
* More tests incl for variable stuff
* Fix imports
* Add supportsTransform: true on all solids returning operations
* Fix edit flow on variables, add test
* Split transform command into translate and rotate
* Clean up and comment
* Clean up operations.ts
* Add comment
* Improve assemblies test
* Support more things
* Typo
* Fix test after unit change on import
* Last clean up for review
* Fix remaining test
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Use the engineStreamState that's available right there silly
* fix lint
* Just look at playing/paused
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* Fix so that just commands regenerate ast output
* Update just command to include manifest
* Fix overwrite-sim-test kcl_samples to generate manifest
This is the command used in CI.
* wip
* sketch a bit more; going to pull this out of tests next
* wip
* lock start things
* this was a bad idea
* Revert "this was a bad idea"
This reverts commit a2092e7ed6.
* prepare prelude before spawning
* error
* poop
* yike
* :(
* ok
* Reapply "this was a bad idea"
This reverts commit fafdf41093.
* chip away more
* man this is bad
* fix rebase add feature flag
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* get rid of execution kind
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* logs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* no extra executes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* race w batch
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* cluppy
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* no printlns
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* no printlns
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix source ranges
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* batch shit
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>
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix some bugs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix error
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* cut 1
* preserve mem
* re-ad deep_clone
the helper we were calling was pushing a new call, which was hanging
out. we can skip the middleman since we already have something properly
prepared, just without a stdlib in some cases.
* skip non-kcl
* clean up source range bug
* error message changed
the uuids also changed because the error is hit before execute even
starts.
* typo
* rensnapshot a few
* order things
* MAYBE REVERT LATER:
attempt at an ordering
* snapsnap
* Revert "snapsnap"
This reverts commit 7350b32c7d.
* Revert "MAYBE REVERT LATER:"
This reverts commit ab49f3e85f.
* ugh
* poop
* poop2
* lint
* tranche 1
* more
* more snaps
* snap
* more
* update
* MAYBE REVERT THIS
* cache multi-file
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* addd tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* set to false
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add test outputs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* kcl-py-bindings uses carwheel
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update snapshots
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Paul R. Tagliamonte <paul@zoo.dev>
Co-authored-by: Paul Tagliamonte <paultag@gmail.com>
Previously, KCL would silently ignore any duplicated keyword args, setting the parameter to one arbitrarily-chosen argument. Now this is instead a parse error.
I've tested that
1. The error message makes sense
2. The error is on a reasonable part of the source code
3. The error doesn't prevent other kinds of parse errors being picked up later
Thanks for noticing this one Frank!
The engine fixed the start angle for helices, but our e2e test has a
pixel check so it broke. I made the test change the `startAngle` by
`-90` rather than try to hunt around for a new working pixel value.
* Switch to a 6-core profile for mac
* Bump workers percentage to optimize for CPU count (#6329)
* Bump macOS workers percentage to optimize for CPU count
* Handle floor math
---------
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* maybe use biome
* import organising
* Removed unused new fmt commands; fix to not use linter
* Don't use fmt:generated - fmt is fast, but also use Makefile for this sort of thing
---------
Co-authored-by: lee-at-zoo-corp <lee@zoo.dev>
* use artifact id for sketch mode entry plane
* fix up re-eval as best as possible
* remove some async dodgyness
* fmt
* fix old sycronous re-execute shit
* add a test
* fix existing test
* add toast for error state
* spelling
* test stuff
* fmt
* fix toast
* test fix
* some other fix ups
* fix test
* KCL: Convert angledLineThatIntersects to use kwargs
* Update KCL tests and samples
* WIP
* Fix tsc and lint errors
* Fix missing cases
* Fix modifyAst unit tests
* Fix sketch unit tests
* Fix std unit tests
* Fix to not have extra docs
* Fix more unit tests
* Fix bench test
* Fix e2e tests to use new kw args
* tiny lint
* Fix adding constraint from UI to work
* Fix to use labeledArg constraints and use the correct order of args
* Fix selections e2e test
* Fix e2e test expectation
App was working as expected, but the e2e test was
expecting the old code, not the new code.
* Fix order of constraints in unit test
* Update docs
* Fix KCL formatting
* Update output
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* first draft of making segment snap to previous arc's last tangent
* ability to force/disable line snap, threshold in screen space
* mouseEvent refactor tsc errors fixed
* cleanups, extract getTanPreviousPoint function
* add snap line support when previous segment is ARC
* small cleanups
* remove unused planeNodePath param from onDragSegment
* renaming
* Enable snapping when placing the segment point in onClick
* refactor getSnappedDragPoint to include axis intersection
* handle snapping to both axis and tangent direction
* snap refinements
* small cleanups
* lint
* 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! 📷🐛
* generate tag for previous arc when snapping current straight segment
* using previous arc's tag in snapped angledLine
* angledLine uses object instead of array now
* use more general snap object instead
* snap tangent line visualized when snapping occurs
* remove unused scale param from createLine
* prettier
* fix bug where segment body is not drawn
* fix generated kcl error introduced in merge from main - modifiedAst needs to be passed to addNewSketchLn
* add support for snapping to negative tangent direction
* fix findTangentDirection for THREE_POINT_ARC_SEGMENT
* fix tsc error by introducing overrideExpr
* fix missing ccw for 3 point arc, fix tan_previous_point calculation for 3 point arcs
* resolve clippy until confirmation for circle radius
* fix runtime error when drawing a 3 point arc
* add unit tests to closestPointoOnRay
* unrelated react warning fixed
* add playwright test for tangent snapping
* better fix for tan_previous_point
* fix lint
* add simulation test for tangent_to_3_point_arc
* Fix simulation test output
* Add missing simulation test output files
* fix tangent snapping bug: use current group instead of last group in activeSegments
* make testcombos.test happy
* cleanup merge
* fix merge mistake, tsc error
* update tangent_to_3_point_arc simulation test
* fix angledLine related breaking tests
* minimum distance added before snapping to tangent
* circle is always ccw regardless of the order of points for tangential info calculation
* fix snapping when different unit is used other than mm
* update test: Straight line snapping to previous tangent
* update rust snapshot test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* WIP: Add point-and-click Import for geometry
Will eventually fix#6120
Right now the whole loop is there but the codemod doesn't work yet
* Better pathToNOde, log on non-working cm dispatch call
* Add workaround to updateModelingState not working
* Back to updateModelingState with a skip flag
* Better todo
* Change working from Import to Insert, cleanups
* Sister command in kclCommands to populate file options
* Improve path selector
* Unsure: move importAstMod to kclCommands onSubmit 😶
* Add e2e test
* Clean up for review
* Add native file menu entry and test
* No await yo lint said so
* WIP: UX improvements around foreign file imports
Fixes#6152
* @lrev-Dev's suggestion to remove a comment
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Update to scene.settled(cmdBar)
* Add partNNN default name for alias
* Lint
* Lint
* Fix unit tests
* Add sad path insert test
Thanks @Irev-Dev for the suggestion
* Add step insert test
* Lint
* Add test for second foreign import thru file tree click
* WIP: Add point-and-click Load to copy files from outside the project into the project
Towards #6210
* Move Insert button to modeling toolbar, update menus and toolbars
* Add default value for local name alias
* Aligning tests
* Fix tests
* Add padding for filenames starting with a digit
* Lint
* Lint
* Update snapshots
* Merge branch 'main' into pierremtb/issue6210-Add-point-and-click-Load-to-copy-files-from-outside-the-project-into-the-project
* Add disabled transform subbutton
* Merge kcl-samples and local disk load into one 'Load external model' command
* Fix em tests
* Fix test
* Add test for file pick import, better input
* Fix non .kcl loading
* Lint
* Update snapshots
* Fix issue leading to test failure
* Fix clone test
* Add note
* Fix nested clone issue
* Clean up for review
* Add valueSummary for path
* Fix test after path change
* Clean up for review
* Update src/lib/kclCommands.ts
Thanks @franknoirot!
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Improve path input arg
* Fix tests
* Merge branch 'main' into pierremtb/issue6210-Add-point-and-click-Load-to-copy-files-from-outside-the-project-into-the-project
* Fix path header not showing and improve tests
* Clean up
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Add an engine error type for an "outage"
* Add a loading spinner back to the stream just for engine connection
* Refactor Loading spinner to account for early errors
* Add styling and state logic for unrecoverable errors in Loading
* Let engine error messages contain markdown
* Clarify 'too many connections' error message
* Add a "VeryLongLoadTime" error that suggests checking firewall
* Give the engine connection spinner a test ID and use it
* Use a dropdown for stream idle setting
* Add support for undefined values in dropdowns
* Move cache bust to the beginning of engine open for reconnections
* yarn tsc
* Don't setup model feature highlighters until the connection is ready
* Wait 2s to give engine time to serve video, then listen for modeling commands
* Undo teardown
* yarn fmt
* Fix circular module dependency; fmt & lint & tsc
* Fix editor-test waiting for 2 instead of 1
* Increment another 2 numbers ...
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* More units of measure work
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Update CSG output since engine change
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
The connection can't be bad if there is not yet `:galaxy-brain:`.
But seriously this behavior regressed share links because we would bail
from the command palette because the connection wasn't healthy.
* initPromise in main.ts
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* move initPromise so dep tree doesnt shit the bed
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix: moving toast application state:
* fix: forgot the await on the expect calls, ts didn't yell at me?
* fix: cleaning up the camera move e2e code
* fix: lint,tsc,fmt
* Unblock on macOS for now
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
* pierremtb/issue6256-another-test
* yarn to npm install
* Revert "yarn to npm install"
This reverts commit 4a3daf950f.
* yarn to npm install
* Force IS_RELEASE=true
* Clean up for review
* Send test results to an API
* Include platform
* Include target
* Return earlier
* Include actual commit SHA
* Include PR number
* Rename variables for clarity
* add tests for calculate_circle_center - the first one succeeds with the current impl
* fix calculate_circle_center
* comment cleanup
* clippy
* comment format
* update circle_three_point sim test snapshot for slight floating point changes introduced by calculate_circle_center refactor
* use TAU instead of 2 * PI
* clippy
* Add CSG operations to the artifact graph
* Add tool IDs for subtract
* Fix names to match modeling-cmds now that it's done
* Update output since adding CSG ops
* Update formatting
* Add extra solid ids to the graph
* Fix to not add duplicates to the graph
* fix: increasing timeout to reduce failures..?
* fix: removing debugging code
* Remove unnecessary pixel color check
* Only close the command palette on disconnection events
This code closes the palette on *any* network event, including it
getting established. This made tests like "Create a few projects using
the default project name" unreliable.
Also adds a block comment about how we should do something more
sophisticated than bail out in the future.
* Show a toast to explain why the user just lost their command flow
* Remove unnecessary click in test. `fill` focuses already
* Oop don't spam this disconnection toast if the palette isn't open
Honoring exhausting hook dependency checks
* Skip circle snapshot test, it's being weird
* Disable the export button if engine connection is unavailable
* Refactor useDemoCode to hopefully be more reliable
* allow weak connections to receive demo code
* revert Refactor useDemoCode to hopefully be more reliable
Commit:
2625c14783 [2625c1478]
---------
Co-authored-by: Kevin Nadro <kevin@zoo.dev>
Co-authored-by: Jace Browning <jacebrowning@gmail.com>
Co-authored-by: Andrew Varga <grizzly33@gmail.com>
* Improve ActionButtonDropdown selection
* center rectangle icon fixed
* ignore Esc key when displaying hotkeys
* add ability to escape 3 point circle tool
* remove focus from ActionButton, ActionButtonDropdown
* remove focus outline from buttons
* remember lastly selected multi action item
* Add tests for toolbar buttons
* fix sketch-tests by turning toolbar dropdown arrays into an object with an id - this got broken because dropdown now remember the last selected option so we cant rely on cant reference the first option in tests
* update other tests with open menu click
* WIP: Add point-and-click Import for geometry
Will eventually fix#6120
Right now the whole loop is there but the codemod doesn't work yet
* Better pathToNOde, log on non-working cm dispatch call
* Add workaround to updateModelingState not working
* Back to updateModelingState with a skip flag
* Better todo
* Change working from Import to Insert, cleanups
* Sister command in kclCommands to populate file options
* Improve path selector
* Unsure: move importAstMod to kclCommands onSubmit 😶
* Add e2e test
* Clean up for review
* Add native file menu entry and test
* No await yo lint said so
* WIP: UX improvements around foreign file imports
Fixes#6152
* @lrev-Dev's suggestion to remove a comment
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Update to scene.settled(cmdBar)
* Add partNNN default name for alias
* Lint
* Lint
* Fix unit tests
* Add sad path insert test
Thanks @Irev-Dev for the suggestion
* Add step insert test
* Lint
* Add test for second foreign import thru file tree click
* Add default value for local name alias
* Aligning tests
* Fix tests
* Add padding for filenames starting with a digit
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Fix unclickable state, don't show warning if query present
* Leave a note about need for a web test
* Fix browser share links by waiting for network connection
* Don't worry about engineConnection on home route
* WIP: Add point-and-click Import for geometry
Will eventually fix#6120
Right now the whole loop is there but the codemod doesn't work yet
* Better pathToNOde, log on non-working cm dispatch call
* Add workaround to updateModelingState not working
* Back to updateModelingState with a skip flag
* Better todo
* Change working from Import to Insert, cleanups
* Sister command in kclCommands to populate file options
* Improve path selector
* Unsure: move importAstMod to kclCommands onSubmit 😶
* Add e2e test
* Clean up for review
* Add native file menu entry and test
* No await yo lint said so
* @lrev-Dev's suggestion to remove a comment
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Update to scene.settled(cmdBar)
* Lint
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Add back stream idle mode
* Shut up codespell
* Correct serialization; only expose at user level
* cargo fmt
* tsc lint fmt
* Move engineStreamMachine as a global actor; tons of more work
* Fix up everything after bumping kittycad/lib
* Remove camera sync
* Use pause/play iconology
* Add back better ping indicator
* wip
* Fix streamIdleMode checkbox being wonky
* yarn fmt
* Massive extinction event for waitForExecutionDone; try to stop projects view switching from crashing
* Clear diagnostics when unmounting code editor!
* wip
* Rework initial root projects dir + deflake many projects tests
* More e2e fixes
* Deflake revolve some revolve tests
* Fix the rest of the mfing tests
* yarn fmt
* yarn lint
* yarn tsc
* Fix tsc after rebase
* wip
* less flaky point and click
* wip
* Fixup after rebase
* Fix more tests
* Fix 2 more
* Fix up named-views tests
* yarn fmt lint tsc
* Fix up new changes
* Get rid of 1 cyclic dependency
* Fix another cyclic mfer!
* fmt
* fmt tsc
* Fix zoom to fit being frigged
* a new list of circular deps
* Remove NetworkHealthIndicator test that was shit
* Fix the bad reload repeat issue kevin started on
* Fix zoom to fit at the right moments...
* Fix cache count numbers in editor test
* Remove a test race - poll window info.
* Qualify fail function
* Try something
* Use scene.connectionEstablished
* Hopefully fix snapshots at least
* Add app console.log
* Fix native menu tests more
* tsc lint
* Fix camera failure
* Try again
* Test attempt number 15345203, action!
* Add back old window detection heuristic
* Remove firstWindow to complete the work of 2342d04fe2
* Tweak some tests for MacOS
* Tweak "set appearance" test for MacOS
Revert this if it messes up any other platform's color checks!
* Are you serious? This was all that needed formatting?
* More color tweaks
Local MacOS and CI MacOS don't agree
* Fixes on apperance e2e test for stream idle branch (#6168)
pierremtb/stream-idle-revamp-appearance-fixes
* Another apperance fix
* Skip one native menu test to make stream idle green (#6169)
* pierremtb/stream-idle-revamp-more-fixes
* Fix lint
* Update snapshot for test_generate_settings_docs
---------
Co-authored-by: lee-at-zoo-corp <lee@zoo.dev>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* attempt to import win-ca on windows
otherwise we won't see system x509 cert authorities, which leaves people
high and dry if they're using an enterprise mitm tls box (😢)
* first pass at adding test for Only showing axis planes when there are no errors
* fix test Only show axis planes when there are no errors
* PR feedback
* 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
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.
* 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>
* 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
* 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
* 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>
* 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>
* fix sketch mode scale issue
* fmt
* Fix snapshot tests in kurt-5621-scale-issue (#6111)
* Change test function to share units with settings (#6114)
* Change test function to share units with settings
* Consolidate to the same module
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
* Map dependencies between Windows scripts
* Skip unix-specific command on Windows
* Handle missing directory
* Explicitly run with PowerShell
This makes the scripts with work CMD out-of-the-box.
* Update main.kcl
Finally making this bracket smarter
correcting fillet issues
single body w/ SSI extruded cuts
it even works as a sendcutsend upload now
* Update kcl-samples simulation test output
* Update main.kcl
descriptive variable names
* Update kcl-samples simulation test output
* Update main.kcl
spelling corrections
* Update kcl-samples simulation test output
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
* Fix to not call onMouseLeave with no selected object
* Add no this alias lint
* Add more lints and fix JSON formatting
* Fix to use lower-case string type
* Add another namespace lint
* Fix to not use plus on possibly non-string values
* Add failing test
* Update output to show execution error
* Fix circular pattern to not error in isolated or mock mode
* Update output after fix
* Add failing test for pattern linear 2D
* Add failing output
* Fix isolated execution in linear patterns
* Update output after linear fix
* WIP: Add edge and segment selection in point-and-click Helix flow
Fixes#5393
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Working edge based helix edit
* 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! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Add utility function for shared code between revolve and helix
* 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! 📷🐛
* Use updateModelingState in codemod
* A snapshot a day keeps the bugs away! 📷🐛
* Add skip: true for edge helix to be consistent with axis as options
* A snapshot a day keeps the bugs away! 📷🐛
* Add support for sweepEdge and tests
* Lint
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up snapshots
* WIP: Add edit flow for Revolve
Fixes#5504
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up, add edit steps to three e2e tests
* Fix up tests after ccw change
* Use displayName: 'CounterClockWise' cause ccw not cutting it
* Fix tsc
* Remove uneeded return
* Update 2020 snapshots after helix change
* Update 2020 snapshots after helix change
* 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! 📷🐛
* Another one :djkhaled:
* 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! 📷🐛
* Move to fromPromise actor, fix test
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up
* 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! 📷🐛
* Lint
* Fix third test
* A snapshot a day keeps the bugs away! 📷🐛
* Lint
* Fix edit insert order
* Fix axis, edge cases with new var, edit new var
* Add test case for new variable creation
* Clean up addRevolve with getSafeInsertIndex
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add test for rect panning bug
* tweak timeouts
* cleanups, handle both center and corner rectangle
* revert regression that was used for the test
* apply PR feedback
* Show a toast if the user tries to save their work
And store the fact that they've seen it in localStorage so we don't spam
them every time they hit it after they see it.
* Remove any localStorage logic, toast every time
* Move turns to a submodule of std
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Cache module infos as well as memory; fix a bug with deprecated constants
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add as const lint
* Add lint for no implied eval
* Fix incorrect type and add lints
* Add more type lints
* Remove redundant type assertions and add lint
* Fix to turn off incorrect base rules
* Fix yarn lint workflow to wait for build:wasm
* Change so that we don't build:wasm more than once in the workflow
* first steps, add to cmd bar etc
* cmdbar working well enough
* mvp
* lint
* fix after rebase
* intersect and union mvps
* add test
* some clean up
* further fix up
* Update src/lang/modifyAst/boolean.ts
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update src/lang/modifyAst/boolean.ts
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* pierre's comments
* tsc
* add comment
---------
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Add operation tracking for CSG boolean functions
* Add CSG operations to the Feature Tree
* Add just command
* Add union sim test
* Update output with new sim test
* Add CSG subtract test
* Update output from subtract test
* Add intersect sim test
* Update output for intersect test
* Add a loading state to CommandBarKclInput while calculating
This is so that we can more reliably await for the calculation to be
completed before advancing the command bar in Playwright E2E tests.
* Make sure the spinner shows on first frame, before `isExecuting` is set too
* Add a test to confirm console errors fail tests
* Check for console errors on all browsers
* Ignore error impacting lots of tests
* Add more detected errors to the allowlist for now
* add makeup mirror
* m -> M
* add metal sink unit
* Update kcl-samples simulation test output
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 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: 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! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* 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
* 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! 📷🐛
* 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
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: cleanup to get named views released!
* fix: fixed gizmo, client side camera sync and remove DEV flag
* yarp
* chore: implementing E2E tests for creating a named view
* fix: cleaning up and commenting E2E tests for named views
* fix: we did it bois, the skip ceral i zation bricked my E2E test :(
* fix: auto formatter
* fix: snapshot uuid matching because rust will randomly generate thme
* fix: auto fmt
* fix: trying to resolve typescript issues
* fix: handling NamedView vs CameraViewState type checking
* fix: no idea I just mapped export to 3d export because we have no 2d export yet...
* fix: random file I wrote because my editor was too slow
* fix: git merge did not do what I wanted
* A snapshot a day keeps the bugs away! 📷🐛
* fix: linter errors
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: 49fl <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* WIP: Add edit flow for Fillet
Fixes#5521
* Support sweepedge fillet and add edit tests
* A snapshot a day keeps the bugs away! 📷🐛
* Lint and cleanup
* Add edit flow for Chamfer
Fixes#5950
* Change to shared prepareToEdit function
* Clean up
* Lint
* Clean up of types and use of getEdgeCutConsumedCodeRef
* Find pipeIndex instead of hardcode
* Add error for non-pipe fillet and test it
* A snapshot a day keeps the bugs away! 📷🐛
* Fix lint
* A snapshot a day keeps the bugs away! 📷🐛
* Utility function to reduce code reuse across fillet and chamfer
* Clean up test diff
* 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! 📷🐛
* Lint
* 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! 📷🐛
* Remove change not needed
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Fix typo in toast
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Remove ['segment', 'sweepEdge'] const as it was causing some sort of circ dep
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Give a warning when using per-project default units
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Factor non-settings out of MetaSettings
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Fix formatting
* Fix code pane e2e test
* Fix callstack blowup in edit flow
* Avoid dumb timeout issue with command registration in test
* Use a safer way to wait for modeling command registration in test
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Fix callstack blowup in edit flow
* Avoid dumb timeout issue with command registration in test
* A snapshot a day keeps the bugs away! 📷🐛
* Use a safer way to wait for modeling command registration in test
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* De-flake create parameter test step
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add tests for utility to bypass unreliable tests
* Limit skip to just Windows
* Ignore unit tests from Playwright
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: fixed use effect logic to use .current, fixed useEffect file watcher to not watch .kcl files when loading settings
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* bump
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix: merge wrote this back...
* fix: deleted unused variable init
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* bump
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Extract extrude to variables and format onboarding code
* A snapshot a day keeps the bugs away! 📷🐛
* add spaces between sketches and extrudes
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jgomez720 <114548659+jgomez720@users.noreply.github.com>
* WIP: Add edge and segment selection in point-and-click Helix flow
Fixes#5393
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Working edge based helix edit
* 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! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Add utility function for shared code between revolve and helix
* 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! 📷🐛
* Use updateModelingState in codemod
* A snapshot a day keeps the bugs away! 📷🐛
* Add skip: true for edge helix to be consistent with axis as options
* A snapshot a day keeps the bugs away! 📷🐛
* Add support for sweepEdge and tests
* Lint
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up snapshots
* Fix up tests after ccw change
* Use displayName: 'CounterClockWise' cause ccw not cutting it
* Fix tsc
* Update 2020 snapshots after helix change
* Update 2020 snapshots after helix change
* A snapshot a day keeps the bugs away! 📷🐛
* Another one :djkhaled:
* Clean up
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* chore: skeleton to detect read write directories and if we have access to notify user
* chore: adding buttont to easily change project directory
* chore: cleaning up home page error bar layout and button
* fix: adding clearer comments
* fix: ugly console debugging but I need to save off progress
* fix: removing project dir check on empty string
* fix: debug progress to save off listProjects once. Still bugged...
* fix: more hard coded debugging to get project loading optimizted
* fix: yarp, we got another one bois
* fix: cleaning up code
* fix: massive bug comment to warn devs about chokidar bugs
* fix: returning error instead of throwing
* fix: cleaning up PR
* fix: fixed loading the projects when the project directory changes
* fix: remove testing code
* fix: only skip directories if you can access the project directory since we don't need to view them
* fix: unit tests, turning off noisey localhost vitest garbage
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix: deleted testing state
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Update 2020 snapshots after helix change
* Another one :djkhaled:
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Support calling KCL std KW fns, and move circle to KCL std
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Doc comments on parameters
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Update grammar
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Change use of counterClockWise to ccw
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Support paths to names rather than just raw idents
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* 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! 📷🐛
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: REVERT REVERT REVERT
* fix: one more unused remove
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Make sure connection is established before advancing settings theme test
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Add more tests for sweep sectional
* A snapshot a day keeps the bugs away! 📷🐛
* Add rust doc test for sectional
* A snapshot a day keeps the bugs away! 📷🐛
* Ran redo-kcl-stdlib-docs
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make changes to ML button
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: Zookeeper Lee <lee@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Only show axis planes when there are no errors
* run prettier
* A snapshot a day keeps the bugs away! 📷🐛
* KclSingleton hasErrors refactor
* 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! 📷🐛
* 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! 📷🐛
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Automatic fixing of deprecations and use non-quoted default planes by default
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* 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! 📷🐛
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix snapshot test to use mask
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix ToolBar WebkitAppRegion warning
* make intersectionPlane non-nullable, avoid trying to create it multiple times to get rid of warning
* remove derived scene from sceneEntities
* intersectionPlane is now always non-null, make it readonly too
* sceneInfra small cleanups
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* WIP: Expose the sectional argument in the Sweep command flow
Fixes#5301
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Working edit flow
* Lint
* Allow in place editing, more consistent code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Remove validation on non-selection arg
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Comment out bad test
* Clean up for review
* Hack sectional
* Made selection args hidden
* Fix edit issue in e2e
* Clean up
* Add face filtering filter for opposite and next adjacent faces
* Lint
* Fixme back
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Use updateModelingState in codemod
* 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! 📷🐛
* 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! 📷🐛
* Improve filtering readibility
* Fix base test
* I liked return but clippy didn't
* Working tests, isolating the change to sectional sweep, don't like the api change
* 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 snapshots
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* parse union and fancy array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type aliases
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Treat Helix and Face as primitive types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* code motion: factor our execution::types module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Tests for type coercion and subtyping
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add Point2D/3D to std
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rebasing and fixes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add support for forcing kcl input create variable
* Command palette padding tweak
* Make traverse function work for ExpressionStatements
* Add utilities for getting earliest safe index in AST
* Fix the insertIndex logic to not be based on the selection anymore
* Add workflow to create a named constant
* Fix bug with nameEndInDigits matcher
* Tweak command config
* Add a three-dot menu to feature tree pane to create parameters
* Add E2E test for create parameter flow
* Remove edit flow oops
* Fix tsc error
* Fix E2E test
* Update named constant position in edit flow test
* Add tags into consideration for safe insert index
Per @Irev-dev's helpful feedback, with unit tests!
* Fix tsc by removing a generic type
* Remove unused imports
* Fix lints
* A snapshot a day keeps the bugs away! 📷🐛
* Add utilities for working with variable declarations
* Add "edit parameter" user flow
* Add edit flow config
* WIP working on de-bloating useCalculateKclExpreesion
* Add the ability to specify a `displayName` for an arg
* Add utility to type check on SourceRanges
* Review step design tweak fixes
* Refactor useCalculateKclExpression to take a sourceRange
* Make option arg validation work for objects and arrays
Using an admittedly dumb stringification approach
* Make edit flow never move the constant to be edited
* Add E2E test section
* Fix lints
* Remove lying comment, tiny CSS tweak
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Install Vector on Ubuntu to log failed test to Axiom
* Allow flaky tests to run on main for Axiom metrics
* Enable problematic tests on a dedicated branch
* Only show "Edit sketch" button when code pane is focused with sketch selected
Closes#4273. WIP until tests are updated, since this will impact many
that look for the "Edit sketch" button.
* Start removing "edit sketch" point-and-click from E2E
* Update more E2E tests
* Update more tests that assumed Edit Sketch button
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Ensure batches in the engine are cleared between scenes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Avoid panicking reading arguments out of bounds
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Improve snapshot testing
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix no profile errors
* add test and tweak a couple things
* quick fix
* fix animation
* add another test
* Use actor.getSnapshot in the debug function
So we don't have to rebuild that listener every time that the state
changes.
* try fix tests
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* rule them all
* swap AST updater
* add test
* yellow colour fix
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add support for forcing kcl input create variable
* Command palette padding tweak
* Make traverse function work for ExpressionStatements
* Add utilities for getting earliest safe index in AST
* Fix the insertIndex logic to not be based on the selection anymore
* Add workflow to create a named constant
* Fix bug with nameEndInDigits matcher
* Tweak command config
* Add a three-dot menu to feature tree pane to create parameters
* Add E2E test for create parameter flow
* Remove edit flow oops
* Fix tsc error
* Fix E2E test
* Update named constant position in edit flow test
* Add tags into consideration for safe insert index
Per @Irev-dev's helpful feedback, with unit tests!
* transform a sketch
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* 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! 📷🐛
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* show we can revolve around paths
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* show we can revolve around paths
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* set initial electron window size to be almost full screen with some space left
* refine initial window size and position
* slightly larger
* 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! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Deep links or double clicks don't work on second instance on Windows
Fixes#5864
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Attempt: Hourly tests on ubuntu only
* Attempt: Hourly tests on ubuntu only through os exlusion rules
* Attempt: Hourly tests on ubuntu only through dummy boolean key
* Clean up for PR
* Draft: Use less namespace vCPUs for e2e
* All on gh, just to see
* Disable concurrency, bump to 45min step retry timeout
* 2 workers for non-windows machineis
* Step retry down to 3
* Change to ubuntu aws, change macos to macos-latest-large
* Fix name for ubuntu aws, back to 10 step retry
* Back to 4 shards to see the diff
* Snaptshots on ubuntu aws
* Cleaning up to get closer to a review-able state
* Should be ready for review
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* bare minimum
* start of segment util added
* remove redundant handle
* some probably buggy handling of arc handles, can fix later
* probably bug implementation of update args, but data flow through is mostly there can fix bugs after
* fix update for arc
* fix math for center handle
* fix up length indicator
* tweak math
* stub out xState logic for arc
* more progress on adding point and click, implemented more of sketchLineHelper for arc
* small unrelated tweak
* fix up draft arc bugs
* fix arc last click
* fix draft segment animation and add comment
* add draft point snapping for arcs
* add helper stuff to arc
* clone arc point and click as base for arc-three-point
* rust change for arc three point
* can draw three point arc
* make arcTo editable
* can add new three point arc, so long as it continues existing profile
* get overlays working
* make snap to for continuing profile work for three point arcs
* add draft animation
* tangent issue fix
* action rename
* tmp test fix up
* fix silly bug
* fix couple problems causing tests to fail
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix up
* add delet segment test for new segments
* update docs
* draft segments should look right
* add test for dragging new segment handles
* arc tools can be chained now
* make three point arc can start a new profile (not only extend existing paths)
* add test for equiping and unequiping the tool plus drawing with it
* fix console noise
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* clean up
* update rust/docs
* put toolbar mode check into fixture
* do thing for lee
* use TEST_COLORSs
* fix colors
* don't await file write
* remove commented code
* remove unneeded template strings
* power to **2
* remove magic numbers
* more string templates
* some odd bits of clean up
* arc should be enable in dev
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* add new simulation test
* fix test code from kwark migration
* issues Frank found
* fix deleting half complete ark
* fix
* small fix on dele index
* tsc post main merge
* fix up snaping to profile start
* add cross hari for three point arc
* block snapping if it's the only segment
* add tests for canceling arcTo halfway through
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Attempt: Hourly tests on ubuntu only
* Attempt: Hourly tests on ubuntu only through os exlusion rules
* Attempt: Hourly tests on ubuntu only through dummy boolean key
* Clean up for PR
* 8 shards, 1 workers, 10 retries
* Trigger CI
* Add retries to snapshots
* Clean up for PR, retry to 15
* Trigger CI
* Back to 4 shards for simplicity
* Revert "Back to 4 shards for simplicity"
This reverts commit 413de2fc61.
* chore: implement faster write function to call when rerouting
* fix: codespell typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add script to build on mac mini
* Remove wasm-prep, rust flag only on wasm-pack build, add ps1 script
* Make it exectuable, tested on macOS
* Add set -e
* Stop scripts on error
---------
Co-authored-by: lf94 <ircsurfer33@gmail.com>
* Parse [T] instead of T[] for array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* homogenous arrays, type coercion, remove solid set and sketch set, etc
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make tag identifiers monotonic
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Use epochs rather than snapshots in memory
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* WIP: Add edit flow for Shell thickness
Would fix#5406 but not like this :sad:
* Early win with working edit on shell
* Extend to logic to walls with tags
* Remove skip
* Add wall test
* Fixing inconsistencies in code. Tests not working on win
* Refactor addShell for consitency
* Clean up
* More clean up
* Add validation on both params
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Passing tests
* Prettier
* Change from test.skip to comment
* Clean up for review
* Add review suggestions and disable thickness validator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Remove uneccessary changes
* Add edit flow for Shell thickness
Fixes#5406
* Enable edit step in test that works only if the start code is properly formatted
* Clean up for review
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-14 16:05:41 -04:00
2623 changed files with 7017975 additions and 1471231 deletions
cargo nextest run --workspace --retries=2 --no-fail-fast --profile ci simulation_tests::kcl_samples 2>&1 | tee /tmp/github-actions.log
cargo nextest run --workspace --features artifact-graph --retries=10 --no-fail-fast --profile ci simulation_tests::kcl_samples 2>&1 | tee /tmp/github-actions.log
const message = '`src/lib/exampleKcl.ts` has been updated in this PR, please review and update the `src/routes/onboarding`, if needed.';
const message = '`public/kcl-samples/bracket/main.kcl` or `src/lib/exampleKcl.ts` has been updated in this PR, please review and update the `src/routes/onboarding`, if needed.';
Install a node version manager such as [fnm](https://github.com/Schniz/fnm?tab=readme-ov-#installation).
On Windows, it's also recommended to [upgrade your PowerShell version](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget), we're using 7.
Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected.
```
fnm install --corepack-enabled
fnm use
```
Install the NPM dependencies with:
```
npm install
```
This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We have package scripts to run rustup, see `package.json` for reference:
```
# macOS/Linux
npm run install:rust
npm run install:wasm-pack:sh
# Windows
npm run install:rust:windows
npm run install:wasm-pack:cargo
```
Then to build the WASM layer, run:
```
# macOS/Linux
npm run build:wasm
# Windows
npm run build:wasm:windows
```
Or if you have the `gh` cli installed and want to download the latest main wasm bundle. Note that on Windows, you need to associate .ps1 files with PowerShell, which can be done via the right click menu, selecting `C:\Program Files\PowerShell\7\pwsh.exe`, and you can install tools like `gh` via `npm run install:tools:windows`.
```
# macOS/Linux
npm run fetch:wasm
# Windows
npm run fetch:wasm:windows
```
That will build the WASM binary and put in the `public` dir (though gitignored).
Finally, to run the web app only, run:
```
npm start
```
If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development.local` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to `localhost:3000` again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
### Development environment variables
The Copilot LSP plugin in the editor requires a Zoo API token to run. In production, we authenticate this with a token via cookie in the browser and device auth token in the desktop environment, but this token is inaccessible in the dev browser version because the cookie is considered "cross-site" (from `localhost` to `zoo.dev`). There is an optional environment variable called `VITE_KC_DEV_TOKEN` that you can populate with a dev token in a `.env.development.local` file to not check it into Git, which will use that token instead of other methods for the LSP service.
### Developing in Chrome
Chrome is in the process of rolling out a new default which
If you're having trouble logging into the `modeling-app`, you may need to
enable third-party cookies. You can enable third-party cookies by clicking on
the eye with a slash through it in the URL bar, and clicking on "Enable
Third-Party Cookies".
## Desktop
To spin up the desktop app, `npm install` and `npm run build:wasm` need to have been done before hand then:
```
npm run tron:start
```
This will start the application and hot-reload on changes.
Devtools can be opened with the usual Command-Option-I (macOS) or Ctrl-Shift-I (Linux and Windows).
To package the app for your platform with electron-builder, run `npm run tronb:package:dev` (or `npm run tronb:package:prod` to point to the .env.production variables).
## Checking out commits / Bisecting
Which commands from setup are one off vs. need to be run every time?
The following will need to be run when checking out a new commit and guarantees the build is not stale:
```bash
npm install
npm run build:wasm
npm start
```
## Before submitting a PR
Before you submit a contribution PR to this repo, please ensure that:
- There is a corresponding issue for the changes you want to make, so that discussion of approach can be had before work begins.
- You have separated out refactoring commits from feature commits as much as possible
- You have run all of the following commands locally:
-`npm run fmt`
-`npm run tsc`
-`npm run test`
- Here they are all together: `npm run fmt && npm run tsc && npm run test`
## Release a new version
#### 1. Create a 'Cut release $VERSION' issue
It will be used to document changelog discussions and release testing.
Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
```
VERSION=$(./scripts/semantic-release.sh)
git tag $VERSION
git push origin --tags
```
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files as well as updater-test artifacts.
The workflow should be listed right away [in this list](https://github.com/KittyCAD/modeling-app/actions/workflows/build-apps.yml?query=event%3Apush)).
#### 3. Manually test artifacts
##### Release builds
The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in 2.).
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the issue.
##### Updater-test builds
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket).
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well.
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
#### 5. Close the issue
If everything is well and the release is out to the public, the issue tracking the release shall be closed.
- Set $token from https://zoo.dev/account/api-tokens
#### Snapshot tests (Google Chrome on Ubuntu only)
Only Ubunu and Google Chrome is supported for the set of tests evaluating screenshot snapshots.
If you don't run Ubuntu locally or in a VM, you may use a GitHub Codespace.
```
npm run playwright -- install chrome
npm run test:snapshots
```
You may use `-- --update-snapshots` as needed.
#### Electron flow tests (Chromium on Ubuntu, macOS, Windows)
```
npm run playwright -- install chromium
npm run test:playwright:electron:local
```
You may use `-- -g "my test"` to match specific test titles, or `-- path/to/file.spec.ts` for a test file.
#### Debugger
However, if you want a debugger I recommend using VSCode and the `playwright` extension, as the above command is a cruder debugger that steps into every function call which is annoying.
With the extension you can set a breakpoint after `waitForDefaultPlanesVisibilityChange` in order to skip app loading, then the vscode debugger's "step over" is much better for being able to stay at the right level of abstraction as you debug the code.
If you want to limit to a single browser use `--project="webkit"` or `firefox`, `Google Chrome`
Or comment out browsers in `playwright.config.ts`.
note chromium has encoder compat issues which is why were testing against the branded 'Google Chrome'
You may consider using the VSCode extension, it's useful for running individual threads, but some some reason the "record a test" is locked to chromium with we can't use. A work around is to us the CI `npm run playwright codegen -b wk --load-storage ./store localhost:3000`
However because much of our tests involve clicking in the stream at specific locations, it's code-gen looks `await page.locator('video').click();` when really we need to use a pixel coord, so I think it's of limited use.
### Unit and component tests
If you already haven't, run the following:
```
npm
npm run build:wasm
npm start
```
and finally:
```
npm run test:unit
```
For individual testing:
```
npm run test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false
```
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro) tests, in interactive mode by default.
### Rust tests
Prepare these system dependencies:
- Set `$KITTYCAD_API_TOKEN` from https://zoo.dev/account/api-tokens
- Install `just` following [these instructions](https://just.systems/man/en/packages.html)
then run tests that target the KCL language:
```
npm run test:rust
```
### Logging
To display logging (to the terminal or console) set `ZOO_LOG=1`. This will log some warnings and simple performance metrics. To view these in test runs, use `-- --nocapture`.
To enable memory metrics, build with `--features dhat-heap`.
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:
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,11 +19,11 @@ 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
## Technology
- UI
- [React](https://react.dev/)
@ -38,471 +38,16 @@ The 3D view in Modeling App is just a video stream from our hosted geometry engi
We recommend downloading the latest application binary from our [releases](https://github.com/KittyCAD/modeling-app/releases) page. If you don't see your platform or architecture supported there, please file an issue.
## Get started
If you'd like to try out upcoming changes sooner, you can also download those from our [nightly releases](https://zoo.dev/modeling-app/download/nightly) page.
We recommend downloading the latest application binary from [our Releases page](https://github.com/KittyCAD/modeling-app/releases). If you don't see your platform or architecture supported there, please file an issue.
## Developing
## Running a development build
Install a node version manager such as [fnm](https://github.com/Schniz/fnm?tab=readme-ov-#installation).
On Windows, it's also recommended to [upgrade your PowerShell version](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget), we're using 7.
Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected.
```
fnm install --corepack-enabled
fnm use
```
Install the NPM dependencies with:
```
yarn install
```
This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We have package scripts to run rustup, see `package.json` for reference:
```
# macOS/Linux
yarn install:rust
yarn install:wasm-pack:sh
# Windows
yarn install:rust:windows
yarn install:wasm-pack:cargo
```
Then to build the WASM layer, run:
```
# macOS/Linux
yarn build:wasm
# Windows
yarn build:wasm:windows
```
Or if you have the `gh` cli installed and want to download the latest main wasm bundle. Note that on Windows, you need to associate .ps1 files with PowerShell, which can be done via the right click menu, selecting `C:\Program Files\PowerShell\7\pwsh.exe`, and you can install tools like `gh` via `yarn install:tools:windows`.
```
# macOS/Linux
yarn fetch:wasm
# Windows
yarn fetch:wasm:windows
```
That will build the WASM binary and put in the `public` dir (though gitignored).
Finally, to run the web app only, run:
```
yarn start
```
If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to localhost:3000 again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
### Development environment variables
The Copilot LSP plugin in the editor requires a Zoo API token to run. In production, we authenticate this with a token via cookie in the browser and device auth token in the desktop environment, but this token is inaccessible in the dev browser version because the cookie is considered "cross-site" (from `localhost` to `dev.zoo.dev`). There is an optional environment variable called `VITE_KC_DEV_TOKEN` that you can populate with a dev token in a `.env.development.local` file to not check it into Git, which will use that token instead of other methods for the LSP service.
### Developing in Chrome
Chrome is in the process of rolling out a new default which
If you're having trouble logging into the `modeling-app`, you may need to
enable third-party cookies. You can enable third-party cookies by clicking on
the eye with a slash through it in the URL bar, and clicking on "Enable
Third-Party Cookies".
## Desktop
To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then
```
yarn tron:start
```
This will start the application and hot-reload on changes.
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables)
## Checking out commits / Bisecting
Which commands from setup are one off vs need to be run every time?
The following will need to be run when checking out a new commit and guarantees the build is not stale:
```bash
yarn install
yarn build:wasm
yarn start # or yarn build:local && yarn serve for slower but more production-like build
```
## Before submitting a PR
Before you submit a contribution PR to this repo, please ensure that:
- There is a corresponding issue for the changes you want to make, so that discussion of approach can be had before work begins.
- You have separated out refactoring commits from feature commits as much as possible
- You have run all of the following commands locally:
-`yarn fmt`
-`yarn tsc`
-`yarn test`
- Here they are all together: `yarn fmt && yarn tsc && yarn test`
## Release a new version
#### 1. Create a 'Cut release $VERSION' issue
It will be used to document changelog discussions and release testing.
Create a new tag and push it to the repo. The `semantic-release.sh` script will automatically bump the minor part, which we use the most. For instance going from `v0.27.0` to `v0.28.0`.
```
VERSION=$(./scripts/semantic-release.sh)
git tag $VERSION
git push origin --tags
```
This will trigger the `build-apps` workflow, set the version, build & sign the apps, and generate release files as well as updater-test artifacts.
The workflow should be listed right away [in this list](https://github.com/KittyCAD/modeling-app/actions/workflows/build-apps.yml?query=event%3Apush)).
#### 3. Manually test artifacts
##### Release builds
The release builds can be found under the `out-{arch}-{platform}` zip files, at the very bottom of the `build-apps` summary page for the workflow (triggered by the tag in 2.).
Manually test against this [list](https://github.com/KittyCAD/modeling-app/issues/3588) across Windows, MacOS, Linux and posting results as comments in the issue.
##### Updater-test builds
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket).
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well.
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
#### 5. Close the issue
If everything is well and the release is out to the public, the issue tracking the release shall be closed.
You will need a `./e2e/playwright/playwright-secrets.env` file:
```bash
$ touch ./e2e/playwright/playwright-secrets.env
$ cat ./e2e/playwright/playwright-secrets.env
token=<dev.zoo.dev/account/api-tokens>
snapshottoken=<your-snapshot-token>
```
For a portable way to run Playwright you'll need Docker.
#### Generic example
After that, open a terminal and run:
```bash
docker run --network host --rm --init -it playwright/chrome:playwright-x.xx.x
```
and in another terminal, run:
```bash
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
```
#### Specific example
open a terminal and run:
```bash
docker run --network host --rm --init -it playwright/chrome:playwright-1.46.0
```
and in another terminal, run:
```bash
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" e2e/playwright/command-bar-tests.spec.ts
```
run a specific test change the test from `test('...` to `test.only('...`
(note if you commit this, the tests will instantly fail without running any of the tests)
**Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date.
run headed
```
yarn playwright test --headed
```
run with step through debugger
```
PWDEBUG=1 yarn playwright test
```
However, if you want a debugger I recommend using VSCode and the `playwright` extension, as the above command is a cruder debugger that steps into every function call which is annoying.
With the extension you can set a breakpoint after `waitForDefaultPlanesVisibilityChange` in order to skip app loading, then the vscode debugger's "step over" is much better for being able to stay at the right level of abstraction as you debug the code.
If you want to limit to a single browser use `--project="webkit"` or `firefox`, `Google Chrome`
Or comment out browsers in `playwright.config.ts`.
note chromium has encoder compat issues which is why were testing against the branded 'Google Chrome'
You may consider using the VSCode extension, it's useful for running individual threads, but some some reason the "record a test" is locked to chromium with we can't use. A work around is to us the CI `yarn playwright codegen -b wk --load-storage ./store localhost:3000`
However because much of our tests involve clicking in the stream at specific locations, it's code-gen looks `await page.locator('video').click();` when really we need to use a pixel coord, so I think it's of limited use.
### Unit and component tests
If you already haven't, run the following:
```
yarn
yarn build:wasm
yarn start
```
and finally:
```
yarn test:unit
```
For individual testing:
```
yarn test abstractSyntaxTree -t "unexpected closed curly brace" --silent=false
```
Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testing Library E2E](https://testing-library.com/docs/react-testing-library/intro) tests, in interactive mode by default.
### Rust tests
**Dependencies**
-`KITTYCAD_API_TOKEN`
-`cargo-nextest`
-`just`
#### Setting KITTYCAD_API_TOKEN
Use the production zoo.dev token, set this environment variable before running the tests
# Make sure KITTYCAD_API_TOKEN=<prod zoo.dev token> is set
# Make sure you installed cargo-nextest
# Make sure you installed just
cd rust
just test
```
```bash
# Without just
# Make sure KITTYCAD_API_TOKEN=<prod zoo.dev token> is set
# Make sure you installed cargo-nextest
cd rust
exportRUST_BRACKTRACE="full"&& cargo nextest run --workspace --test-threads=1
```
Where `XXX` is an API token from the production engine (NOT the dev environment).
We recommend using [nextest](https://nexte.st/) to run the Rust tests (its faster and is used in CI). Once installed, run the tests using
```
cd rust
KITTYCAD_API_TOKEN=XXX cargo run nextest
```
### Mapping CI CD jobs to local commands
When you see the CI CD fail on jobs you may wonder three things
- Do I have a bug in my code?
- Is the test flaky?
- Is there a bug in `main`?
To answer these questions the following commands will give you confidence to locate the issue.
#### Static Analysis
Part of the CI CD pipeline performs static analysis on the code. Use the following commands to mimic the CI CD jobs.
The following set of commands should get us closer to one and done commands to instantly retest issues.
```
yarn test-setup
```
> Gotcha, are packages up to date and is the wasm built?
```
yarn tsc
yarn fmt-check
yarn lint
yarn test:unit:local
```
> Gotcha: Our unit tests have integration tests in them. You need to run a localhost server to run the unit tests.
#### E2E Tests
**Playwright Electron**
These E2E tests run in electron. There are tests that are skipped if they are ran in a windows, linux, or macos environment. We can use playwright tags to implement test skipping.
```
yarn test:playwright:electron:local
yarn test:playwright:electron:windows:local
yarn test:playwright:electron:macos:local
yarn test:playwright:electron:ubuntu:local
```
> Why does it say local? The CI CD commands that run in the pipeline cannot be ran locally. A single command will not properly setup the testing environment locally.
#### Some notes on CI
The tests are broken into snapshot tests and non-snapshot tests, and they run in that order, they automatically commit new snap shots, so if you see an image commit check it was an intended change. If we have non-determinism in the snapshots such that they are always committing new images, hopefully this annoyance makes us fix them asap, if you notice this happening let Kurt know. But for the odd occasion `git reset --hard HEAD~ && git push -f` is your friend.
How to interpret failing playwright tests?
If your tests fail, click through to the action and see that the tests failed on a line that includes `await page.getByTestId('loading').waitFor({ state: 'detached' })`, this means the test fail because the stream never started. It's you choice if you want to re-run the test, or ignore the failure.
We run on ubuntu and macos, because safari doesn't work on linux because of the dreaded "no RTCPeerConnection variable" error. But linux runs first and then macos for the same reason that we limit the number of parallel tests to 1 because we limit stream connections per user, so tests would start failing we if let them run together.
If something fails on CI you can download the artifact, unzip it and then open `playwright-report/data/<UUID>.zip` with https://trace.playwright.dev/ to see what happened.
#### Getting started writing a playwright test in our app
Besides following the instructions above and using the playwright docs, our app is weird because of the whole stream thing, which means our testing is weird. Because we've just figured out this stuff and therefore docs might go stale quick here's a 15min vid/tutorial
Finally, if you'd like to run a development build or contribute to the project, please visit our [contributor guide](CONTRIBUTING.md) to get started.
## KCL
For how to contribute to KCL, [see our KCL README](https://github.com/KittyCAD/modeling-app/tree/main/rust/kcl-lib).
### Logging
To display logging (to the terminal or console) set `ZOO_LOG=1`. This will log some warnings and simple performance metrics. To view these in test runs, use `-- --nocapture`.
To enable memory metrics, build with `--features dhat-heap`.
To contribute to the KittyCAD Language, see the [README](https://github.com/KittyCAD/modeling-app/tree/main/rust/kcl-lib) for KCL.
If `main.kcl` waits until the very end to call `makeBolt`, *none* of that work was parallelised – you’ve pushed the cost back onto the serial tail of your script.
**Better:** call it early or move the invocation into another module.
```norun
// bolt_instance.kcl
import makeBolt from "util.kcl"
bolt = makeBolt(5) // executed in parallel
bolt
```
Now `main.kcl` can `import "bolt_instance.kcl" as bolt` and get the result that was rendered while it was busy doing other things.
---
## Whole module import
You can also import the whole module. This is useful if you want to use the
result of a module as a variable, like a part.
```norun
import "tests/inputs/cube.kcl" as cube
cube
|> translate(x=10)
```
This imports the whole module and makes it available as `cube`. You can then
use it like any other object. The `cube` variable is now a reference to the
result of the module. This means that if you change the module, the `cube`
variable will change as well.
In `cube.kcl`, you cannot have multiple objects. It has to be a single part. If
you have multiple objects, you will get an error. This is because the module is
expected to return a single object that can be used as a variable.
The last expression or variable definition becomes the module's return value.
The module is expected to return a single object that can be used as a variable
by whatever imports it.
So for example, this is allowed:
```norun
... a bunch of code to create cube and cube2 ...
myUnion = union([cube, cube2])
```
You can also do this:
```norun
... a bunch of code to create cube and cube2 ...
union([cube, cube2])
```
Either way, the last line will return the union of the two objects.
Or what you could do instead is:
```norun
... a bunch of code to create cube and cube2 ...
myUnion = union([cube, cube2])
myUnion
```
This will assign the union of the two objects to a variable, and then return it
on the last statement. It's simply another way of doing the same thing.
The final statement is what's important because it's the return value of the
entire module. The module is expected to return a single object that can be used
as a variable by the file that imports it.
---
## Multiple instances of the same import
Whether you are importing a file from another CAD system or a KCL file, that
file represents object(s) in memory. If you import the same file multiple times,
it will only be rendered once.
If you want to have multiple instances of the same object, you can use the
[`clone`](/docs/kcl/clone) function. This will render a new instance of the object in memory.
```norun
import cube from "tests/inputs/cube.kcl"
cube
|> translate(x=10)
clone(cube)
|> translate(x=20)
```
In the sample above, the `cube` object is imported from a KCL file. The first
instance is translated 10 units in the x direction. The second instance is
cloned and translated 20 units in the x direction. The two instances are now
separate objects in memory, and can be manipulated independently.
Here is an example with a file from another CAD system:
```kcl
import "tests/inputs/cube.step" as cube
cube
|> translate(x=10)
clone(cube)
|> translate(x=20)
```
---
## Importing files from other CAD systems
`import` can also be used to import files from other CAD systems. The format of the statement is the
same as for KCL files. You can only import the whole file, not items from it. E.g.,
```norun
import "tests/inputs/cube.obj"
// Use `cube` just like a KCL object.
```
```kcl
import "tests/inputs/cube.sldprt" as cube
// Use `cube` just like a KCL object.
```
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 using an attribute. Likewise, you can also specify a coordinate system. E.g.,
```kcl
@(lengthUnit = ft, coords = opengl)
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 Design Studio, not in the browser.
### Supported values
File formats: `fbx`, `gltf`/`glb`, `obj`+, `ply`+, `sldprt`, `step`/`stp`, `stl`+. (Those marked with a
'+' support customising the length unit and coordinate system).
Length units: `mm` (the default), `cm`, `m`, `inch`, `ft`, `yd`.
Coordinate systems:
-`zoo` (the default), forward: -Y, up: +Z, handedness: right
-`opengl`, forward: +Z, up: +Y, handedness: right
-`vulkan`, forward: +Z, up: -Y, handedness: left
---
## Performance deep‑dive for foreign‑file imports
Parallelized foreign‑file imports now let you overlap file reads, initialization,
and rendering. To maximize throughput, you need to understand the three distinct
stages—reading, initializing (background render start), and invocation (blocking)
—and structure your code to defer blocking operations until the end.
### Foreign import execution stages
1.**Import (Read / Initialization) Stage**
```kcl
import "tests/inputs/cube.step" as cube
```
- Reads the file from disk and makes its API available.
- Starts engine rendering but **does not block** your script.
- This kick‑starts the render pipeline while you keep executing other code.
2. **Invocation (Blocking) Stage**
```kcl
import "tests/inputs/cube.step" as cube
cube
|> translate(z=10) // ← blocks here only
```
- Any method call (e.g., `translate`, `scale`, `rotate`) waits for the background render to finish before applying transformations.
// --- perform other operations and calculations here ---
cube
|> translate(z=10) // 2) Blocks only here
```
#### 2. Split heavy work into separate modules
Place computationally expensive or IO‑heavy work into its own module so it can render in parallel while `main.kcl` continues.
#### Future improvements
Upcoming releases will auto‑analyse dependencies and only block when truly necessary. Until then, explicit deferral will give you the best performance.
@ -55,20 +55,6 @@ This setting has further nested options. See the schema for full details.
The onboarding status of the app.
**Default:** None
##### theme_color
The hue of the primary theme color for the app.
**Default:** None
##### enable_ssao
Whether or not Screen Space Ambient Occlusion (SSAO) is enabled.
**Default:** None
##### dismiss_web_banner
@ -128,13 +114,6 @@ The default unit to use in modeling dimensions.
Highlight edges of 3D objects?
**Default:** None
##### show_debug_panel
Whether to show the debug panel, which lets you see various states of the app to aid in development. Remove this when we remove backwards compatibility with the old settings file.
@ -57,34 +57,6 @@ This setting has further nested options. See the schema for full details.
The onboarding status of the app.
**Default:** None
##### project_directory
Backwards compatible project directory setting.
**Default:** None
##### theme
Backwards compatible theme setting.
**Default:** None
##### theme_color
The hue of the primary theme color for the app.
**Default:** None
##### enable_ssao
Whether or not Screen Space Ambient Occlusion (SSAO) is enabled.
**Default:** None
##### dismiss_web_banner
@ -96,14 +68,14 @@ Permanently dismiss the banner warning to download the desktop app. This setting
##### stream_idle_mode
When the user is idle, and this is true, the stream will be torn down.
When the user is idle, teardown the stream after some time.
**Default:** None
##### allow_orbit_in_sketch_mode
When the user is idle, and this is true, the stream will be torn down.
Allow orbiting in sketch mode.
**Default:** None
@ -159,13 +131,6 @@ The controls for how to navigate the 3D view.
Highlight edges of 3D objects?
**Default:** None
##### show_debug_panel
Whether to show the debug panel, which lets you see various states of the app to aid in development. Remove this when we remove backwards compatibility with the old settings file.
Everything in this directory and its subdirectories (except this file) is automatically generated. Do not edit anything in this directory directly, your changes will be lost.
The directory contents are generated by running the `test_generate_stdlib_markdown_docs` test in `/rust/kcl-lib/src/docs/gen_std_tests.rs`. Files are generated from the standard library declared in KCL (`/rust/kcl-lib/std`) and in Rust (`/rust/kcl-lib/src/std`), and by copying files from `../kcl-src`.
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `length` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthX` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `lengthY` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteX` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| `endAbsoluteY` | [`number`](/docs/kcl-std/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch) - A sketch is a collection of paths.
excerpt: "Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment."
layout: manual
---
Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.
```js
```kcl
angledLineThatIntersects(
data: AngledLineThatIntersectsData,
sketch: Sketch,
@sketch: Sketch,
angle: number,
intersectTag: TagIdentifier,
offset?: number,
tag?: TagDeclarator,
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineThatIntersectsData`](/docs/kcl/types/AngledLineThatIntersectsData) | Data for drawing an angled line that intersects with a given line. | Yes |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `angle` | [`number`](/docs/kcl-std/types/std-types-number) | Which angle should the line be drawn at? | Yes |
| `intersectTag` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the line to intersect with | Yes |
| `offset` | [`number`](/docs/kcl-std/types/std-types-number) | The offset from the intersecting line. Defaults to 0. | No |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch) - A sketch is a collection of paths.
### Examples
```js
```kcl
exampleSketch = startSketchOn(XZ)
|> startProfileAt([0, 0], %)
|> startProfile(at = [0, 0])
|> line(endAbsolute = [5, 10])
|> line(endAbsolute = [-10, 10], tag = $lineToIntersect)
excerpt: "Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape."
layout: manual
---
Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.
```js
```kcl
bezierCurve(
data: BezierData,
sketch: Sketch,
@sketch: Sketch,
control1: Point2d,
control2: Point2d,
end: Point2d,
tag?: TagDeclarator,
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`BezierData`](/docs/kcl/types/BezierData) | Data to draw a bezier curve. | Yes |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
| `control1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | First control point for the cubic | Yes |
| `control2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | Second control point for the cubic | Yes |
| `end` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch) - A sketch is a collection of paths.
excerpt: "Construct a circle derived from 3 points."
layout: manual
---
Construct a circle derived from 3 points.
```js
```kcl
circleThreePoint(
p1: [number],
p2: [number],
p3: [number],
sketchSurfaceOrGroup: SketchOrSurface,
@sketchSurfaceOrGroup: Sketch | Plane | Face,
p1: Point2d,
p2: Point2d,
p3: Point2d,
tag?: TagDeclarator,
): Sketch
```
### Arguments
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `p1` | [`[number]`](/docs/kcl/types/number) | 1st point to derive the circle. | Yes |
| `p2` | [`[number]`](/docs/kcl/types/number) | 2nd point to derive the circle. | Yes |
| `p3` | [`[number]`](/docs/kcl/types/number) | 3rd point to derive the circle. | Yes |
| `sketchSurfaceOrGroup` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | Plane or surface to sketch on. | Yes |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Identifier for the circle to reference elsewhere. | No |
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/types/std-types-Face) | Plane or surface to sketch on. | Yes |
| `p1` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 1st point to derive the circle. | Yes |
| `p2` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 2nd point to derive the circle. | Yes |
| `p3` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | 3rd point to derive the circle. | Yes |
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Identifier for the circle to reference elsewhere. | No |
### Returns
[`Sketch`](/docs/kcl/types/Sketch)
[`Sketch`](/docs/kcl-std/types/std-types-Sketch) - A sketch is a collection of paths.
excerpt: "Compute the logarithm of the number with respect to an arbitrary base."
layout: manual
---
Compute the logarithm of the number with respect to an arbitrary base.
The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.
```js
```kcl
log(
num: number,
base: number,
@input: number,
base: number(_),
): number
```
### Tags
* `math`
The result might not be correctly rounded owing to implementation
details; `log2` can produce more accurate results for base 2,
and `log10` can produce more accurate results for base 10.
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.