Closes https://github.com/KittyCAD/engine/issues/3494. Thanks to @nadr0 for helping on the JS side.
If users set their units, the grid will stop auto scaling, and instead will be set to 10 of whatever unit they used.
If users set their units, and those units are metric, then it'll include a scale bar (see screenshot). Imperial units won't have that bar.
This behaviour is configurable via settings.
## Limitations
- The scale bar below the grid cannot be disabled in metric units, and cannot be enabled in imperial units
<img width="1690" alt="Screenshot 2025-06-05 at 7 51 41 PM" src="https://github.com/user-attachments/assets/c597087c-f96d-4c30-95f4-b3d8ba2b5567" />
* use face edge info for some mirrors
* add functionality for other mirror function
* Fix to create new Sketch when mirror results in a new path
* use the original ids and clone the sketches
* remove mirror param
* clippy fix
* debuggin, rm yarn
* Revert "remove mirror param"
This reverts commit a848e243f8.
* use arrbitrary edge_id as sketch mirror id
* additinoal clenaup
* Update rust/kcl-lib/src/std/mirror.rs
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* set .mirror for continuous case
* fix warning
* works without the for loops
* add error handling
* remove duplicate setter
* rm unused var
* clenaup
* unused import
* remove unused let
* Update snapshots
* Update snapshots
* cleanup
* update sim tests
---------
Co-authored-by: gserena <serena@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Previously in a member expression like `foo.x` or `foo[3]`, `foo` had to be an identifier. You could not do something like `f().x` (and if you tried, you got a cryptic error). Rather than make the error better, we should just accept any expression to be the LHS of a member expression (aka its 'object').
This does knock our "parse lots of function calls" from 58 to 55 calls before it stack overflows. But I think it's fine, we'll address this in https://github.com/KittyCAD/modeling-app/pull/6226 when I get back to it.
Closes https://github.com/KittyCAD/modeling-app/issues/7273
* Update telemetry antenna entity names
Changed the generic sketch and profile entity names to more specific names
* Update kcl-samples simulation test output
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Remove old ZMA logos, rip out JS theme state from open-in-desktop view
Make this page dumber so that it doesn't break
* Lint and remove kcma refs
---------
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
* Shuffle around function call code
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Refactor function calls to share more code
Signed-off-by: Nick Cameron <nrc@ncameron.org>
* Hack to leave the result of revolve as a singleton rather than array
Signed-off-by: Nick Cameron <nrc@ncameron.org>
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org>
Avoid using revolve for now
When we moved to concurrent execution of KCL modules, we begun to see an
error we never fully understood, and because it was pretty hard to
trigger, we wound up never being able to fix it. Today we were able to
track it down to the `revolve` call here.
Specifically, the problem is triggered when we're doing a "Full Revolve"
(e.g., `angle = 359.999999` passes, but *not* `angle = 360` or the
default, as it is in `main`), and concurrently executing modules will
see something weird happen with `getNextAdjacentEdge`.
From all the smoke I believe this happens only when we are doing a *full
revolve*, *AND* we're executing other modules which are calling
`getNextAdjacentEdge`.
When the `revolve` is present, we can lose the race in *either*
`talk-button.kcl` OR `case.kcl`.
If I move back to single-threaded execution OR I add imports to sequence
things carefully, I can get the tests to pass. If the revolve is an
`extrude` or not a full revolve, it works fine.
My best guess is that it seems like the world got flipped upside down or
something, such that "next edge" has a different orentation for two
calls. My even further guess is that inside `revolve` we mutate
something connection-global such that it alters the intepretation of
calls made during the revolve implementation's "critical section".
* fix: how?
* fix: 0 byte thumbnail png loading bug
* fix: adding navigate to single file back
* fix: cargo fmt
* fix: sorting files to match manifest and unit test
* fix: restoring back to main
* fix: cargo fmt
* fix: ope, I forgot I deleted some code that renamed single files to the samples name to track easier within the file tree
* fix: ope
* Update src/lib/commandBarConfigs/applicationCommandConfig.ts
Co-authored-by: Frank Noirot <frank@zoo.dev>
* fix: unique name for project, ope
* fix: filtered samples for web and skeleton create a sample command
* fix: Create A Sample specifically desktop home page instead of overloading the add to file
* fix: hiding source
* fix: gotcha on add to file with existing project default args and assemblies
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
* Change array functions to call user function with keyword args
* Fix KCL to use keyword params
* Remove unneeded positional call code
* Update docs
* Update output
Preparing for the removal of positional functions from the language. The first big step is to change all our KCL code examples, test code, public samples etc to all use keyword functions.
Apologies for how large this PR is. Most of it is:
- Changing example KCL that defined its own functions, so the functions now use keyword arguments rather than positional arguments. E.g. change `cube([20, 20])` to be `cube(center = [20, 20])`.
- Some parts of the code assumed positional code and didn't handle keyword calls, e.g. the linter would only check for positional calls to startSketchOn. Now they should work with either positional or keyword.
- Update all the artifacts
This does _not_ remove support for positional calls. That will be in a follow-up PR.