* fix: REVERT REVERT REVERT
* fix: one more unused remove
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Make sure connection is established before advancing settings theme test
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* Add more tests for sweep sectional
* A snapshot a day keeps the bugs away! 📷🐛
* Add rust doc test for sectional
* A snapshot a day keeps the bugs away! 📷🐛
* Ran redo-kcl-stdlib-docs
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Make changes to ML button
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: Zookeeper Lee <lee@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Only show axis planes when there are no errors
* run prettier
* A snapshot a day keeps the bugs away! 📷🐛
* KclSingleton hasErrors refactor
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Automatic fixing of deprecations and use non-quoted default planes by default
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix snapshot test to use mask
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix ToolBar WebkitAppRegion warning
* make intersectionPlane non-nullable, avoid trying to create it multiple times to get rid of warning
* remove derived scene from sceneEntities
* intersectionPlane is now always non-null, make it readonly too
* sceneInfra small cleanups
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up snapshots
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* WIP: Expose the sectional argument in the Sweep command flow
Fixes#5301
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Working edit flow
* Lint
* Allow in place editing, more consistent code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Remove validation on non-selection arg
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Comment out bad test
* Clean up for review
* Hack sectional
* Made selection args hidden
* Fix edit issue in e2e
* Clean up
* Add face filtering filter for opposite and next adjacent faces
* Lint
* Fixme back
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Use updateModelingState in codemod
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Improve filtering readibility
* Fix base test
* I liked return but clippy didn't
* Working tests, isolating the change to sectional sweep, don't like the api change
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* Clean up snapshots
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* parse union and fancy array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* type aliases
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Treat Helix and Face as primitive types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* code motion: factor our execution::types module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Tests for type coercion and subtyping
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add Point2D/3D to std
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rebasing and fixes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add support for forcing kcl input create variable
* Command palette padding tweak
* Make traverse function work for ExpressionStatements
* Add utilities for getting earliest safe index in AST
* Fix the insertIndex logic to not be based on the selection anymore
* Add workflow to create a named constant
* Fix bug with nameEndInDigits matcher
* Tweak command config
* Add a three-dot menu to feature tree pane to create parameters
* Add E2E test for create parameter flow
* Remove edit flow oops
* Fix tsc error
* Fix E2E test
* Update named constant position in edit flow test
* Add tags into consideration for safe insert index
Per @Irev-dev's helpful feedback, with unit tests!
* Fix tsc by removing a generic type
* Remove unused imports
* Fix lints
* A snapshot a day keeps the bugs away! 📷🐛
* Add utilities for working with variable declarations
* Add "edit parameter" user flow
* Add edit flow config
* WIP working on de-bloating useCalculateKclExpreesion
* Add the ability to specify a `displayName` for an arg
* Add utility to type check on SourceRanges
* Review step design tweak fixes
* Refactor useCalculateKclExpression to take a sourceRange
* Make option arg validation work for objects and arrays
Using an admittedly dumb stringification approach
* Make edit flow never move the constant to be edited
* Add E2E test section
* Fix lints
* Remove lying comment, tiny CSS tweak
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Install Vector on Ubuntu to log failed test to Axiom
* Allow flaky tests to run on main for Axiom metrics
* Enable problematic tests on a dedicated branch
* Only show "Edit sketch" button when code pane is focused with sketch selected
Closes#4273. WIP until tests are updated, since this will impact many
that look for the "Edit sketch" button.
* Start removing "edit sketch" point-and-click from E2E
* Update more E2E tests
* Update more tests that assumed Edit Sketch button
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Ensure batches in the engine are cleared between scenes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Avoid panicking reading arguments out of bounds
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Improve snapshot testing
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix no profile errors
* add test and tweak a couple things
* quick fix
* fix animation
* add another test
* Use actor.getSnapshot in the debug function
So we don't have to rebuild that listener every time that the state
changes.
* try fix tests
---------
Co-authored-by: Frank Noirot <frankjohnson1993@gmail.com>
* rule them all
* swap AST updater
* add test
* yellow colour fix
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add support for forcing kcl input create variable
* Command palette padding tweak
* Make traverse function work for ExpressionStatements
* Add utilities for getting earliest safe index in AST
* Fix the insertIndex logic to not be based on the selection anymore
* Add workflow to create a named constant
* Fix bug with nameEndInDigits matcher
* Tweak command config
* Add a three-dot menu to feature tree pane to create parameters
* Add E2E test for create parameter flow
* Remove edit flow oops
* Fix tsc error
* Fix E2E test
* Update named constant position in edit flow test
* Add tags into consideration for safe insert index
Per @Irev-dev's helpful feedback, with unit tests!
* transform a sketch
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* show we can revolve around paths
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* show we can revolve around paths
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* set initial electron window size to be almost full screen with some space left
* refine initial window size and position
* slightly larger
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Deep links or double clicks don't work on second instance on Windows
Fixes#5864
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Attempt: Hourly tests on ubuntu only
* Attempt: Hourly tests on ubuntu only through os exlusion rules
* Attempt: Hourly tests on ubuntu only through dummy boolean key
* Clean up for PR
* Draft: Use less namespace vCPUs for e2e
* All on gh, just to see
* Disable concurrency, bump to 45min step retry timeout
* 2 workers for non-windows machineis
* Step retry down to 3
* Change to ubuntu aws, change macos to macos-latest-large
* Fix name for ubuntu aws, back to 10 step retry
* Back to 4 shards to see the diff
* Snaptshots on ubuntu aws
* Cleaning up to get closer to a review-able state
* Should be ready for review
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
* A snapshot a day keeps the bugs away! 📷🐛
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* bare minimum
* start of segment util added
* remove redundant handle
* some probably buggy handling of arc handles, can fix later
* probably bug implementation of update args, but data flow through is mostly there can fix bugs after
* fix update for arc
* fix math for center handle
* fix up length indicator
* tweak math
* stub out xState logic for arc
* more progress on adding point and click, implemented more of sketchLineHelper for arc
* small unrelated tweak
* fix up draft arc bugs
* fix arc last click
* fix draft segment animation and add comment
* add draft point snapping for arcs
* add helper stuff to arc
* clone arc point and click as base for arc-three-point
* rust change for arc three point
* can draw three point arc
* make arcTo editable
* can add new three point arc, so long as it continues existing profile
* get overlays working
* make snap to for continuing profile work for three point arcs
* add draft animation
* tangent issue fix
* action rename
* tmp test fix up
* fix silly bug
* fix couple problems causing tests to fail
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix up
* add delet segment test for new segments
* update docs
* draft segments should look right
* add test for dragging new segment handles
* arc tools can be chained now
* make three point arc can start a new profile (not only extend existing paths)
* add test for equiping and unequiping the tool plus drawing with it
* fix console noise
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* clean up
* update rust/docs
* put toolbar mode check into fixture
* do thing for lee
* use TEST_COLORSs
* fix colors
* don't await file write
* remove commented code
* remove unneeded template strings
* power to **2
* remove magic numbers
* more string templates
* some odd bits of clean up
* arc should be enable in dev
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* add new simulation test
* fix test code from kwark migration
* issues Frank found
* fix deleting half complete ark
* fix
* small fix on dele index
* tsc post main merge
* fix up snaping to profile start
* add cross hari for three point arc
* block snapping if it's the only segment
* add tests for canceling arcTo halfway through
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Attempt: Hourly tests on ubuntu only
* Attempt: Hourly tests on ubuntu only through os exlusion rules
* Attempt: Hourly tests on ubuntu only through dummy boolean key
* Clean up for PR
* 8 shards, 1 workers, 10 retries
* Trigger CI
* Add retries to snapshots
* Clean up for PR, retry to 15
* Trigger CI
* Back to 4 shards for simplicity
* Revert "Back to 4 shards for simplicity"
This reverts commit 413de2fc61.
* chore: implement faster write function to call when rerouting
* fix: codespell typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add script to build on mac mini
* Remove wasm-prep, rust flag only on wasm-pack build, add ps1 script
* Make it exectuable, tested on macOS
* Add set -e
* Stop scripts on error
---------
Co-authored-by: lf94 <ircsurfer33@gmail.com>
* Parse [T] instead of T[] for array types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* homogenous arrays, type coercion, remove solid set and sketch set, etc
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make tag identifiers monotonic
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Use epochs rather than snapshots in memory
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* WIP: Add edit flow for Shell thickness
Would fix#5406 but not like this :sad:
* Early win with working edit on shell
* Extend to logic to walls with tags
* Remove skip
* Add wall test
* Fixing inconsistencies in code. Tests not working on win
* Refactor addShell for consitency
* Clean up
* More clean up
* Add validation on both params
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Passing tests
* Prettier
* Change from test.skip to comment
* Clean up for review
* Add review suggestions and disable thickness validator
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Remove uneccessary changes
* Add edit flow for Shell thickness
Fixes#5406
* Enable edit step in test that works only if the start code is properly formatted
* Clean up for review
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: add better errors for missing commas in arrays and objects
* chore: add object prop shorthand missing comma test
* fix: wording on unexpected character in arrays and objects
* fix: don't eagerly evaluate whether there is a closing brace/bracket
* feat: exit early when detecting missing commas if encountering invalid tokens
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix: updated reserved word in test to replace removed one
---------
Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Bail on cleanup after 10s; move setup even higher
* Give macos time before starting an electron instance
* Try it again
* Again
* Remove stale TODO
* Use Kolmogorov complexity instead of text for ai assertions
* Help out prompt-to-edit test with being more explicit
* Try to give Mac more time to open a window
* Fix the other var change for prompt-to-edit test
* Forgot this
* Try some crazier shit
* 🤦 I forgot the return.
* Ok things were actually just not working well at all
* Fix export test to expect smaller size
* yarn tsc && yarn lint && yarn fmt
* Fix flakey tests with new toolbar.exitSketch
* tsc && lint && fmt
* Disable pw electron thing again
* Unfrig Playwright-Electron a ton; fix another ton of flakes.
* More deflaky
* Fix a ton of tests and playwright related hell
* Run jess's magic incantation to build rust kcl things
* yarn tsc
* yarn lint
* yarn fmt
* Remove double logs
* Revert to old settings spreads momentarily
* Expect error *in the fixtureSetup*, does not circumvent typechecking for regular usage
* Fix unit tests
* Add warning when using a module with no return value
* Update output files since changing source range of the pipeline argument
* Change wording of error message to not use the term unlabeled
* WIP: break out e2e snapshots
* Separate prepare-wasm job
* Force e2e to run on pierremtb/adhoc/break-out-snapshots
* Quick fix
* Quick fix2
* Quick fix3
* Quick fix4
* Quick fix5
* Remove ifs for flow tests
* Clean up for review
* Cache wasm on PR for build-apps
* Add checks on build wasm tings
* Clean up for review
Firstly, before the code "{x = 1, y = }" would give the dreaded "unexpected token" error.
Now it says "This property has a label, but no value. Put some value after the equals sign".
And points to the = symbol with no matching right-hand side value. Yay!
Second fix: before, in the code `f(1, x=)`, the error complained that an unlabeled arg was not permitted there.
Now it says "This argument has a label, but no value. Put some value after the equals sign".
Fixes https://github.com/KittyCAD/modeling-app/issues/4307
Now if you try to fillet the same edge twice in a single fillet command,
the error message is clearer, and the source range will highlight
the specific edges in the array which are duplicated.
Same goes for chamfer.
Note: although the Rust KCL interpreter sends back an array of SourceRange
for each KCL error, the frontend only puts the first one into CodeMirror
diagnostics. We should fix that: https://github.com/KittyCAD/modeling-app/issues/5754
* Allow `hidden` config to be a callback
* Hide selection type args if `nodeToEdit` is present
in workflows that have an edit flow set up
* Remove Selection from headerArguments in edit flow tests
* Make any error show on ErrorPage, not just route error responses
Closes#5620 by making any error show on the page so the user can copy
it for use in an issue. Previously, the logic was too narrow and only
showed the error on the page if `isRouterErrorResponse` was true.
* @nadr0's feedback
thanks for giving my crap work a review
* Update src/components/ErrorPage.tsx
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* @nadr0 feedback, handle overflowing error case
---------
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: Kevin Nadro <nadr0@users.noreply.github.com>
Previous error message:
"Expected a kcl_lib::execution::geometry::SolidSet but found Sketch"
New error message:
"Expected a SolidSet but found Sketch. You can convert a sketch (2D) into a Solid (3D) by calling a function like `extrude` or `revolve`"
Two improvements:
- Don't print the fully-qualified Rust name (e.g. kcl_lib::executor::Solid) instead use the last part of that (e.g. just Solid)
- Allow specific suggestions for combinations of got/want (e.g. "You can convert a sketch (2D) into a Solid (3D) by calling a function like `extrude` or `revolve`")
Closes#5616
# Problem
Before: "unexpected token |>", highlights the |>
After: "This argument needs a label, but it doesn't have one", highlights the argument with no label
Closes#5724
# Discussion
I am trying a new approach to the parser: instead of parsing the specific correct thing we need, parse a more general form, then later, narrow it down to specifics and return a nice error if it's wrong. For example, instead of parsing labeled arguments, parse labeled OR unlabeled arguments. Then later check that the only unlabeled arg is the first one, and return a nice error if there's any other. This worked nicely for this PR, hopefully the approach will work for other "cryptic error" issues.
* cargo publish too big
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* cargo publish too big
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>
* bunmp again
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Previously, `xLine`, `xLineTo`, `yLine` and `yLineTo` used positional arguments. Now:
- `xLineTo` and `yLineTo` have been removed
- `xLine` and `yLine` both use keyword arguments:
- `length`, optional (i.e. a relative distance along the X or Y axis)
- `endAbsolute` optional (i.e. an absolute point along the X or Y axis)
- `tag` optional
- Exactly one of `length` or `endAbsolute` must be given. Not both, not neither.
For example:
```
// Old way
|> xLine(6.04, %)
|> yLineTo(20, %, $base)
// New way
|> xLine(length = 6.04)
|> yLine(endAbsolute = 20, tag = $base)
```
This also improves some of the general-purpose keyword arguments code in modeling app's TS codebase.
Fixes#5625. #5142 regressed the project settings loading because it
failed to fire off a new `load.project` XState event in the case where
we were loading in the browser. It also may have had a bug with project
settings loading on refresh from the file page, as we were not properly
ensuring that the `settingsActor` was in the `idle` state before sending
our `load.project` event regardless.
* Make some things a little less public
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Rename KclValue::Array to MixedArray
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Add settings to KclValue::Function
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Remove a bunch of dead code, simplifying mock exec and meaning KclValue no longer needs to deserialize
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Parse an unparse type decls (and refactor impl attributes slightly)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Remove special treatment of geometric types from parser and executor
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Generate docs for std types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Hover tool-tips for types and fixup the frontend
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Fixes
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Change to unzip
* Download kcl-samples as zip to public dir
* Fix fetch:samples, e2e electron still not working
* Change error message to be clearer
* Refactor so that input and output directories of sim tests can be different
* Add kcl samples test implementation
* Update output since adding kcl_samples tests
* Update kcl-samples branch
* Fix git-ignore pattern to only apply to the root
* Fix yarn install and yarn fetch:samples to work the first time
* Remove unneeded exists check
* Change to use kcl-samples in public directory
* Add kcl-samples
* Update output since updating kcl-samples
* Update output files
* Change to not fetch samples during yarn install
* Update output after merge
* Ignore kcl-samples in codespell
* WIP: Don't run e2e if only kcl-samples changed
* Conditionally run cargo tests
* Fix to round floating point values in program memory arrays
* Update output since merge and rounding numbers in memory
* Fix memory redaction for floating point to find more values
* Fix float redaction pattern
* Update output since rounding floating point numbers
* Add center to floating point pattern
* Fix trigger to use picomatch syntax
* Update output since rounding center
* Remove kcl-samples github workflows
* Enable Rust backtrace
* Update output after re-running
* Update output after changing order of post-extrude commands
* Fix to have deterministic order of commands
* Update output after reverting ordering changes
* Update kcl-samples
* Update output after updating samples
* Fix error messages to show the names of all samples that failed
* Change cargo test command to match current one
* Update kcl-samples
* Update output since updating kcl-samples
* Add generate manifest workflow and yarn script
* Fix error check to actually work
* Change util function to be what we actually need
* Move new files after merge
* Fix paths since directory move
* Add dependabot updates for kcl-samples
* Add GitHub workflow to make PR to kcl-samples repo
* Add GitHub workflow to check kcl-samples header comments
* Fix worfklow to change to the right directory
* Add auto-commit simulation test output changes
* Add permissions to workflows
* Fix to run git commit step
* Install just if needed
* Fix directory of justfile
* Add installation of cargo-insta
* Fix to use underscore
* Fix to allow just command failure
* Change to always install CLI tools and cache them
* Trying to fix overwrite failing
* Combine commands
* Change reviewer
* Change to PR targeting the next branch
* Change git commands to not do unnecessary fetch
* Comment out trigger for creating a PR
* Update kcl-samples from next branch
* Update outputs after kcl-samples change
* Fix to use bash pipefail
* Add rust backtrace
* Print full env from sim tests
* Change command to use long option name
* Fix to use ci profile even when calling through just
* Add INSTA_UPDATE=always
* Fix git push by using an app token on checkout
* Add comments
* Fix to use bash options
* Change to echo when no changes are found
* Fix so that kcl-samples updates don't trigger full run
* Fix paths to reflect new crate location
* Fix path detection
* Fix e2e job to ignore kcl_samples simulation test output
* Fix the fetch logic for the KCL samples after vendoring (#5661)
Fixes the last 2 E2E tests for #5460.
---------
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Give snapshotter a better chance of getting a good snapshot
* fmt tsc lint
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Fix tests
* Again
* Make cmdBarFixture Locators getters
* Fix export error test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix to not specify the rust toolchain version everywhere
* Fix to source
* Fix warning about non-portable option to cp
* Fix to use built-in Swatinem/rust-cache
* Fix Swatinem/rust-cache to use the right directory
* Only save the themeColor setting on end of input
Closes#4463 by making this input sliders less eager to write to disk,
which was gumming up the works.
* fmt
* Show more info on hover for variables
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Move hover impls to lsp module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Make hover work on names inside calls, fix doc line breaking, trim docs in tool tips
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Test the new hovers; fix signature syntax
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Hover tips for kwargs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* add export test so we dont break cli / kcl.py
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Overwrite created date (#5602)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Bump convert_case from 0.6.0 to 0.8.0 in /rust
Bumps [convert_case](https://github.com/rutrum/convert-case) from 0.6.0 to 0.8.0.
- [Commits](https://github.com/rutrum/convert-case/commits)
---
updated-dependencies:
- dependency-name: convert_case
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add configuration/type support for `hidden`
* Add UI support for `hidden` configuration
* Make `nodeToEdit` args hidden
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Fix cmdBarFixture to actually serialize to "pickCommand" case
* Add test step to ensure hidden commands can't be backed into
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Disable view control menu items and gizmo clicks conditionally
* Actually just turn off all mouse events, moves too
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fix gizmo flickering
* fmt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* Add test step for disabling gizmo in sketch mode
* Use grayscale to indicate disabled state?
@max-mrgrsk feel free to discard if you prefer the opacity, I don't have
a strong opinion at the moment.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: max-mrgrsk <156543465+max-mrgrsk@users.noreply.github.com>
* feature: building skeleton for adding a viewpoint in frontend as well as rust with the settings toml
* chore: named views loaded into memory
* fix: testing code
* chore: saving off progress, skeleton for listing and deleting named views
* fix: fixed state stale dereferencing issue
* feat: initial skeleton for loading view points
* fix: pushing bug
* fix: saving off progress
* fix: trying to update to main?
* fix: main fixes, API fixes
* fix: what is happening
* fix: ope
* fix: implemented default values on serde
* fix: pushing working dev code... need to clean it up
* feature: adding no results found on filteroptions within an options input, not just command input bar level
* fix: initial PR cleanup pass of junky code
* fix: addressing comments in initial pass
* fix: addressing PR comments
* fix: moved modeling.namedViews to app.namedViews as per request
* fix: _id and _version are now id and version.
* fix: python codespell, perspective
* fix: cargo fmt
* fix: updating description of the named view commands
* fix: removing testing code
* fix: feature flag this to DEV only
* fix: ts ignore for production engine api
* fix: deep parital fights arrays and objects within settings, doing a namedview type predicate checking
* fix: auto fixes
* Remove unnecessary alias
* Reword toast messages (more consistency)
* fmt
* cargo clippy
* Fix Set appearance flakes
* cargo test
* fix: removing pub since the toml_stringify was refactored
* fix: adding ignore this on user level
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* chore: Vec<NamedView> to HashMap<uuid::Uuid,NamedView>
* fix: removing debugging code
* chore: HashMap to IndexMap
* fix: remove testing code
---------
Co-authored-by: 49lf <ircsurfer33@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add expandable disclosure to Text-to-CAD success toast
Closes#5258 by adding a details element that the user can open if they
don't like the result of their "successful" prompt.
* Add the same disclosure to the Prompt-to-Edit toast
* Rework text per @greg-kcio's feedback
* Fix tsc
* WIP fix up ttc e2e tests
* Add code ref to sketch-on-face artifacts
* Fix to add execution artifacts to the artifact graph
* Update output after including exec artifacts
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Refactor: Use the named constant for 'endAbsolute' in more places
* Bugfix: lineTo was calculating relative distances instead of absolute
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ -52,18 +52,21 @@ Install a node version manager such as [fnm](https://github.com/Schniz/fnm?tab=r
On Windows, it's also recommended to [upgrade your PowerShell version](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#winget), we're using 7.
Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected.
Then in the repo run the following to install and use the node version specified in `.nvmrc`. You might need to specify your processor architecture with `--arch arm64` or `--arch x64` if it's not autodetected.
```
fnm install --corepack-enabled
fnm use
```
Install the NPM dependencies with:
```
yarn install
```
This project uses a lot of Rust compiled to [WASM](https://webassembly.org/) within it. We have package scripts to run rustup, see `package.json` for reference:
```
# macOS/Linux
yarn install:rust
@ -75,6 +78,7 @@ yarn install:wasm-pack:cargo
```
Then to build the WASM layer, run:
```
# macOS/Linux
yarn build:wasm
@ -101,7 +105,7 @@ Finally, to run the web app only, run:
yarn start
```
If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to localhost:3000 again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
If you're not a Zoo employee you won't be able to access the dev environment, you should copy everything from `.env.production` to `.env.development.local` to make it point to production instead, then when you navigate to `localhost:3000` the easiest way to sign in is to paste `localStorage.setItem('TOKEN_PERSIST_KEY', "your-token-from-https://zoo.dev/account/api-tokens")` replacing the with a real token from https://zoo.dev/account/api-tokens of course, then navigate to `localhost:3000` again. Note that navigating to `localhost:3000/signin` removes your token so you will need to set the token again.
### Development environment variables
@ -118,7 +122,7 @@ Third-Party Cookies".
## Desktop
To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then
To spin up the desktop app, `yarn install` and `yarn build:wasm` need to have been done before hand then:
```
yarn tron:start
@ -126,15 +130,16 @@ yarn tron:start
This will start the application and hot-reload on changes.
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
Devtools can be opened with the usual Command-Option-I (macOS) or Ctrl-Shift-I (Linux and Windows).
To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables)
To package the app for your platform with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables).
## Checking out commits / Bisecting
Which commands from setup are one off vs need to be run every time?
Which commands from setup are one off vs. need to be run every time?
The following will need to be run when checking out a new commit and guarantees the build is not stale:
```bash
yarn install
yarn build:wasm
@ -185,11 +190,12 @@ Manually test against this [list](https://github.com/KittyCAD/modeling-app/issue
##### Updater-test builds
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The other `build-apps` output in the release `build-apps` workflow (triggered by 2.) is `updater-test-{arch}-{platform}`. It's a semi-automated process: for macOS, Windows, and Linux, download the corresponding updater-test artifact file, install the app, run it, expect an updater prompt to a dummy v0.255.255, install it and check that the app comes back at that version.
The only difference with these builds is that they point to a different update location on the release bucket, with this dummy v0.255.255 always available. This helps ensuring that the version we release will be able to update to the next one available.
If the prompt doesn't show up, start the app in command line to grab the electron-updater logs. This is likely an issue with the current build that needs addressing (or the updater-test location in the storage bucket).
@ -205,15 +211,14 @@ If the prompt doesn't show up, start the app in command line to grab the electro
Head over to https://github.com/KittyCAD/modeling-app/releases/new, pick the newly created tag and type it in the _Release title_ field as well.
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
Hit _Generate release notes_ as a starting point to discuss the changelog in the issue. Once done, make sure _Set as the latest release_ is checked, and hit _Publish release_.
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
A new `publish-apps-release` will kick in and you should be able to find it [here](https://github.com/KittyCAD/modeling-app/actions?query=event%3Arelease). On success, the files will be uploaded to the public bucket as well as to the GitHub release, and the announcement on Discord will be sent.
#### 5. Close the issue
If everything is well and the release is out to the public, the issue tracking the release shall be closed.
For a portable way to run Playwright you'll need Docker.
#### Generic example
After that, open a terminal and run:
```bash
@ -263,7 +269,6 @@ and in another terminal, run:
PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project="Google Chrome" <test suite>
```
#### Specific example
open a terminal and run:
@ -281,7 +286,6 @@ PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:4444/ yarn playwright test --project=
run a specific test change the test from `test('...` to `test.only('...`
(note if you commit this, the tests will instantly fail without running any of the tests)
**Gotcha**: running the docker container with a mismatched image against your `./node_modules/playwright` will cause a failure. Make sure the versions are matched and up to date.
run headed
@ -375,17 +379,19 @@ Which will run our suite of [Vitest unit](https://vitest.dev/) and [React Testin
-`just`
#### Setting KITTYCAD_API_TOKEN
Use the production zoo.dev token, set this environment variable before running the tests
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'x' dimension.
along some angle (in degrees) for some relative length in the 'x' dimension.
```js
angledLineOfXLength(
data:AngledLineData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ angledLineOfXLength(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some relative length in the 'y' dimension.
along some angle (in degrees) for some relative length in the 'y' dimension.
```js
angledLineOfYLength(
data:AngledLineData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ angledLineOfYLength(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Draw an angled line from the current origin, constructing a line segment"
excerpt: "Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment."
layout: manual
---
Draw an angled line from the current origin, constructing a line segment
Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.
such that the newly created line intersects the desired target line segment.
```js
angledLineThatIntersects(
data:AngledLineThatIntersectsData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ angledLineThatIntersects(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineThatIntersectsData`](/docs/kcl/types/AngledLineThatIntersectsData) | Data for drawing an angled line that intersects with a given line. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'x' dimension.
```js
angledLineToX(
data:AngledLineToData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ angledLineToX(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineToData`](/docs/kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Create a line segment from the current 2-dimensional sketch origin"
excerpt: "Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension."
layout: manual
---
Create a line segment from the current 2-dimensional sketch origin
Create a line segment from the current 2-dimensional sketch origin along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.
along some angle (in degrees) for some length, ending at the provided value in the 'y' dimension.
```js
angledLineToY(
data:AngledLineToData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ angledLineToY(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`AngledLineToData`](/docs/kcl/types/AngledLineToData) | Data to draw an angled line to a point. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
The arc is constructed such that the start point is the current position of the sketch and two more points defined as the end and interior point. The interior point is placed between the start point and end point. The radius of the arc will be controlled by how far the interior point is placed from the start and end.
@ -13,7 +13,7 @@ arcTo(
data:ArcToData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ arcTo(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`ArcToData`](/docs/kcl/types/ArcToData) | Data to draw a three point arc (arcTo). | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Draw a smooth, continuous, curved line segment from the current origin to"
excerpt: "Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape."
layout: manual
---
Draw a smooth, continuous, curved line segment from the current origin to
Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.
the desired (x, y), using a number of control points to shape the curve's shape.
```js
bezierCurve(
data:BezierData,
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -22,12 +22,12 @@ bezierCurve(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `data` | [`BezierData`](/docs/kcl/types/BezierData) | Data to draw a bezier curve. | Yes |
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
excerpt: "Construct a line segment from the current origin back to the profile's"
excerpt: "Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended."
layout: manual
---
Construct a line segment from the current origin back to the profile's
Construct a line segment from the current origin back to the profile's origin, ensuring the resulting 2-dimensional sketch is not open-ended.
origin, ensuring the resulting 2-dimensional sketch is not open-ended.
```js
close(
sketch:Sketch,
tag?:TagDeclarator,
)->Sketch
):Sketch
```
@ -21,11 +21,11 @@ close(
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | The sketch you want to close | Yes |
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
| [`tag`](/docs/kcl/types/tag) | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
### Returns
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `0.39
We merely provide these functions for convenience and readability, as `10 * cm()` is more readable that your intent is "I want 10 centimeters" than `10 * 10`, if the project settings are in millimeters.
@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `12`.
We merely provide these functions for convenience and readability, as `10 * ft()` is more readable that your intent is "I want 10 feet" than `10 * 304.8`, if the project settings are in millimeters.
@ -15,7 +15,7 @@ For example, if the current project uses inches, this function will return `1`.
We merely provide these functions for convenience and readability, as `10 * inch()` is more readable that your intent is "I want 10 inches" than `10 * 25.4`, if the project settings are in millimeters.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.