Files
modeling-app/src/machines/modelingMachine.ts

2617 lines
84 KiB
TypeScript
Raw Normal View History

import {
PathToNode,
start of cache: don't re-execute on whitespace / top level code comment changes (#4663) * start Signed-off-by: Jess Frazelle <github@jessfraz.com> working for whitespace Signed-off-by: Jess Frazelle <github@jessfraz.com> pull thru Signed-off-by: Jess Frazelle <github@jessfraz.com> fix wasm Signed-off-by: Jess Frazelle <github@jessfraz.com> pull thru to js start Signed-off-by: Jess Frazelle <github@jessfraz.com> actually use the cache in ts Signed-off-by: Jess Frazelle <github@jessfraz.com> rust owns clearing the scene Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> empty stupid log Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updatez Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> save the state Signed-off-by: Jess Frazelle <github@jessfraz.com> save the state Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the old memory Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup to use the old exec state Signed-off-by: Jess Frazelle <github@jessfraz.com> fices Signed-off-by: Jess Frazelle <github@jessfraz.com> updates; Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * rebase and compile Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * fix the lsp to use the cache Signed-off-by: Jess Frazelle <github@jessfraz.com> * add comment Signed-off-by: Jess Frazelle <github@jessfraz.com> * use a global static instead; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix rust test Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup more Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup the api even more Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * bust the cache on unit changes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * stupid codespell 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>
2024-12-05 19:51:06 -08:00
ProgramMemory,
VariableDeclaration,
VariableDeclarator,
parse,
recast,
resultIsOk,
} from 'lang/wasm'
import {
Axis,
DefaultPlaneSelection,
Selections,
Selection,
updateSelections,
} from 'lib/selections'
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
import { assign, fromPromise, setup } from 'xstate'
import { SidebarType } from 'components/ModelingSidebar/ModelingPanes'
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
import {
isNodeSafeToReplacePath,
getNodePathFromSourceRange,
} from 'lang/queryAst'
2024-03-28 17:22:11 +11:00
import {
kclManager,
sceneInfra,
sceneEntitiesManager,
engineCommandManager,
editorManager,
codeManager,
2024-03-28 17:22:11 +11:00
} from 'lib/singletons'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import {
horzVertInfo,
applyConstraintHorzVert,
} from 'components/Toolbar/HorzVert'
import {
applyConstraintHorzVertAlign,
horzVertDistanceInfo,
} from 'components/Toolbar/SetHorzVertDistance'
import { angleBetweenInfo } from 'components/Toolbar/SetAngleBetween'
import { angleLengthInfo } from 'components/Toolbar/setAngleLength'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import {
applyConstraintEqualLength,
setEqualLengthInfo,
} from 'components/Toolbar/EqualLength'
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
import { revolveSketch } from 'lang/modifyAst/addRevolve'
import {
addOffsetPlane,
deleteFromSelection,
extrudeSketch,
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
loftSketches,
} from 'lang/modifyAst'
import {
applyEdgeTreatmentToSelection,
EdgeTreatmentType,
FilletParameters,
} from 'lang/modifyAst/addEdgeTreatment'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
import { getNodeFromPath } from '../lang/queryAst'
import {
applyConstraintEqualAngle,
equalAngleInfo,
} from 'components/Toolbar/EqualAngle'
import {
applyRemoveConstrainingValues,
removeConstrainingValuesInfo,
} from 'components/Toolbar/RemoveConstrainingValues'
import { intersectInfo } from 'components/Toolbar/Intersect'
import {
absDistanceInfo,
applyConstraintAxisAlign,
} from 'components/Toolbar/SetAbsDistance'
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
import { ModelingCommandSchema } from 'lib/commandBarConfigs/modelingCommandConfig'
import { err, reportRejection, trap } from 'lib/trap'
import { DefaultPlaneStr, getFaceDetails } from 'clientSideScene/sceneEntities'
2024-04-03 19:38:16 +11:00
import { uuidv4 } from 'lib/utils'
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
import { Coords2d } from 'lang/std/sketch'
import { deleteSegment } from 'clientSideScene/ClientSideSceneComp'
import { executeAst } from 'lang/langHelpers'
import toast from 'react-hot-toast'
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
import { ToolbarModeName } from 'lib/toolbar'
import { quaternionFromUpNForward } from 'clientSideScene/helpers'
import { Vector3 } from 'three'
import { MachineManager } from 'components/MachineManagerProvider'
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
import { addShell } from 'lang/modifyAst/addShell'
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
import { KclCommandValue } from 'lib/commandTypes'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
export const MODELING_PERSIST_KEY = 'MODELING_PERSIST_KEY'
export type SetSelections =
| {
selectionType: 'singleCodeCursor'
selection?: Selection
}
| {
selectionType: 'axisSelection'
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
selection: Axis
}
| {
selectionType: 'defaultPlaneSelection'
selection: DefaultPlaneSelection
}
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
| {
selectionType: 'completeSelection'
selection: Selections
updatedPathToNode?: PathToNode
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
}
| {
selectionType: 'mirrorCodeMirrorSelections'
selection: Selections
}
export type MouseState =
| {
type: 'idle'
}
| {
type: 'isHovering'
on: any
}
| {
type: 'isDragging'
on: any
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
| {
type: 'timeoutEnd'
pathToNodeString: string
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
export interface SketchDetails {
sketchPathToNode: PathToNode
zAxis: [number, number, number]
yAxis: [number, number, number]
origin: [number, number, number]
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
export interface SegmentOverlay {
windowCoords: Coords2d
angle: number
group: any
pathToNode: PathToNode
visible: boolean
}
export interface SegmentOverlays {
[pathToNodeString: string]: SegmentOverlay
}
export interface EdgeCutInfo {
type: 'edgeCut'
tagName: string
subType: 'base' | 'opposite' | 'adjacent'
}
export interface CapInfo {
type: 'cap'
subType: 'start' | 'end'
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
export type ExtrudeFacePlane = {
type: 'extrudeFace'
position: [number, number, number]
sketchPathToNode: PathToNode
extrudePathToNode: PathToNode
faceInfo:
| {
type: 'wall'
}
| CapInfo
| EdgeCutInfo
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
faceId: string
zAxis: [number, number, number]
yAxis: [number, number, number]
}
export type DefaultPlane = {
type: 'defaultPlane'
plane: DefaultPlaneStr
planeId: string
zAxis: [number, number, number]
yAxis: [number, number, number]
}
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
export type OffsetPlane = {
type: 'offsetPlane'
position: [number, number, number]
planeId: string
pathToNode: PathToNode
zAxis: [number, number, number]
yAxis: [number, number, number]
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
export type SegmentOverlayPayload =
| {
type: 'set-one'
pathToNodeString: string
seg: SegmentOverlay
}
| {
type: 'delete-one'
pathToNodeString: string
}
| { type: 'clear' }
| {
type: 'set-many'
overlays: SegmentOverlays
}
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
export interface Store {
videoElement?: HTMLVideoElement
openPanes: SidebarType[]
}
export type SketchTool =
| 'line'
| 'tangentialArc'
| 'rectangle'
| 'center rectangle'
| 'circle'
| 'none'
export type ModelingMachineEvent =
| {
type: 'Enter sketch'
data?: {
forceNewSketch?: boolean
}
}
SketchOnFace UI (#1664) * always enter edit mode * initial blocking of extra code-mirror updates * dry out code * rejig selections * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * clean up * stream clean up * update export * sketch mode can be entered and exited for extrude faces But has bugs * startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit 406fca4c553681fbad882167a9c1ab380af52899. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * remove comment * add sketch on face e2e test * tweenCamToNegYAxis should respect reduced motion * initial sketch on face working with test * remove temporary toolbar button and xState flow * un-used vars * snapshot test tweak * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * type tidy up * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit c39b8ebf954fa63556e21da081031b8acd77c909. * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit fecf6f490af6ced34959653984108958fb504f82. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * rename * sketch on sketch on sketch * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * typo * startSketchOn Endcaps end works, start is weird still * clear selections for entity_ids that are not recognised * fix sketch on end cap of second order extrustion * tiny clean up * fix sketch on close segment/face * clean up 'lastCodeMirrorSelectionUpdatedFromScene' * add code mode test for sketchOnExtrudedFace * make end cap selection more robust * update js artifacts for extrudes * update kcl docs * clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-22 10:23:04 +11:00
| { type: 'Sketch On Face' }
| {
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
type: 'Select default plane'
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
data: DefaultPlane | ExtrudeFacePlane | OffsetPlane
}
| {
type: 'Set selection'
data: SetSelections
}
| {
type: 'Delete selection'
}
| { type: 'Sketch no face' }
| { type: 'Toggle gui mode' }
| { type: 'Cancel' }
| { type: 'CancelSketch' }
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
| { type: 'Add start point' }
| { type: 'Make segment horizontal' }
| { type: 'Make segment vertical' }
| { type: 'Constrain horizontal distance' }
| { type: 'Constrain ABS X' }
| { type: 'Constrain ABS Y' }
| { type: 'Constrain vertical distance' }
| { type: 'Constrain angle' }
| { type: 'Constrain perpendicular distance' }
| { type: 'Constrain horizontally align' }
| { type: 'Constrain vertically align' }
| { type: 'Constrain snap to X' }
| { type: 'Constrain snap to Y' }
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
| {
type: 'Constrain length'
data: ModelingCommandSchema['Constrain length']
}
| { type: 'Constrain equal length' }
| { type: 'Constrain parallel' }
| { type: 'Constrain remove constraints'; data?: PathToNode }
| { type: 'Re-execute' }
| { type: 'Export'; data: ModelingCommandSchema['Export'] }
Add print button (#3133) * add print button Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * generate more types Signed-off-by: Jess Frazelle <github@jessfraz.com> * add a github action to generate machine api-types Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * actually print on the real machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * get the current machine Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * know when error Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * add fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * empty * update machine api Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * empty * New machine-api types * emptuy * no circular deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * New machine-api types * remove recursive dep Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-08-04 00:51:30 -04:00
| { type: 'Make'; data: ModelingCommandSchema['Make'] }
Command bar: add extrude command, nonlinear editing, etc (#1204) * Tweak toaster look and feel * Add icons, tweak plus icon names * Rename commandBarMeta to commandBarConfig * Refactor command bar, add support for icons * Create a tailwind plugin for aria-pressed button state * Remove overlay from behind command bar * Clean up toolbar * Button and other style tweaks * Icon tweaks follow-up: make old icons work with new sizing * Delete unused static icons * More CSS tweaks * Small CSS tweak to project sidebar * Add command bar E2E test * fumpt * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix typo in a comment * Fix icon padding (built version only) * Update onboarding and warning banner icons padding * Misc minor style fixes * Get Extrude opening and canceling from command bar * Iconography tweaks * Get extrude kind of working * Refactor command bar config types and organization * Move command bar configs to be co-located with each other * Start building a state machine for the command bar * Start converting command bar to state machine * Add support for multiple args, confirmation step * Submission behavior, hotkeys, code organization * Add new test for extruding from command bar * Polish step back and selection hotkeys, CSS tweaks * Loading style tweaks * Validate selection inputs, polish UX of args re-editing * Prevent submission with multiple selection on singlular arg * Remove stray console logs * Tweak test, CSS nit, remove extrude "result" argument * Fix linting warnings * Show Ctrl+/ instead of ⌘K on all platforms but Mac * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add "Enter sketch" to command bar * fix command bar test * Fix flaky cmd bar extrude test by waiting for engine select response * Cover both button labels '⌘K' and 'Ctrl+/' in test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:49:01 -05:00
| { type: 'Extrude'; data?: ModelingCommandSchema['Extrude'] }
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
| { type: 'Loft'; data?: ModelingCommandSchema['Loft'] }
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
| { type: 'Shell'; data?: ModelingCommandSchema['Shell'] }
| { type: 'Revolve'; data?: ModelingCommandSchema['Revolve'] }
| { type: 'Fillet'; data?: ModelingCommandSchema['Fillet'] }
| { type: 'Offset plane'; data: ModelingCommandSchema['Offset plane'] }
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
| { type: 'Text-to-CAD'; data: ModelingCommandSchema['Text-to-CAD'] }
| {
type: 'Add rectangle origin'
data: [x: number, y: number]
}
| {
type: 'Add center rectangle origin'
data: [x: number, y: number]
}
| {
type: 'Add circle origin'
data: [x: number, y: number]
}
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
| {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
type: 'xstate.done.actor.animate-to-face'
output: SketchDetails
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
| { type: 'xstate.done.actor.animate-to-sketch'; output: SketchDetails }
| { type: `xstate.done.actor.do-constrain${string}`; output: SetSelections }
| { type: 'Set mouse state'; data: MouseState }
| { type: 'Set context'; data: Partial<Store> }
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
| {
type: 'Set Segment Overlays'
data: SegmentOverlayPayload
}
| {
type: 'Center camera on selection'
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
| {
type: 'Delete segment'
data: PathToNode
}
| {
type: 'code edit during sketch'
}
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
| {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
type: 'Constrain with named value'
data: ModelingCommandSchema['Constrain with named value']
Symbols overlay (#2033) * start of overlay work * add new icons * add constraint symbols * add three dots * add primary colours * refactor how we get constraint info for overlays * refactor how we get constraint info for overlays * get symbols working for tangential arc too * extra data on constraint info * add initial delete * fix types and circular dep issue after rebase * fix quirk with horz vert line overlays * fix setup and tear down of overlays * remove overlays that are too small * throttle overlay updates and prove tests selecting html instead of hardcoded px coords * initial show overaly on segment hover * remove overlays when tool is equipped * dounce overlay updates * tsc * make higlighting robust to small changes in source ranges * replace with variable for unconstrained values, and improve styles for popover * background tweak * make overlays unconstrain inputs * fix small regression * write query for finding related tag references * make delete segment safe * typo * un used imports * test deleteSegmentFromPipeExpression * add getConstraintInfo test * test removeSingleConstraintInfo * more tests * tsc * add tests for overlay buttons * rename tests * fmt * better naming structure * more reliablity * more test tweaks * fix selection test * add delete segments with overlays tests * dependant tag tests for segment delet * typo * test clean up * fix some perf issus * clean up * clean up * make things a little more dry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Make constraint hover popovers readable on light mode * Touch up the new variable dialog * Little touch-up to three-dot menu style * fix highlight issue * fmt * use optional chain * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)" This reverts commit be3d61e4a303b0d9a792dddbfe8430cc58d46451. * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * disable var panel in sketch mode * fix overlay tests after mergi in main * test tweak * try fix ubuntu * fmt * more test tweaks * tweak * tweaks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@kittycad.io>
2024-05-24 20:54:42 +10:00
}
| {
type: 'change tool'
data: {
tool: SketchTool
}
}
| { type: 'Finish rectangle' }
| { type: 'Finish center rectangle' }
| { type: 'Finish circle' }
| { type: 'Artifact graph populated' }
| { type: 'Artifact graph emptied' }
Client sketch scene (#1271) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happ * better error msg * fix control point issue * basic code gen working for tangentialArc * partical fix for move with arcs * tangential arc move * fix * make eslint rules less annoying * inital refactor of some xstate stuff * more old tangential arc clean up stuff * more tweaks * add testing * tweak xstate inspect * temp remove test * update formating for less conflicts * fix state machine layout after merge * shrug, something weird with xstate typegen * renaming some xstate events * tweak numbers to make CI playwright happ * CI hacks * more CI hacks * more CI hacks * new hack strategy * run tests agian * make cmd bar less flaky * ci hacks * CI hacks * CI hacks * CI hacks * clean up * fix * still have constraint stuff to deal with * progress on move rules * update source ranges after no execute code-mod * typo * mvp working * hide show sketch overlay * match scaling * update arrow head style * animate line tool * bypass xstate for animations, much smoother * add new segment working with refactor needed for setup paper sketch * refactor setup paper sketch * tangantialArcTo drag animations working * tangential arc polish * cargo fmt * clippy * more clippy * mock canvas * last of clippy? * typo * more clippy stuff * move util function so they are shareable with typescript * migrate a bunch to rust and only rust * add arc center point for draft tangential ac * clippy tweak * delete uneeded test * Rough start to scaling arrow heads. The tangent arrow heads are basically nuked and replaced while the straight line sections are just rotated and repositioned, this means they miss out on updating scaling number after a screen size changes. Needs fixing * fix bug with tool tips * fix draft line start position Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data * some progress with pan maybe * fmt * inital camera sync working For perspective camera at least * change three.js to use z-up * add grid * orthographic camera working with polish items TODO * fix zoom level when swapping camera * fix up camera/orbit changing on cam change (pan wasn't being respected) * tidy up * use orbit target instead of assuming scene center * dynamic fov working * animate orthographic to perspective and reverse * fix import * temp fix for batch commands * initial client side scene sketch working * remove hover log * FOV adjust fix * fix comment * tear down sketch and small tweaks * some progress with camera tweening * combine dollyZoom engine commands see https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1 and https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1 * make tests happy (mocks) * fix tween to vertical/camera-up bug * tween to each axis with hacky solutions in there * fix startSketchOn planes * tidy startSketchOn * tweening okay for now I think * get sketching on default planes working * allow editing on all default planes * clean up enter and exit sketch logic * tidy * tidy * remove more default plane stuff * start of draft line * remove some annoying parts of the paper.js implementation * fix drag than equip line bug * comment * don't animate on skech tear down since it's used for draft line * remove more default plane shit * style draft line * refine dashed line * draft line set up and tear down mostly happy * add on click logic ready for draft lines * sketch mode with drag and draft mode working solidly now, straight segments only * default planes match colors, hover and select still TODO * hover and click logic working for default planes Now just need the code mode to fire to 'startSketchOn(...)' * select default planes * remove some logs * fix update infinite loop * start of orbitControls port to Franks control guards * hiding scenes at different times * scene hide on camera move should be respected by scroll zoom * basic hover working * Hook up user camera settings to ClientSideScene (#1334) * Refactor to not import utilities from Router.tsx * Stop tracking changes or formatting *.typegen.ts * Hook up cameraControls to ClientSideScene * Remove camera controls toggle from temp debug panel --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> * add select segment moves cursor * highlight segments yellow on hover * cursor ranges effect 2d line colors * fix constrainst i.e. make sure the sketch is rejiged * selecting nothing should remove selections * remove hardcoded strings * update get_tangential_arc_to_info rust util * initial drawing of tangential arcs in client scene * fix tangentialArc arrow head direction * correct userData types for tangential arcs * get tangential arc updates working Doesn't include draging the head of the tangential arc itself yet * spot of clean up * make selections work with tangential arcs * get draft tangential segment animated * fix initial click weirdness for adding new tangential line * couple tweaks * add grace pixels /threshold to raycast * redo arc dashes so that they spawn from the ccenter of the arc * fix multi drag bug * fmt * add temp solution for close * add default axis hover colors, still needs select logic * selection of axis works, just with out selection color * get axis selection colors working * fix outdate source ranges after drag problem * update moreNodePathFromSourceRange * fix ts-rs issue/workaround * fix default plane weirdness * fix tangential arc rounding issue * review clean up part 1 * review clean up part 2 Big state-diagram cull * clippy * typo * clippy * fix xstate types with typegen * fix types * clippy * catch error * fix test import issue Not sure exactly what was happening but guessing circular import that vite didn't like * add axis/plane info to sketch group tests * case changes because of rs-ts bug, can probably revert this later * start of playwright test fixes * reduce geo complexity for straight segments * fix cam adjust tests * Revert "Clean up vite build warnings (#1332)" This reverts commit c1f661ab5254458c3e9fdb396a31860a22c790f1. * selection e2e test fixed< * remove camToggle to allow playwright tests to pass * remove drag test too brittle and needs to be redone from the ground up anyway * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fix last test * clean up part 3 * clean up part 4 * clean up part 5 * clean up sketch enter exit logic * fix engine side selections * default plane should not be selected form 'onDragEnd' i.e. rotating the camera should not mean the user acidently selects a plane * clean up state diagram around animating to sketch mode Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time * add test for multiple sketches * typo * make highlight more robust * type tweak * scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size * Jess's advice * tsc and fmt * clean up part 6 remove integer from xstate names * clean up part 7 * integrate sequency in to camera moves * fix tests * update snapshot e2e * small snapshot change * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * trigger ci * Fix HomeLoaderData types * update std stuff * update kittycad rs client lib --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-11 12:59:00 +11:00
export type MoveDesc = { line: number; snippet: string }
export const PERSIST_MODELING_CONTEXT = 'persistModelingContext'
interface PersistedModelingContext {
openPanes: Store['openPanes']
}
type PersistedKeys = keyof PersistedModelingContext
export const PersistedValues: PersistedKeys[] = ['openPanes']
export const getPersistedContext = (): Partial<PersistedModelingContext> => {
const c = (typeof window !== 'undefined' &&
JSON.parse(localStorage.getItem(PERSIST_MODELING_CONTEXT) || '{}')) || {
openPanes: ['code'],
}
return c
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
export interface ModelingMachineContext {
currentMode: ToolbarModeName
currentTool: SketchTool
machineManager: MachineManager
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
selection: string[]
selectionRanges: Selections
sketchDetails: SketchDetails | null
sketchPlaneId: string
sketchEnginePathId: string
moveDescs: MoveDesc[]
mouseState: MouseState
segmentOverlays: SegmentOverlays
segmentHoverMap: { [pathToNodeString: string]: number }
store: Store
}
export const modelingMachineDefaultContext: ModelingMachineContext = {
currentMode: 'modeling',
currentTool: 'none',
machineManager: {
machines: [],
machineApiIp: null,
currentMachine: null,
setCurrentMachine: () => {},
noMachinesReason: () => undefined,
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
selection: [],
selectionRanges: {
otherSelections: [],
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
graphSelections: [],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
sketchDetails: {
sketchPathToNode: [],
zAxis: [0, 0, 1],
yAxis: [0, 1, 0],
origin: [0, 0, 0],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
sketchPlaneId: '',
sketchEnginePathId: '',
moveDescs: [],
mouseState: { type: 'idle' },
segmentOverlays: {},
segmentHoverMap: {},
store: {
openPanes: getPersistedContext().openPanes || ['code'],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
export const modelingMachine = setup({
types: {
context: {} as ModelingMachineContext,
events: {} as ModelingMachineEvent,
input: {} as ModelingMachineContext,
},
guards: {
'Selection is on face': () => false,
'has valid sweep selection': () => false,
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
'has valid revolve selection': () => false,
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
'has valid loft selection': () => false,
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
'has valid shell selection': () => false,
'has valid edge treatment selection': () => false,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Has exportable geometry': () => false,
'has valid selection for deletion': () => false,
'has made first point': ({ context }) => {
if (!context.sketchDetails?.sketchPathToNode) return false
const variableDeclaration = getNodeFromPath<VariableDeclarator>(
kclManager.ast,
context.sketchDetails.sketchPathToNode,
'VariableDeclarator'
)
if (err(variableDeclaration)) return false
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
const pipeExpression = variableDeclaration.node.init
if (pipeExpression.type !== 'PipeExpression') return false
const hasStartSketchOn = pipeExpression.body.some(
(item) =>
item.type === 'CallExpression' && item.callee.name === 'startSketchOn'
)
return hasStartSketchOn && pipeExpression.body.length > 1
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'is editing existing sketch': ({ context: { sketchDetails } }) =>
isEditingExistingSketch({ sketchDetails }),
'Can make selection horizontal': ({ context: { selectionRanges } }) => {
const info = horzVertInfo(selectionRanges, 'horizontal')
if (trap(info)) return false
return info.enabled
},
'Can make selection vertical': ({ context: { selectionRanges } }) => {
const info = horzVertInfo(selectionRanges, 'vertical')
if (trap(info)) return false
return info.enabled
},
'Can constrain horizontal distance': ({ context: { selectionRanges } }) => {
const info = horzVertDistanceInfo({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
constraint: 'setHorzDistance',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain vertical distance': ({ context: { selectionRanges } }) => {
const info = horzVertDistanceInfo({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
constraint: 'setVertDistance',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain ABS X': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const info = absDistanceInfo({
selectionRanges,
constraint: 'xAbs',
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(info)) return false
return info.enabled
},
'Can constrain ABS Y': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const info = absDistanceInfo({
selectionRanges,
constraint: 'yAbs',
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(info)) return false
return info.enabled
},
'Can constrain angle': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const angleBetween = angleBetweenInfo({
selectionRanges,
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(angleBetween)) return false
const angleLength = angleLengthInfo({
selectionRanges,
angleOrLength: 'setAngle',
})
if (trap(angleLength)) return false
return angleBetween.enabled || angleLength.enabled
},
'Can constrain length': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const angleLength = angleLengthInfo({
selectionRanges,
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(angleLength)) return false
return angleLength.enabled
},
'Can constrain perpendicular distance': ({
context: { selectionRanges },
}) => {
const info = intersectInfo({ selectionRanges })
if (trap(info)) return false
return info.enabled
},
'Can constrain horizontally align': ({ context: { selectionRanges } }) => {
const info = horzVertDistanceInfo({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
constraint: 'setHorzDistance',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain vertically align': ({ context: { selectionRanges } }) => {
const info = horzVertDistanceInfo({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
constraint: 'setHorzDistance',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain snap to X': ({ context: { selectionRanges } }) => {
const info = absDistanceInfo({
selectionRanges,
constraint: 'snapToXAxis',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain snap to Y': ({ context: { selectionRanges } }) => {
const info = absDistanceInfo({
selectionRanges,
constraint: 'snapToYAxis',
})
if (trap(info)) return false
return info.enabled
},
'Can constrain equal length': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const info = setEqualLengthInfo({
selectionRanges,
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (trap(info)) return false
return info.enabled
},
'Can canstrain parallel': ({ context: { selectionRanges } }) => {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
const info = equalAngleInfo({
selectionRanges,
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (err(info)) return false
return info.enabled
},
'Can constrain remove constraints': ({
context: { selectionRanges },
event,
}) => {
if (event.type !== 'Constrain remove constraints') return false
const info = removeConstrainingValuesInfo({
selectionRanges,
pathToNodes: event.data && [event.data],
})
if (trap(info)) return false
return info.enabled
},
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
'Can convert to named value': ({ event }) => {
if (event.type !== 'Constrain with named value') return false
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (!event.data) return false
const ast = parse(recast(kclManager.ast))
if (err(ast) || !ast.program || ast.errors.length > 0) return false
const isSafeRetVal = isNodeSafeToReplacePath(
ast.program,
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
event.data.currentValue.pathToNode
)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (err(isSafeRetVal)) return false
return isSafeRetVal.isSafe
},
'next is tangential arc': ({ context: { sketchDetails, currentTool } }) =>
currentTool === 'tangentialArc' &&
isEditingExistingSketch({ sketchDetails }),
'next is rectangle': ({ context: { sketchDetails, currentTool } }) =>
currentTool === 'rectangle' &&
canRectangleOrCircleTool({ sketchDetails }),
'next is center rectangle': ({ context: { sketchDetails, currentTool } }) =>
currentTool === 'center rectangle' &&
canRectangleOrCircleTool({ sketchDetails }),
'next is circle': ({ context: { sketchDetails, currentTool } }) =>
currentTool === 'circle' && canRectangleOrCircleTool({ sketchDetails }),
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'next is line': ({ context }) => context.currentTool === 'line',
2024-09-11 06:09:39 +10:00
'next is none': ({ context }) => context.currentTool === 'none',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
// end guards
actions: {
'assign tool in context': assign({
currentTool: ({ event }) =>
'data' in event && event.data && 'tool' in event.data
? event.data.tool
: 'none',
}),
'reset selections': assign({
selectionRanges: { graphSelections: [], otherSelections: [] },
}),
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'enter sketching mode': assign({ currentMode: 'sketching' }),
'enter modeling mode': assign({ currentMode: 'modeling' }),
'set sketchMetadata from pathToNode': assign(
({ context: { sketchDetails } }) => {
if (!sketchDetails?.sketchPathToNode || !sketchDetails) return {}
return {
sketchDetails: {
...sketchDetails,
sketchPathToNode: sketchDetails.sketchPathToNode,
Text-to-CAD with alpha model (might have issues) integration (#3299) * Add close dismiss button to Infinite duration non-loading toasts * Add text-to-cad icon candidates * Add a way to silently create files * Add text-to-cad command with mock backend * add the actual endpoint Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix the response Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * Add `credentials: include` * add headers Signed-off-by: Jess Frazelle <github@jessfraz.com> * Mostly working? Just getting CORS on desktop * Merge goof * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * create cross platform fetch; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * send the token; Signed-off-by: Jess Frazelle <github@jessfraz.com> * better names for files Signed-off-by: Jess Frazelle <github@jessfraz.com> * Commit broken THREEjs success toast * base64 decode Signed-off-by: Jess Frazelle <github@jessfraz.com> * send telemetry on reject / accept Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * basic tests; Signed-off-by: Jess Frazelle <github@jessfraz.com> * lego Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Get model stylized based on settings * Don't need automatic dismiss button for Infinity-duration toasts anymore * Stylize loaded model, add OrbitControls, polish button behavior * Allow user to retry prompt if one fails * Add an auto-grow textarea input type to the command bar, set text-to-cad to use it * Delete the created file in desktop if user rejects it * Submit with meta+Enter * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * add more tests and various fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Set `prompt` arg defaultValue to failed prompt value on retry * Add missing `awaits` to playwright tests to get them passing * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 14:26:44 -04:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
}
),
'hide default planes': () => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
kclManager.hidePlanes()
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'reset sketch metadata': assign({
sketchDetails: null,
sketchEnginePathId: '',
sketchPlaneId: '',
}),
'reset camera position': () => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'default_camera_look_at',
center: { x: 0, y: 0, z: 0 },
vantage: { x: 0, y: -1250, z: 580 },
up: { x: 0, y: 0, z: 1 },
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
})
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'set new sketch metadata': assign(({ event }) => {
if (
event.type !== 'xstate.done.actor.animate-to-sketch' &&
event.type !== 'xstate.done.actor.animate-to-face'
)
return {}
return {
sketchDetails: event.output,
}
}),
'AST extrude': ({ context: { store }, event }) => {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (event.type !== 'Extrude') return
;(async () => {
if (!event.data) return
const { selection, distance } = event.data
let ast = kclManager.ast
if (
'variableName' in distance &&
distance.variableName &&
distance.insertIndex !== undefined
) {
const newBody = [...ast.body]
newBody.splice(
distance.insertIndex,
0,
distance.variableDeclarationAst
)
ast.body = newBody
}
const pathToNode = getNodePathFromSourceRange(
ast,
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selection.graphSelections[0]?.codeRef.range
)
const extrudeSketchRes = extrudeSketch(
ast,
pathToNode,
false,
'variableName' in distance
? distance.variableIdentifierAst
: distance.valueAst
)
if (trap(extrudeSketchRes)) return
const { modifiedAst, pathToExtrudeArg } = extrudeSketchRes
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const updatedAst = await kclManager.updateAst(modifiedAst, true, {
focusPath: [pathToExtrudeArg],
zoomToFit: true,
zoomOnRangeAndType: {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
range: selection.graphSelections[0]?.codeRef.range,
type: 'path',
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
})
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
if (updatedAst?.selections) {
editorManager.selectRange(updatedAst?.selections)
}
})().catch(reportRejection)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'AST revolve': ({ context: { store }, event }) => {
if (event.type !== 'Revolve') return
;(async () => {
if (!event.data) return
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
const { selection, angle, axis } = event.data
let ast = kclManager.ast
if (
'variableName' in angle &&
angle.variableName &&
angle.insertIndex !== undefined
) {
const newBody = [...ast.body]
newBody.splice(angle.insertIndex, 0, angle.variableDeclarationAst)
ast.body = newBody
}
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
// This is the selection of the sketch that will be revolved
const pathToNode = getNodePathFromSourceRange(
ast,
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selection.graphSelections[0]?.codeRef.range
)
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
const revolveSketchRes = revolveSketch(
ast,
pathToNode,
false,
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
'variableName' in angle
? angle.variableIdentifierAst
: angle.valueAst,
axis
)
if (trap(revolveSketchRes)) return
const { modifiedAst, pathToRevolveArg } = revolveSketchRes
const updatedAst = await kclManager.updateAst(modifiedAst, true, {
focusPath: [pathToRevolveArg],
zoomToFit: true,
zoomOnRangeAndType: {
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
range: selection.graphSelections[0]?.codeRef.range,
type: 'path',
},
})
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
if (updatedAst?.selections) {
editorManager.selectRange(updatedAst?.selections)
}
})().catch(reportRejection)
},
'AST delete selection': ({ context: { selectionRanges } }) => {
;(async () => {
let ast = kclManager.ast
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const modifiedAst = await deleteFromSelection(
ast,
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges.graphSelections[0],
kclManager.programMemory,
getFaceDetails
)
if (err(modifiedAst)) return
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const testExecute = await executeAst({
ast: modifiedAst,
engineCommandManager,
start of cache: don't re-execute on whitespace / top level code comment changes (#4663) * start Signed-off-by: Jess Frazelle <github@jessfraz.com> working for whitespace Signed-off-by: Jess Frazelle <github@jessfraz.com> pull thru Signed-off-by: Jess Frazelle <github@jessfraz.com> fix wasm Signed-off-by: Jess Frazelle <github@jessfraz.com> pull thru to js start Signed-off-by: Jess Frazelle <github@jessfraz.com> actually use the cache in ts Signed-off-by: Jess Frazelle <github@jessfraz.com> rust owns clearing the scene Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> empty stupid log Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updatez Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> save the state Signed-off-by: Jess Frazelle <github@jessfraz.com> save the state Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the old memory Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup to use the old exec state Signed-off-by: Jess Frazelle <github@jessfraz.com> fices Signed-off-by: Jess Frazelle <github@jessfraz.com> updates; Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * rebase and compile Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * fix the lsp to use the cache Signed-off-by: Jess Frazelle <github@jessfraz.com> * add comment Signed-off-by: Jess Frazelle <github@jessfraz.com> * use a global static instead; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix rust test Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup more Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup the api even more Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * bust the cache on unit changes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * stupid codespell 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>
2024-12-05 19:51:06 -08:00
// We make sure to send an empty program memory to denote we mean mock mode.
programMemoryOverride: ProgramMemory.empty(),
})
if (testExecute.errors.length) {
toast.error('Unable to delete part')
return
}
await kclManager.updateAst(modifiedAst, true)
await codeManager.updateEditorWithAstAndWriteToFile(modifiedAst)
})().catch(reportRejection)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'AST fillet': ({ event }) => {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
if (event.type !== 'Fillet') return
if (!event.data) return
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
// Extract inputs
const ast = kclManager.ast
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const { selection, radius } = event.data
const parameters: FilletParameters = {
type: EdgeTreatmentType.Fillet,
radius,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
// Apply fillet to selection
const applyEdgeTreatmentToSelectionResult = applyEdgeTreatmentToSelection(
ast,
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
selection,
parameters
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
)
if (err(applyEdgeTreatmentToSelectionResult))
return applyEdgeTreatmentToSelectionResult
// eslint-disable-next-line @typescript-eslint/no-floating-promises
codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'set selection filter to curves only': () => {
;(async () => {
await engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'set_selection_filter',
filter: ['curve'],
},
})
})().catch(reportRejection)
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'setup client side sketch segments': ({
context: { sketchDetails, selectionRanges },
}) => {
if (!sketchDetails) return
;(async () => {
if (Object.keys(sceneEntitiesManager.activeSegments).length > 0) {
await sceneEntitiesManager.tearDownSketch({ removeAxis: false })
}
sceneInfra.resetMouseListeners()
await sceneEntitiesManager.setupSketch({
sketchPathToNode: sketchDetails?.sketchPathToNode || [],
forward: sketchDetails.zAxis,
up: sketchDetails.yAxis,
position: sketchDetails.origin,
maybeModdedAst: kclManager.ast,
selectionRanges,
})
sceneInfra.resetMouseListeners()
sceneEntitiesManager.setupSketchIdleCallbacks({
pathToNode: sketchDetails?.sketchPathToNode || [],
forward: sketchDetails.zAxis,
up: sketchDetails.yAxis,
position: sketchDetails.origin,
})
})().catch(reportRejection)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'tear down client sketch': () => {
if (sceneEntitiesManager.activeSegments) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
sceneEntitiesManager.tearDownSketch({ removeAxis: false })
}
},
'remove sketch grid': () => sceneEntitiesManager.removeSketchGrid(),
'set up draft line': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager
.setupDraftSegment(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
'line'
)
.then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'set up draft arc': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager
.setupDraftSegment(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
'tangentialArcTo'
)
.then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'listen for rectangle origin': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
sceneEntitiesManager.setupNoPointsListener({
sketchDetails,
afterClick: (args) => {
const twoD = args.intersectionPoint?.twoD
if (twoD) {
sceneInfra.modelingSend({
type: 'Add rectangle origin',
data: [twoD.x, twoD.y],
})
} else {
console.error('No intersection point found')
}
},
})
},
'listen for center rectangle origin': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
// setupNoPointsListener has the code for startProfileAt onClick
sceneEntitiesManager.setupNoPointsListener({
sketchDetails,
afterClick: (args) => {
const twoD = args.intersectionPoint?.twoD
if (twoD) {
sceneInfra.modelingSend({
type: 'Add center rectangle origin',
data: [twoD.x, twoD.y],
})
} else {
console.error('No intersection point found')
}
},
})
},
'listen for circle origin': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
const quaternion = quaternionFromUpNForward(
new Vector3(...sketchDetails.yAxis),
new Vector3(...sketchDetails.zAxis)
)
// Position the click raycast plane
if (sceneEntitiesManager.intersectionPlane) {
sceneEntitiesManager.intersectionPlane.setRotationFromQuaternion(
quaternion
)
sceneEntitiesManager.intersectionPlane.position.copy(
new Vector3(...(sketchDetails?.origin || [0, 0, 0]))
)
}
sceneInfra.setCallbacks({
onClick: (args) => {
if (!args) return
if (args.mouseEvent.which !== 1) return
const { intersectionPoint } = args
if (!intersectionPoint?.twoD || !sketchDetails?.sketchPathToNode)
return
const twoD = args.intersectionPoint?.twoD
if (twoD) {
sceneInfra.modelingSend({
type: 'Add circle origin',
data: [twoD.x, twoD.y],
})
} else {
console.error('No intersection point found')
}
},
})
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'set up draft rectangle': ({ context: { sketchDetails }, event }) => {
if (event.type !== 'Add rectangle origin') return
if (!sketchDetails || !event.data) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager
.setupDraftRectangle(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
event.data
)
.then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'set up draft center rectangle': ({
context: { sketchDetails },
event,
}) => {
if (event.type !== 'Add center rectangle origin') return
if (!sketchDetails || !event.data) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager.setupDraftCenterRectangle(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
event.data
)
},
'set up draft circle': ({ context: { sketchDetails }, event }) => {
if (event.type !== 'Add circle origin') return
if (!sketchDetails || !event.data) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager
.setupDraftCircle(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
event.data
)
.then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
})
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'set up draft line without teardown': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
sceneEntitiesManager
.setupDraftSegment(
sketchDetails.sketchPathToNode,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin,
'line',
false
)
.then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
})
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'show default planes': () => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
kclManager.showPlanes()
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'setup noPoints onClick listener': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
sceneEntitiesManager.setupNoPointsListener({
sketchDetails,
afterClick: () => sceneInfra.modelingSend({ type: 'Add start point' }),
})
},
'add axis n grid': ({ context: { sketchDetails } }) => {
if (!sketchDetails) return
if (localStorage.getItem('disableAxis')) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
sceneEntitiesManager.createSketchAxis(
sketchDetails.sketchPathToNode || [],
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
// eslint-disable-next-line @typescript-eslint/no-floating-promises
codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'reset client scene mouse handlers': () => {
// when not in sketch mode we don't need any mouse listeners
// (note the orbit controls are always active though)
sceneInfra.resetMouseListeners()
},
'clientToEngine cam sync direction': () => {
sceneInfra.camControls.syncDirection = 'clientToEngine'
},
'engineToClient cam sync direction': () => {
sceneInfra.camControls.syncDirection = 'engineToClient'
},
/** TODO: this action is hiding unawaited asynchronous code */
'set selection filter to faces only': () => {
kclManager.setSelectionFilter(['face', 'object'])
},
/** TODO: this action is hiding unawaited asynchronous code */
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'set selection filter to defaults': () =>
kclManager.defaultSelectionFilter(),
'Delete segment': ({ context: { sketchDetails }, event }) => {
if (event.type !== 'Delete segment') return
if (!sketchDetails || !event.data) return
// eslint-disable-next-line @typescript-eslint/no-floating-promises
deleteSegment({
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
pathToNode: event.data,
sketchDetails,
}).then(() => {
return codeManager.updateEditorWithAstAndWriteToFile(kclManager.ast)
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
})
},
'Reset Segment Overlays': () => sceneEntitiesManager.resetOverlays(),
'Set context': assign({
store: ({ context: { store }, event }) => {
if (event.type !== 'Set context') return store
if (!event.data) return store
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
const result = {
...store,
...event.data,
}
const persistedContext: Partial<PersistedModelingContext> = {}
for (const key of PersistedValues) {
persistedContext[key] = result[key]
}
if (typeof window !== 'undefined') {
window.localStorage.setItem(
PERSIST_MODELING_CONTEXT,
JSON.stringify(persistedContext)
)
}
return result
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}),
Make: () => {},
'enable copilot': () => {},
'disable copilot': () => {},
'Set selection': () => {},
'Set mouse state': () => {},
'Set Segment Overlays': () => {},
'Center camera on selection': () => {},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'Engine export': () => {},
'Submit to Text-to-CAD API': () => {},
'Set sketchDetails': () => {},
'sketch exit execute': () => {},
xstate migration (#713) * Add basic Popover functionality * Fix up light mode of basic bar * Add support for 2D and 3D mode styling * Turn toolbar buttons back on * Remove ActionButton until after tool logic refactor * Add transitions * Add initial modeling machine This is not a full description of how the modelingMachine should work, but begins to replicate all of the features of our useStore in XState instead of zustand. * Add fillet tool flow * Refactor: break out engine manager setup into hook Preparing for making a wrapper component around the App that will manage the engine manager at the same level as the modelingMachine. * Create modeling provider, move engine management to it * Refactor: move other engine-related useEffect into hook * Add TS schema, selection actions to modelingMachine * Add barebones modeling machine to app Only implementing adding to code-based selections in the text editor so far * Update moved useEffect hook after merge * give myself reminder TODO * fix engineCommandManager waitForReady Promise * enable devtools * make utility class for handling default planes * progresson startNewSketch and EditSketch * add provider to tests * too large of a commit put all of the lang state into another singleton, but did lots of work on xstate too * fix edit sketch ast issue * re-execute on sketch exit * prettierignore xstate typegen file * add move tool button back in * handle mouse commands with xState states * fix move * remove old imports * big useStore delete * fix some destructuring bugs * start of constraint actions * add horizontal/vertical distance constraints * fix more destructuring errors * fix * add angle constaints * add align vertically/horizontally constraints * add length and equal length constraints * rename modal states to be more cmd bar friendly * add doesPipeHave query * add another query * add extrude states * state machine clean up * xstate layout tweak * make xstate types happy * Revamp cursor logic and place curors after ast mod * Xstate merge (#796) * turning back on all planes (#720) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix more tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix stdlib Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> compile Signed-off-by: Jess Frazelle <github@jessfraz.com> update sample code Signed-off-by: Jess Frazelle <github@jessfraz.com> re-enable the planes Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix all tests Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> boilerplate Signed-off-by: Jess Frazelle <github@jessfraz.com> Cut release v0.9.2 (#714) rust make default planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> use the planes from engine Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> negative args Signed-off-by: Jess Frazelle <github@jessfraz.com> diable camera Signed-off-by: Jess Frazelle <github@jessfraz.com> hide planes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updatress Signed-off-by: Jess Frazelle <github@jessfraz.com> fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Update src/hooks/useAppMode.ts Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> cleanups Signed-off-by: Jess Frazelle <github@jessfraz.com> Bump kittycad from 0.2.26 to 0.2.27 in /src-tauri (#726) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump tauri-plugin-fs-extra from `b04bde3` to `6c7a4c0` in /src-tauri (#725) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `b04bde3` to `6c7a4c0`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/b04bde3461066c709d6801cf9ca305cf889a8394...6c7a4c09847f9659f9393a1412fa59bebd7c2004) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump toml from 0.8.0 to 0.8.1 in /src-tauri (#724) Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.1. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.1) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump openapitor from `61a1605` to `d3e98c4` in /src/wasm-lib (#723) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `61a1605` to `d3e98c4`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/61a16059b3eaf8793a2a2e1edbc0d770f284fea3...d3e98c4ec0ff7c307d66378eab1c4630250ec210) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump kittycad from 0.2.26 to 0.2.27 in /src/wasm-lib (#722) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.26 to 0.2.27. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.26...v0.2.27) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump thiserror from 1.0.48 to 1.0.49 in /src/wasm-lib (#721) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.49. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.49) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump expectorate from 1.0.7 to 1.1.0 in /src/wasm-lib (#712) Bumps [expectorate](https://github.com/oxidecomputer/expectorate) from 1.0.7 to 1.1.0. - [Release notes](https://github.com/oxidecomputer/expectorate/releases) - [Commits](https://github.com/oxidecomputer/expectorate/compare/v1.0.7...v1.1.0) --- updated-dependencies: - dependency-name: expectorate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump clap from 4.4.4 to 4.4.5 in /src/wasm-lib (#711) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.5. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.4...v4.4.5) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> refactor cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> type improvements * use new sketchmode no camera Signed-off-by: Jess Frazelle <github@jessfraz.com> * js working better Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of negative planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tests and neg Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * images Signed-off-by: Jess Frazelle <github@jessfraz.com> * norma;s Signed-off-by: Jess Frazelle <github@jessfraz.com> * better initial load of planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * ts Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tsc Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix edit sketch Signed-off-by: Jess Frazelle <github@jessfraz.com> * add regression test for 2d solid issue Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * show planes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * canecel in progress Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix ci as well 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> * stopping point Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * refactor Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * it works Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Hide planes (#797) * hide planes in one go Signed-off-by: Jess Frazelle <github@jessfraz.com> * update hide; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> * make tsc happy * Make "Replay Onboarding" button available on home settings page (#804) * Fix unrelated bug, settings button in the home sidebar doesn't go to the home settings after my previous fixes to routes * Turn on "Replay Onboarding" button in home settings * Use ONBOARDING_PROJECT_NAME in both places * Fix formatting * Cut release v0.10.0 (#803) Co-authored-by: Frank Noirot <frank@kittycad.io> * Bump kittycad from 0.2.28 to 0.2.31 in /src-tauri (#798) Bumps [kittycad](https://github.com/KittyCAD/kittycad.rs) from 0.2.28 to 0.2.31. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/v0.2.28...v0.2.31) --- updated-dependencies: - dependency-name: kittycad dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump openapitor from `fa0345c` to `c122a9b` in /src/wasm-lib (#800) Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs) from `fa0345c` to `c122a9b`. - [Release notes](https://github.com/KittyCAD/kittycad.rs/releases) - [Commits](https://github.com/KittyCAD/kittycad.rs/compare/fa0345c514fcc9ae6cd74ae35c8e5c2800fec34f...c122a9b1d6afe51c25e545b5e0bbeb91d367e6d2) --- updated-dependencies: - dependency-name: openapitor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump syn from 2.0.37 to 2.0.38 in /src/wasm-lib (#801) Bumps [syn](https://github.com/dtolnay/syn) from 2.0.37 to 2.0.38. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.37...2.0.38) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump winnow from 0.5.15 to 0.5.16 in /src/wasm-lib (#799) Bumps [winnow](https://github.com/winnow-rs/winnow) from 0.5.15 to 0.5.16. - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16) --- updated-dependencies: - dependency-name: winnow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tauri-plugin-fs-extra from `fa32d1a` to `9f27e6e` in /src-tauri (#802) Bumps [tauri-plugin-fs-extra](https://github.com/tauri-apps/plugins-workspace) from `fa32d1a` to `9f27e6e`. - [Release notes](https://github.com/tauri-apps/plugins-workspace/releases) - [Commits](https://github.com/tauri-apps/plugins-workspace/compare/fa32d1afa97f52f74d814c5619b8d95da3268e3e...9f27e6e4415ddf6c40f846d50c0d95c768cded77) --- updated-dependencies: - dependency-name: tauri-plugin-fs-extra dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * better plane selection Signed-off-by: Jess Frazelle <github@jessfraz.com> * use the sketch plane id Signed-off-by: Jess Frazelle <github@jessfraz.com> * add todo w bug Signed-off-by: Jess Frazelle <github@jessfraz.com> * Improve Prop Typings for Modals. Remove instances of `any`. (#792) * Update typings for modals. Remove instances of `any` * Fix generic type for creating modals * cleanup other stuffs Signed-off-by: Jess Frazelle <github@jessfraz.com> * make plane id available when selecting default plane * few clean up things * change enter sketch action order to make sure plane id is available to 'enter edit mode' * Revert "Improve Prop Typings for Modals. Remove instances of `any`. (… (#813) Revert "Improve Prop Typings for Modals. Remove instances of `any`. (#792)" This reverts commit 629f326f4cdf13d83a62f471b4b9a40d3c3a2a88. * ffmpeg instructions (#814) * fix some tsc stuff * small tweak --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com> * clean up * fix test and tsc * remove one more thing from useStore * tweak state digrame layout * fmt --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Frank Johnson <frankjohnson1993@gmail.com> Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jason Rametta <rametta@outlook.com>
2023-10-11 13:36:54 +11:00
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
// end actions
actors: {
'do-constrain-remove-constraint': fromPromise(
async ({
input: { selectionRanges, sketchDetails, data },
}: {
input: Pick<
ModelingMachineContext,
'selectionRanges' | 'sketchDetails'
> & { data?: PathToNode }
}) => {
const constraint = applyRemoveConstrainingValues({
selectionRanges,
pathToNodes: data && [data],
})
if (trap(constraint)) return
const { pathToNodeMap } = constraint
if (!sketchDetails) return
let updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
pathToNodeMap[0],
constraint.modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
return {
selectionType: 'completeSelection',
selection: updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
),
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-horizontally': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintHorzVert(
selectionRanges,
'horizontal',
kclManager.ast,
kclManager.programMemory
)
if (trap(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails.sketchPathToNode,
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
return {
selectionType: 'completeSelection',
selection: updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
),
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-vertically': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintHorzVert(
selectionRanges,
'vertical',
kclManager.ast,
kclManager.programMemory
)
if (trap(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
return {
selectionType: 'completeSelection',
selection: updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
),
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-horizontally-align': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintHorzVertAlign({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
constraint: 'setVertDistance',
})
if (trap(constraint)) return
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-vertically-align': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintHorzVertAlign({
Selections Refactor (#4381) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * fix types after main merge * review tweaks * fix wall selection bug * Update src/lang/std/engineConnection.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * add franks TODO comment * fix type after main merge, plus a touch of clean up --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-21 15:04:30 +11:00
selectionRanges: selectionRanges,
constraint: 'setHorzDistance',
})
if (trap(constraint)) return
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-snap-to-x': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintAxisAlign({
selectionRanges,
constraint: 'snapToXAxis',
})
if (err(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-snap-to-y': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintAxisAlign({
selectionRanges,
constraint: 'snapToYAxis',
})
if (trap(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-parallel': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintEqualAngle({
selectionRanges,
})
if (trap(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) {
trap(new Error('No sketch details'))
return
}
const recastAst = parse(recast(modifiedAst))
if (err(recastAst) || !resultIsOk(recastAst)) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
recastAst.program,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'do-constrain-equal-length': fromPromise(
async ({
input: { selectionRanges, sketchDetails },
}: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
const constraint = applyConstraintEqualLength({
selectionRanges,
})
if (trap(constraint)) return false
const { modifiedAst, pathToNodeMap } = constraint
if (!sketchDetails) return
const updatedAst = await sceneEntitiesManager.updateAstAndRejigSketch(
sketchDetails?.sketchPathToNode || [],
modifiedAst,
sketchDetails.zAxis,
sketchDetails.yAxis,
sketchDetails.origin
)
if (trap(updatedAst, { suppress: true })) return
if (!updatedAst) return
await codeManager.updateEditorWithAstAndWriteToFile(updatedAst.newAst)
const updatedSelectionRanges = updateSelections(
pathToNodeMap,
selectionRanges,
updatedAst.newAst
)
return {
selectionType: 'completeSelection',
selection: updatedSelectionRanges,
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
),
'Get vertical info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
return {} as SetSelections
}
),
'Get ABS X info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
return {} as SetSelections
}
),
'Get ABS Y info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
return {} as SetSelections
}
),
'Get angle info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
return {} as SetSelections
}
),
'Get perpendicular distance info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'selectionRanges' | 'sketchDetails'>
}) => {
return {} as SetSelections
}
),
'AST-undo-startSketchOn': fromPromise(
async (_: { input: Pick<ModelingMachineContext, 'sketchDetails'> }) => {
return undefined
}
),
'animate-to-face': fromPromise(
Show offset planes in the scene, let user select them (#4481) * Update offset_plane to actually create and show the plane in-engine * Fix broken ability to use offsetPlanes in startSketchOn * Make the newly-visible offset planes usable for sketching via UI * Add a playwright test for sketching on an offset plane via point-and-click * cargo clippy & cargo fmt * Make `PlaneData` the first item of `SketchData` so autocomplete continues to work well for `startSketchOn` * @nadr0 feedback re: `offsetIndex` * From @jtran: "Need to call the ID generator so that IDs are stable." * More feedback from @jtran and fix incomplete use of `id_generator` in last commit * Oops I missed saving `isPathToNodeNumber` earlier 🤦🏻 * Make the distinction between `Plane` and `PlaneOrientationData` more clear per @nadr0 and @lf94's feedback * Make `newPathToNode` less hardcoded, per @lf94's feedback * Don't need to unbox and rebox `plane` * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Rearranging of enums and structs, but the offsetPlanes are still not used by their sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Revert all my little newtype fiddling it's a waste of time. * Update docs * cargo fmt * Remove log * Print the unexpected diagnostics * Undo renaming of `PlaneData` * Remove generated PlaneRientationData docs page * Redo doc generation after undoing `PlaneData` rename * Impl FromKclValue for the new plane datatypes * Clippy lint * When starting a sketch, only hide the plane if it's a custom plane * Fix FromKclValue and macro use since merge * Fix to not convert Plane to PlaneData * Make sure offset planes are `Custom` type * SketchData actually doesn't need to be in a certain order This avoids the autocompletion issue I was having. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2024-11-18 16:25:25 -05:00
async (_: { input?: ExtrudeFacePlane | DefaultPlane | OffsetPlane }) => {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return {} as
| undefined
| {
sketchPathToNode: PathToNode
zAxis: [number, number, number]
yAxis: [number, number, number]
origin: [number, number, number]
}
}
),
'animate-to-sketch': fromPromise(
async (_: { input: Pick<ModelingMachineContext, 'selectionRanges'> }) => {
return {} as {
sketchPathToNode: PathToNode
zAxis: [number, number, number]
yAxis: [number, number, number]
origin: [number, number, number]
}
}
),
'Get horizontal info': fromPromise(
async (_: {
input: Pick<ModelingMachineContext, 'sketchDetails' | 'selectionRanges'>
}) => {
return {} as SetSelections
}
),
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
astConstrainLength: fromPromise(
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
async (_: {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
input: Pick<
ModelingMachineContext,
'sketchDetails' | 'selectionRanges'
> & {
lengthValue?: KclCommandValue
}
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}) => {
return {} as SetSelections
}
),
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
'Apply named value constraint': fromPromise(
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
async (_: {
input: Pick<
ModelingMachineContext,
'sketchDetails' | 'selectionRanges'
> & {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
data?: ModelingCommandSchema['Constrain with named value']
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
}
}) => {
return {} as SetSelections
}
),
offsetPlaneAstMod: fromPromise(
async ({
input,
}: {
input: ModelingCommandSchema['Offset plane'] | undefined
}) => {
if (!input) return new Error('No input provided')
// Extract inputs
const ast = kclManager.ast
const { plane: selection, distance } = input
// Extract the default plane from selection
const plane = selection.otherSelections[0]
if (!(plane && plane instanceof Object && 'name' in plane))
return trap('No plane selected')
// Insert the distance variable if it exists
if (
'variableName' in distance &&
distance.variableName &&
distance.insertIndex !== undefined
) {
const newBody = [...ast.body]
newBody.splice(
distance.insertIndex,
0,
distance.variableDeclarationAst
)
ast.body = newBody
}
// Get the default plane name from the selection
const offsetPlaneResult = addOffsetPlane({
node: ast,
defaultPlane: plane.name,
offset:
'variableName' in distance
? distance.variableIdentifierAst
: distance.valueAst,
})
const updateAstResult = await kclManager.updateAst(
offsetPlaneResult.modifiedAst,
true,
{
focusPath: [offsetPlaneResult.pathToNode],
}
)
await codeManager.updateEditorWithAstAndWriteToFile(
updateAstResult.newAst
)
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
if (updateAstResult?.selections) {
editorManager.selectRange(updateAstResult?.selections)
}
}
),
loftAstMod: fromPromise(
async ({
input,
}: {
input: ModelingCommandSchema['Loft'] | undefined
}) => {
if (!input) return new Error('No input provided')
// Extract inputs
const ast = kclManager.ast
const { selection } = input
const declarators = selection.graphSelections.flatMap((s) => {
const path = getNodePathFromSourceRange(ast, s?.codeRef.range)
const nodeFromPath = getNodeFromPath<VariableDeclarator>(
ast,
path,
'VariableDeclarator'
)
return err(nodeFromPath) ? [] : nodeFromPath.node
})
// TODO: add better validation on selection
if (!(declarators && declarators.length > 1)) {
trap('Not enough sketches selected')
}
// Perform the loft
const loftSketchesRes = loftSketches(ast, declarators)
const updateAstResult = await kclManager.updateAst(
loftSketchesRes.modifiedAst,
true,
{
focusPath: [loftSketchesRes.pathToNode],
}
)
await codeManager.updateEditorWithAstAndWriteToFile(
updateAstResult.newAst
)
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
if (updateAstResult?.selections) {
editorManager.selectRange(updateAstResult?.selections)
}
}
),
shellAstMod: fromPromise(
async ({
input,
}: {
input: ModelingCommandSchema['Shell'] | undefined
}) => {
if (!input) {
return new Error('No input provided')
}
// Extract inputs
const ast = kclManager.ast
const { selection, thickness } = input
// Insert the thickness variable if it exists
if (
'variableName' in thickness &&
thickness.variableName &&
thickness.insertIndex !== undefined
) {
const newBody = [...ast.body]
newBody.splice(
thickness.insertIndex,
0,
thickness.variableDeclarationAst
)
ast.body = newBody
}
// Perform the shell op
const shellResult = addShell({
node: ast,
selection,
artifactGraph: engineCommandManager.artifactGraph,
thickness:
'variableName' in thickness
? thickness.variableIdentifierAst
: thickness.valueAst,
})
if (err(shellResult)) {
return err(shellResult)
}
const updateAstResult = await kclManager.updateAst(
shellResult.modifiedAst,
true,
{
focusPath: [shellResult.pathToNode],
}
)
await codeManager.updateEditorWithAstAndWriteToFile(
updateAstResult.newAst
)
if (updateAstResult?.selections) {
editorManager.selectRange(updateAstResult?.selections)
}
}
),
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
// end services
}).createMachine({
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
/** @xstate-layout N4IgpgJg5mDOIC5QFkD2EwBsCWA7KAxAMICGuAxlgNoAMAuoqAA6qzYAu2qujIAHogC0ANhoBWAHQAOAMwB2KQEY5AFgCcGqWqkAaEAE9Ew0RLEqa64TIBMKmTUXCAvk71oMOfAQDKYdgAJYLDByTm5aBiQQFjYwniiBBEEpYSkJOUUaOWsxeylrWzk9QwQClQkrVOsZNWExFItnVxB3LDxCXwCAW1QAVyDA9hJ2MAjeGI4ueNBE5KkaCWspZfMM+XE1YsQZMQWxNQtxao0ZeRc3dDavTv9ybhG+djGoibjeWZSZCRUxJa1flTCNTWLYIYS2CT2RSKdRyGhZawWc4tS6eDp+fy+KBdMC4AIAeQAbmAAE6YEj6WDPZisSbcd5CYHCSFqOQ1NSKWRiMRA0HqSTKblSX48+pKZGtNHEXEjEm3Eg4kkkfzcQLBUJTanRWlvKIlQQ86zSKwcmjCOS7FTLPSJGQpRQSTkHVkOLL7CWo9oSbAQTBgAgAUTxpMCAGs-OQABZa15TBlJHIO9QyYSZTm2YFiUHZNTpKQKfMKYQqRQ5D0eL0+v2B4Ny2Dh9hRqiKSI02JxhJCMp56xVRSs5Z1EEGIyp0zc6HFsRybQc8tXKDe33+gOPEm9DAxnUdmZCadGuTgqfwtQl06gwVpHaibTzApu+dopfVgBKYEJqEwxK37fpnaS04Or8+TzFaKgKDIF7CmkuxqDscFSHY1SPpWy4EAAYtgmB+k89DjNuf67gBbISKeyxmua9g0AUF4qOY6Q5FkMilnayHNJKqHVquLAkrhrbar+0z8HuqiQoo042OCNT2MOJSOPUiw0FoM6IjYGiKCh+DPv6yAkOGP50kJszTpIPxWqyvyiNykEjgg4mAhUqhWGaPzyKommLlW-oACLBCMap+hq4R4S8BFGSJXxKPCh5WNCoEXmoCkqNYcGHoiNDAnBHnaQQAAqYCPII7CoIIRAAILeQZupEQaokKNoig1HRMjJReLULFomb1DydEltlXkEPiABmQ1BAETDkrgowhW2hnxrVkg0PY052FokkqKCiLgtIsjmEpwr9o1-XLhIkY+mAAAKk1wAQZW8dgQ0kKE-hQEqTCRv4LBML05IjBAVU7sJSRWRUVpZOBFj5NkF4uZCqQKDCuSprYx1+hIsCRqgADuV1kDdd2cI9z2vSQ73+GAXRMJwkAA4RQMGto6QrdYcgZL2cKyYgpachUFiJcC7Nsk0FwVlp3gNlGxBkJQmDixG0YzQJc3-ol5TGCWCgZPUGSbLZpbVBUiJCzsBR1DI2Vy42kYEL5OFgGq2IyrT4V2T8EgufmLMHPeNn6tUkhLPsS21KzBT5hbEvW3cGDkxAHD+BAvQku0Yby878bQo1pHw8x4iZMWoKskayMaEtShWtYGnsZ6YuRxIltRgAkmhunhg7OJ4v4xL3eQJCYOn-6ZPs6Q1NOsj9rs060dy0gOIl4jjwcUgR-L9eR831at-bQSO53mPJwAXvcfcD0RmR2I6Zs7Ko+SAm1Zju+BR6pDCR4r1ba-yxv-pENwsDsEqPA-h97YCPniPuCdsD-2ltNfisY6aJEyAUUwpdzAQxqBaTaq1xyqByLBX4S135Rk-lbb+xA-4AJIEA7unBe6YEgdAigsD8KCQzktOQpgMr1AKIeHkvtEDVEcO7XsmRtAs0okQyMJCm5oV-rgf+gDcD+DKgAIW8P4AAGqfIGQ8vgaGSj8Hk5oMibQ0Bwn4+ZxBZCsPMOQkjpGRjIXIhRVClGqPUQATW0Yg8QXwZzLDguJaEOxQTMWYosFmT86gcjEEdauotFwNykUkpxFDFH+DIFAP03iuaZ1IuYbkwJGp1FZptMwuZDxWKWAiLI9iUmyLSa4-wfp8DsAVnAsKGch6kQKKcVkxiEKbWMA6FmjVkoaABCoOp68GnyMoUApgpJFm4DjuQH6JA5Rx0YZQHJCAzHux5BYew8g+kbVsoHDhBR0wsxvtyaZX9ZkuKASAsBQxsL6AyTgKAuBdmZHCSWX44ltD7SzHrIU6RWSh1ZjOOEdj4kLgcQ41Jcz0k0OwHQzAHy+7YG+b8iwHDZypgcLE-MNQLzGDSBlZQ1Q2SnLhSLBFSSkWPPmUo2AuBSb+GKpovFShpCIlyLURqGQFCbSUuUbIFoOR1HBMveFT4mX1OrM41lgQOVMC5agfwXjFbwJdpkPlVh7BWnkDkECm1+wLCsXUDK5p8zKHuaQll6SwAAEdegQJaVANpeLtpZCCUtVYNgzlyVDqRGwBRYlmn6cLFECTEVKp-o0hZGy+5+n7rqzpg8uGmFkC1Qc4FYIJQOI6aEp4Mp2ksFM+VXpFUzOVcmpRJIKaoGJLcRt7AqSZtYdm5Ql8OQpA5LUeQUESIksQmYXaCFHUyNfGAQQBUQi9BGL89q3w+acnElkCiMNELu1HrsFqjVuSxo4rXVeiaCDR3tpAeOidk74FTlbX50JyjB0sdRS0pYYYpgqDYY2dgRWnprokuul65E0M1V3DZ2ASAACNsnduVmfbmEThQzltfuUFJRg25g5KM9Q8wZLAfjXWh51YoyZPtsVT8uyCgQgzIhcChjZAXk5JIKwlcloImyFYexZUsZUICC84+9CtlDCYf4PAQ1UAEAgNwMA3pcAfnDBIGA7BBAifAZgQQ0nUB0aYu7JaMJ2FmB5Fg7aOxmP5H7Orfjgn45abeQwiTlApO4BkwQUkJJUAkgkBNYYMmSRdDU34TTvnQGid0x5-TSHqpAyNl8c0r7+y2NSCGgRBjTDJRFOYZi6X7NCa7qSWhEDxMwPc55+TU0lMqcU+pwQaK6HRZkwZ+YFRTxmEyNRZL2GBGSUhKzZQGQuQzjEIV+OTWytQNc-bPTXmSQ+b8wF9gQWQsNamzpvTbWHQplsFoJQjV+ybSWGrc0vxVB2iBNOCbAR3GaMq7J6rim8B1dCxp+DsBBB8Ba7FjpPaiKImFGJUlfwDjdVCfCNWyUj0msDfSuNjK64CaK-djRj2FtLf879Nb73BCfe+79trkhS6pmSr2HrfXSiJTSA0Me4lYk9Vu8otR2qMfPdq6gVTDWCf6CJ3FwGiQgflHw1aGVVpcihOhFa+E+Y+EtTJ8z+7HiMfed89jwLvn1thd5-z-7yGEtKUkPUOw5oDjpiWqErapgtakocKzLKNbz0fxR-HTJfp2cKc59znX+A-R65YQboXRvpBjzqP8cZuhzn7FzEhZK4IzQs3G070Dq9XcBHd3NmLmP1crdxzzv387tsC4QQIpSlzRDQQtFYOEVO8G5lTOU3IJ4Wr8aYBND5Xq2ntpRa49gcmveva54psq3hcqCDuL3vAggu-tMD-F4PshSJaFLGDWoSg6+StMEOAx3MJ5t47803E3qPqT6eXiHPy2cda4kKP8fZ-WUz+Pz6kvLthcVGnPtIjiVFBDOB44OiRGERWQZnRZEkZZVZdZTZGbCrebDnIfH3DTMAiA9FKAwQcrJhAPUKAHQ3cJRncQEUJQVMfhUoFIDhUlGoAAk4FmUApZXESA8kaA7ZLPTzNXK-TXYLPHZA+g1Axg9AmAzA4vfXBfMvPArdbkM1RwRqTaJQXMCg6VdQOCGglPRFAAGTwGo1QE-CvUjCo01Vo1f3jGqBZmzmMBSnakymEELj9XyCJTsEBBsDlQZQVTrnUKmn0MwAkEblwA4AIAM3EBZABE9lZDtGzANlUCUmLH2n7G0HsTcM0M-C8J8P72bGEMFzLyzhqFUjNwOxolslkD2FOHty4QtEIRUKZXiI8IkAADktULpUA8BO1boIAIBBgNlxoGi8Q6MSwHRshmJXJOtGhswzR3ZlBw8zAgRRBq1nDa1XCNCqjaj-B6jGjYApYmEM00jS87JUwOF6gORSw2Qlp5AqdLtSIGpOQUx-1alyi65vDfDdkFBFoDEWpbAzRlhf89Yk9s5EpYlpdet7E7iUiWx590iEB8gFg6JDwTZzQrQ2oWpFhPYMgxjzd7FcoqM8RYN6ENlyBNUdC9CaMNiQStiXiOFeF5gDgLR1gSCVJFJmJWYlIeEq4ZjndiFegVktVoFeIkl8RcAB8asECR8x9BA2T5NBBOT2
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
id: 'Modeling',
context: ({ input }) => ({
...modelingMachineDefaultContext,
...input,
}),
states: {
idle: {
on: {
'Enter sketch': [
{
target: 'animating to existing sketch',
guard: 'Selection is on face',
},
'Sketch no face',
],
Extrude: {
target: 'idle',
guard: 'has valid sweep selection',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
actions: ['AST extrude'],
reenter: false,
},
Revolve: {
target: 'idle',
Adding point and click revolve workflow for sketch and axis selection (#4687) * selection stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * trigger CI * fix bugs * some edge cut stuff * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch mode issues * fix more tests, selection in sketch related * more test fixing * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger ci * more sketch mode selection fixes * fix unit tests * rename function * remove .only * migrate a more selections types * migrate a more selections types * migrate a more selections types * lint * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad pathToNode issue * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * fix sketch on face * migrate a more selections types * migrate a more selections types * fix code selection of fillets * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * migrate a more selections types * fix bad path to node, looks like a race * migrate a more selections types * migrate a more selections types * fix cmd bar selections * fix cmd bar selections * fix display issues * feat: implementing axis selection for point and click revolve * feat: enforcing selection of 2 options for axis rotation * feat: added negative rotations for the revolve * fix: fmt, tsc fixes * migrate a more selections types * Revert "migrate a more selections types" This reverts commit 0d0e453bbbb82d10472b6c9e753c53c8b7e3609d. * migrate a more selections types * clean up1 * clean up 2 * chore: improving the copy after discussing with Frank * fix: merge main fixes * chore: was able to add a seg to a line. Does not check if one exists already * saving off some code * chore: moving revolveSketch into own file for readability, improving variable names instead of node1 * chore: renaming more variables for readability * chore: more renaming * fix: allows creating a custom rotation on axis * fix: added opposite edge logic and adj, need to error handle still * fix: use other import * feat: point and click on edges, crude implementation * feat: implemented toast message and returned error message from validation * fix: auto linter * fix: addressing tsc errors * fix: fighting typescript * fix: cleaning up PR * fix: trying to resolve more typescript issues * fix: save off tsc fixes * fix: adding comments * fix: resolving tsc errors * fix: tsc errors * fix: auto linter fixes and tsc fixes * fix:?? * fix: revolve ast works with declaration * fix: retry logic to make sure the disable dry run actually runs * fix: codespell typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-10 12:11:01 -05:00
guard: 'has valid revolve selection',
actions: ['AST revolve'],
reenter: false,
},
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
Loft: {
target: 'Applying loft',
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
guard: 'has valid loft selection',
reenter: true,
},
Shell: {
target: 'Applying shell',
guard: 'has valid shell selection',
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
reenter: true,
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
Fillet: {
target: 'idle',
guard: 'has valid edge treatment selection',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
actions: ['AST fillet'],
reenter: false,
},
Export: {
target: 'idle',
reenter: false,
guard: 'Has exportable geometry',
actions: 'Engine export',
},
Make: {
target: 'idle',
reenter: false,
guard: 'Has exportable geometry',
actions: 'Make',
},
'Delete selection': {
target: 'idle',
guard: 'has valid selection for deletion',
actions: ['AST delete selection'],
reenter: false,
},
'Text-to-CAD': {
target: 'idle',
reenter: false,
actions: ['Submit to Text-to-CAD API'],
},
'Offset plane': {
target: 'Applying offset plane',
reenter: true,
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
entry: 'reset client scene mouse handlers',
states: {
hidePlanes: {
on: {
'Artifact graph populated': 'showPlanes',
},
entry: 'hide default planes',
},
showPlanes: {
on: {
'Artifact graph emptied': 'hidePlanes',
},
entry: [
'show default planes',
'reset camera position',
'set selection filter to curves only',
],
description: `We want to disable selections and hover highlights here, because users can't do anything with that information until they actually add something to the scene. The planes are just for orientation here.`,
exit: 'set selection filter to defaults',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
},
initial: 'hidePlanes',
},
Sketch: {
states: {
SketchIdle: {
on: {
'Make segment vertical': {
guard: 'Can make selection vertical',
target: 'Await constrain vertically',
},
'Make segment horizontal': {
guard: 'Can make selection horizontal',
target: 'Await constrain horizontally',
},
'Constrain horizontal distance': {
target: 'Await horizontal distance info',
guard: 'Can constrain horizontal distance',
},
'Constrain vertical distance': {
target: 'Await vertical distance info',
guard: 'Can constrain vertical distance',
},
'Constrain ABS X': {
target: 'Await ABS X info',
guard: 'Can constrain ABS X',
},
'Constrain ABS Y': {
target: 'Await ABS Y info',
guard: 'Can constrain ABS Y',
},
'Constrain angle': {
target: 'Await angle info',
guard: 'Can constrain angle',
},
'Constrain length': {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
target: 'Apply length constraint',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
guard: 'Can constrain length',
},
'Constrain perpendicular distance': {
target: 'Await perpendicular distance info',
guard: 'Can constrain perpendicular distance',
},
'Constrain horizontally align': {
guard: 'Can constrain horizontally align',
target: 'Await constrain horizontally align',
},
'Constrain vertically align': {
guard: 'Can constrain vertically align',
target: 'Await constrain vertically align',
},
'Constrain snap to X': {
guard: 'Can constrain snap to X',
target: 'Await constrain snap to X',
},
'Constrain snap to Y': {
guard: 'Can constrain snap to Y',
target: 'Await constrain snap to Y',
},
'Constrain equal length': {
guard: 'Can constrain equal length',
target: 'Await constrain equal length',
},
'Constrain parallel': {
target: 'Await constrain parallel',
guard: 'Can canstrain parallel',
},
'Constrain remove constraints': {
guard: 'Can constrain remove constraints',
target: 'Await constrain remove constraints',
},
'Re-execute': {
target: 'SketchIdle',
reenter: false,
actions: ['set sketchMetadata from pathToNode'],
},
'code edit during sketch': 'clean slate',
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
'Constrain with named value': {
target: 'Converting to named value',
guard: 'Can convert to named value',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'change tool': {
target: 'Change Tool',
},
},
entry: ['setup client side sketch segments'],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'Await horizontal distance info': {
invoke: {
src: 'Get horizontal info',
id: 'get-horizontal-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Await vertical distance info': {
invoke: {
src: 'Get vertical info',
id: 'get-vertical-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Await ABS X info': {
invoke: {
src: 'Get ABS X info',
id: 'get-abs-x-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Await ABS Y info': {
invoke: {
src: 'Get ABS Y info',
id: 'get-abs-y-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Await angle info': {
invoke: {
src: 'Get angle info',
id: 'get-angle-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
'Apply length constraint': {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
invoke: {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
src: 'astConstrainLength',
id: 'AST-constrain-length',
input: ({ context: { selectionRanges, sketchDetails }, event }) => {
const data =
event.type === 'Constrain length' ? event.data : undefined
return {
selectionRanges,
sketchDetails,
lengthValue: data?.length,
}
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Await perpendicular distance info': {
invoke: {
src: 'Get perpendicular distance info',
id: 'get-perpendicular-distance-info',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
onError: 'SketchIdle',
},
},
'Line tool': {
exit: [],
states: {
Init: {
always: [
{
target: 'normal',
guard: 'has made first point',
actions: 'set up draft line',
},
'No Points',
],
},
normal: {},
'No Points': {
entry: 'setup noPoints onClick listener',
on: {
'Add start point': {
target: 'normal',
actions: 'set up draft line without teardown',
},
Cancel: '#Modeling.Sketch.undo startSketchOn',
},
},
},
initial: 'Init',
on: {
'change tool': {
target: 'Change Tool',
},
},
},
Init: {
always: [
{
target: 'SketchIdle',
guard: 'is editing existing sketch',
},
'Line tool',
],
},
'Tangential arc to': {
entry: 'set up draft arc',
on: {
'change tool': {
target: 'Change Tool',
},
},
},
'undo startSketchOn': {
invoke: {
src: 'AST-undo-startSketchOn',
id: 'AST-undo-startSketchOn',
input: ({ context: { sketchDetails } }) => ({ sketchDetails }),
onDone: {
target: '#Modeling.idle',
actions: 'enter modeling mode',
},
},
},
'Rectangle tool': {
entry: ['listen for rectangle origin'],
states: {
'Awaiting second corner': {
on: {
'Finish rectangle': 'Finished Rectangle',
},
},
'Awaiting origin': {
on: {
'Add rectangle origin': {
target: 'Awaiting second corner',
actions: 'set up draft rectangle',
},
},
},
'Finished Rectangle': {
always: '#Modeling.Sketch.SketchIdle',
},
},
initial: 'Awaiting origin',
on: {
'change tool': {
target: 'Change Tool',
},
},
},
'Center Rectangle tool': {
entry: ['listen for center rectangle origin'],
states: {
'Awaiting corner': {
on: {
'Finish center rectangle': 'Finished Center Rectangle',
},
},
'Awaiting origin': {
on: {
'Add center rectangle origin': {
target: 'Awaiting corner',
// TODO
actions: 'set up draft center rectangle',
},
},
},
'Finished Center Rectangle': {
always: '#Modeling.Sketch.SketchIdle',
},
},
initial: 'Awaiting origin',
on: {
'change tool': {
target: 'Change Tool',
},
},
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
'clean slate': {
always: 'SketchIdle',
},
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
'Converting to named value': {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
invoke: {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
src: 'Apply named value constraint',
id: 'astConstrainNamedValue',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
input: ({ context: { selectionRanges, sketchDetails }, event }) => {
Move `length` and `named value` constraint flows into command palette (#4675) * Extend KCL argument input * Migrate length constraint to be a command * Add ability for `kcl` arguments to provide an initial variable name * Move named variable flow into command palette * Fix one e2e test * Remove unwanted `ZERO` behavior when length constraint has no `variableName` * Fix issue with `getSelectionCountByType` with sketches not yet in artifactGraph * Update broken constraint tests * Look at this (photo)Graph *in the voice of Nickelback* * Fix segment overlays tests, which had out-of-date selectors * Return early from `useConvertToVariable` if no selectionRanges * Fixup for review comment from #4677 (#4696) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Invalidate nightly bucket files after publish (#4627) * Invalidate nightly bucket files after publish * Fix conflict resolution * Add some more warnings (#4697) * Add installation instructions for all platforms (#4592) * Add installation instructions for all platforms Fixes #4511 * Typo * Typo2 * Improve linux instructions, thanks @TomPridham Co-authored-by: Tom Pridham <pridham.tom@gmail.com> --------- Co-authored-by: Tom Pridham <pridham.tom@gmail.com> * Bump node to v22.12.0 (LTS) (#4706) * Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev> * More aggressive using of cache on engine settings changes (#4691) * move around the files for cache to better localtions Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ensure we can change the grid setting via the command bar Signed-off-by: Jess Frazelle <github@jessfraz.com> * pass thru all setttings Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwright test Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * emoty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix use of `as` --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: Tom Pridham <pridham.tom@gmail.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-12-09 16:43:58 -05:00
if (event.type !== 'Constrain with named value') {
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
return {
selectionRanges,
sketchDetails,
data: undefined,
}
}
return {
selectionRanges,
sketchDetails,
data: event.data,
}
},
onError: 'SketchIdle',
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
},
},
'Await constrain remove constraints': {
invoke: {
src: 'do-constrain-remove-constraint',
id: 'do-constrain-remove-constraint',
input: ({ context: { selectionRanges, sketchDetails }, event }) => {
return {
selectionRanges,
sketchDetails,
data:
event.type === 'Constrain remove constraints'
? event.data
: undefined,
}
},
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain horizontally': {
invoke: {
src: 'do-constrain-horizontally',
id: 'do-constrain-horizontally',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain vertically': {
invoke: {
src: 'do-constrain-vertically',
id: 'do-constrain-vertically',
input: ({ context: { selectionRanges, sketchDetails } }) => ({
selectionRanges,
sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain horizontally align': {
invoke: {
src: 'do-constrain-horizontally-align',
id: 'do-constrain-horizontally-align',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain vertically align': {
invoke: {
src: 'do-constrain-vertically-align',
id: 'do-constrain-vertically-align',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain snap to X': {
invoke: {
src: 'do-constrain-snap-to-x',
id: 'do-constrain-snap-to-x',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain snap to Y': {
invoke: {
src: 'do-constrain-snap-to-y',
id: 'do-constrain-snap-to-y',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain equal length': {
invoke: {
src: 'do-constrain-equal-length',
id: 'do-constrain-equal-length',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Await constrain parallel': {
invoke: {
src: 'do-constrain-parallel',
id: 'do-constrain-parallel',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'SketchIdle',
actions: 'Set selection',
},
},
},
'Change Tool': {
always: [
{
target: 'SketchIdle',
guard: 'next is none',
},
{
target: 'Line tool',
guard: 'next is line',
},
{
target: 'Rectangle tool',
guard: 'next is rectangle',
},
{
target: 'Tangential arc to',
guard: 'next is tangential arc',
},
{
target: 'Circle tool',
guard: 'next is circle',
},
{
target: 'Center Rectangle tool',
guard: 'next is center rectangle',
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
],
entry: ['assign tool in context', 'reset selections'],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'Circle tool': {
on: {
'change tool': 'Change Tool',
},
states: {
'Awaiting origin': {
on: {
'Add circle origin': {
target: 'Awaiting Radius',
actions: 'set up draft circle',
},
},
},
'Awaiting Radius': {
on: {
'Finish circle': 'Finished Circle',
},
},
'Finished Circle': {
always: '#Modeling.Sketch.SketchIdle',
},
},
initial: 'Awaiting origin',
entry: 'listen for circle origin',
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
initial: 'Init',
on: {
CancelSketch: '.SketchIdle',
'Delete segment': {
reenter: false,
actions: ['Delete segment', 'Set sketchDetails'],
},
'code edit during sketch': '.clean slate',
},
exit: [
'sketch exit execute',
'tear down client sketch',
'remove sketch grid',
'engineToClient cam sync direction',
'Reset Segment Overlays',
'enable copilot',
],
entry: ['add axis n grid', 'clientToEngine cam sync direction'],
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
'Sketch no face': {
entry: [
'disable copilot',
'show default planes',
'set selection filter to faces only',
'enter sketching mode',
],
exit: ['hide default planes', 'set selection filter to defaults'],
on: {
'Select default plane': {
target: 'animating to plane',
actions: ['reset sketch metadata'],
},
},
},
'animating to plane': {
invoke: {
src: 'animate-to-face',
id: 'animate-to-face',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
input: ({ event }) => {
if (event.type !== 'Select default plane') return undefined
return event.data
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
onDone: {
target: 'Sketch',
actions: 'set new sketch metadata',
},
onError: 'Sketch no face',
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
},
'animating to existing sketch': {
invoke: {
src: 'animate-to-sketch',
id: 'animate-to-sketch',
input: ({ context }) => ({
selectionRanges: context.selectionRanges,
sketchDetails: context.sketchDetails,
}),
onDone: {
target: 'Sketch',
actions: [
'disable copilot',
'set new sketch metadata',
'enter sketching mode',
],
},
},
},
'Applying offset plane': {
invoke: {
src: 'offsetPlaneAstMod',
id: 'offsetPlaneAstMod',
input: ({ event }) => {
if (event.type !== 'Offset plane') return undefined
return event.data
},
onDone: ['idle'],
onError: ['idle'],
},
},
Point-and-click Loft (#4605) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-04 17:24:16 -05:00
'Applying loft': {
invoke: {
src: 'loftAstMod',
id: 'loftAstMod',
input: ({ event }) => {
if (event.type !== 'Loft') return undefined
return event.data
},
onDone: ['idle'],
onError: ['idle'],
},
},
Point-and-click Shell (#4666) * WIP: experimenting with Loft UI Relates to #4470 * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Add selection guard * Working loft for two sketches in the right hardcoded order * First pass at handling more than 2 sketches * WIP selections * WIP selections * More checks * Appends the loft line after the 'last' sketch in the code * Clean up * Enable multiple selections after the button click * First point-click loft test (not working locally, loft gets inserted at the wrong place) * Lint * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Clean up and working pw test * Add test for doesSceneHaveSweepableSketch with count = 2 * Clean up loftSketches function * Add pw test for preselected sketches * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Move to fromPromise-based Actor * Move error logic out of loftSketches, fix pw tests * Remove comments * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Fix typo * Revert snapshots * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * Trigger CI * WIP: initial shell code addition * Rollback pw values to pre cam change * WIP: more additions * WIP: closer * WIP: first time working shell mod * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * Add extrude lookup for more generic shell * Handle walls * Add pw tests for cap shell * Add shell wall test * Fix lint * Add selection guard and clean up * Lint fix * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * WIP mutliple faces * WIP circular dep * Lint * Look at this (photo)Graph *in the voice of Nickelback* * Trigger CI * Working multi-face shell across types * Cap and wall pw test * Apply suggestions from Frank's review Co-authored-by: Frank Noirot <frank@zoo.dev> * Fix test annotations * Add unit tests for doesSceneHaveExtrudedSketch * Manual resolution of snapshot conflicts * Fix assertParse * Updated pathToNode construct --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-12-09 15:20:48 -05:00
'Applying shell': {
invoke: {
src: 'shellAstMod',
id: 'shellAstMod',
input: ({ event }) => {
if (event.type !== 'Shell') return undefined
return event.data
},
onDone: ['idle'],
onError: ['idle'],
},
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
initial: 'idle',
on: {
Cancel: {
target: '.idle',
// TODO what if we're existing extrude equipped, should these actions still be fired?
// maybe cancel needs to have a guard for if else logic?
actions: [
'reset sketch metadata',
'enable copilot',
'enter modeling mode',
],
},
'Set selection': {
reenter: false,
actions: 'Set selection',
},
'Set mouse state': {
reenter: false,
actions: 'Set mouse state',
},
'Set context': {
reenter: false,
actions: 'Set context',
},
'Set Segment Overlays': {
reenter: false,
actions: 'Set Segment Overlays',
},
'Center camera on selection': {
reenter: false,
actions: 'Center camera on selection',
},
Migrate to XState v5 (#3735) * migrate settingsMachine * Guard events with properties instead * migrate settingsMachine * Migrate auth machine * Migrate file machine * Migrate depracated types * Migrate home machine * Migrate command bar machine * Version fixes * Migrate command bar machine * Migrate modeling machine * Migrate types, state.can, state.matches and state.nextEvents * Fix syntax * Pass in modelingState into editor manager instead of modeling event * Fix issue with missing command bar provider * Fix state transition * Fix type issue in Home * Make sure no guards rely on event type * Fix up command bar submission logic * Home machine tweaks to get things running * Fix AST fillet function args * Handle "Set selection" when it is called by actor onDone * Remove unused imports * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Fix injectin project to the fileTree machine * Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)" This reverts commit 4b43ff69d1572c10992ed4c29678acbb9abf96d7. * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * Re-run CI * Restore success toasts on file/folder deletion * Replace casting with guarding against event.type * Remove console.log Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Replace all instances of event casting with guards against event.type --------- Co-authored-by: Frank Noirot <frank@kittycad.io> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: Jonathan Tran <jonnytran@gmail.com> Co-authored-by: Frank Noirot <frank@zoo.dev>
2024-09-09 19:59:36 +03:00
},
})
export function isEditingExistingSketch({
sketchDetails,
}: {
sketchDetails: SketchDetails | null
}): boolean {
// should check that the variable declaration is a pipeExpression
// and that the pipeExpression contains a "startProfileAt" callExpression
if (!sketchDetails?.sketchPathToNode) return false
const variableDeclaration = getNodeFromPath<VariableDeclarator>(
kclManager.ast,
sketchDetails.sketchPathToNode,
'VariableDeclarator'
)
if (err(variableDeclaration)) return false
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
const pipeExpression = variableDeclaration.node.init
if (pipeExpression.type !== 'PipeExpression') return false
const hasStartProfileAt = pipeExpression.body.some(
(item) =>
item.type === 'CallExpression' && item.callee.name === 'startProfileAt'
)
const hasCircle = pipeExpression.body.some(
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
)
return (hasStartProfileAt && pipeExpression.body.length > 2) || hasCircle
}
export function pipeHasCircle({
sketchDetails,
}: {
sketchDetails: SketchDetails | null
}): boolean {
if (!sketchDetails?.sketchPathToNode) return false
const variableDeclaration = getNodeFromPath<VariableDeclarator>(
kclManager.ast,
sketchDetails.sketchPathToNode,
'VariableDeclarator'
)
if (err(variableDeclaration)) return false
if (variableDeclaration.node.type !== 'VariableDeclarator') return false
const pipeExpression = variableDeclaration.node.init
if (pipeExpression.type !== 'PipeExpression') return false
const hasCircle = pipeExpression.body.some(
(item) => item.type === 'CallExpression' && item.callee.name === 'circle'
)
return hasCircle
}
export function canRectangleOrCircleTool({
sketchDetails,
}: {
sketchDetails: SketchDetails | null
}): boolean {
const node = getNodeFromPath<VariableDeclaration>(
kclManager.ast,
sketchDetails?.sketchPathToNode || [],
'VariableDeclaration'
)
// This should not be returning false, and it should be caught
// but we need to simulate old behavior to move on.
if (err(node)) return false
return node.node?.declaration.init.type !== 'PipeExpression'
}
/** If the sketch contains `close` or `circle` stdlib functions it must be closed */
export function isClosedSketch({
sketchDetails,
}: {
sketchDetails: SketchDetails | null
}): boolean {
const node = getNodeFromPath<VariableDeclaration>(
kclManager.ast,
sketchDetails?.sketchPathToNode || [],
'VariableDeclaration'
)
// This should not be returning false, and it should be caught
// but we need to simulate old behavior to move on.
if (err(node)) return false
if (node.node?.declaration.init.type !== 'PipeExpression') return false
return node.node.declaration.init.body.some(
(node) =>
node.type === 'CallExpression' &&
(node.callee.name === 'close' || node.callee.name === 'circle')
)
}