* Don't error if no `angle` arg is present in revolve, use `360`
KCL uses a default value if the keyword argument isn't present, so the
feature tree edit flow should do the same. In the future these should
flow from the same source of truth so that the feature tree doesn't have
to duplicate default arg values like this.
* Use `360deg` for more definite UoM
* Only consider staight lines for colinear check
* Neaten up code and add test
* Sir, a second sphere has hit the unit test
* Update test snapshots
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
* fix: implemented a fix to read from settings before restoring camera view and log if it desyncs
* fix: reverting testing code
* fix: always enable ortho scale enabled mode
* fix: fixed the ortho_scale_enabled boolean, do not touch it. Set it to true and never touch it again
Closes https://github.com/KittyCAD/modeling-app/issues/6805. Enables users to programatically construct colors, which will be helpful for
- Applying color to visualize program execution and help debugging
- Doing weird cool shit
In #7179 I added exclusive ranges for KCL, but I forgot to update the
formatter/unparser to handle them. So it was silently changing exclusive-end
ranges to inclusive-end ranges.
* Fix error of not showing errors when reopening KCL code pane
* add test for errors not shown after reopening code pane
* rename test
* typo in e2e/playwright/editor-tests.spec.ts
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* lint
* fmt
* fix test: Opening and closing the code pane will consistently show error diagnostics
* PR feedback: use catch(reportRejection) for safeParse
* no need for lint rule
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Our team started getting *rate limited* with access to the font, which
meant the app wasn't loading for them 😱. I don't want us to risk any
user being rate limited because of a font ever.
@JBEmbedded pointed this out, and we don't want a bad look for website
browsers who click a stray "Try in Browser" link. There's a little
message saying we're working on touch controls for now, and we steal
their signin button.
KCL's `fillet` function takes an array of edges to fillet. Previously this would do `n` fillet API commands, one per edge. This PR combines them all into one call, which should improve performance. You can see the effect in the artifact_commands snapshots, e.g. `rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_commands.snap`
Besides performance, this should fix a bug where some KCL fillets would fail, when they should have succeeded. Example from @max-mrgrsk:
```kcl
sketch001 = startSketchOn(XY)
|> startProfile(at = [-12, -6])
|> line(end = [0, 12], tag = $seg04)
|> line(end = [24, 0], tag = $seg03)
|> line(end = [0, -12], tag = $seg02)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
|> close()
extrude001 = extrude(
sketch001,
length = 12,
tagEnd = $capEnd001,
tagStart = $capStart001,
)
|> fillet(
radius = 5,
tags = [
getCommonEdge(faces = [seg02, capEnd001]),
getCommonEdge(faces = [seg01, capEnd001]),
getCommonEdge(faces = [seg03, capEnd001]),
getCommonEdge(faces = [seg04, capEnd001])
],
)
```
This program fails on main, but succeeds on this branch.
Previously KCL bezier curves could only use relative control points. Now you can use absolute control points too.
Here's an example of the new arguments:
```kcl
startSketchOn(XY)
|> startProfile(at = [300, 300])
|> bezierCurve(control1Absolute = [600, 300], control2Absolute = [-300, -100], endAbsolute = [600, 300])
|> close()
|> extrude(length = 10)
```
Closes https://github.com/KittyCAD/modeling-app/issues/7083
Closes#5792. I tried to move these over to our new component test
bucket, but Remark doesn't play nice with that testing setup at least in
my initial attempts.
In #7156, I allowed KCL to set specific snippet completions for each arg of each function. They're optional -- if you don't set one, it'll fall back to the type-driven defaults.
That PR only worked for KCL stdlib functions defined in Rust. This PR enables the same feature, but for functions defined in KCL.
Before, the LSP snippet for `startProfile` was
```
startProfile(%, at = [3.14, 3.14])
```
Now it's
```
startProfile(%, at = [0, 0])
```
This is configured by adding a `snippet_value=` field to the stdlib macro. For example:
```diff
#[stdlib {
name = "startProfile",
keywords = true,
unlabeled_first = true,
args = {
sketch_surface = { docs = "What to start the profile on" },
- at = { docs = "Where to start the profile. An absolute point." },
+ at = { docs = "Where to start the profile. An absolute point.", snippet_value = "[0, 0]" }, tag = { docs = "Tag this first starting point" },
},
tags = ["sketch"]
}]
```
## Work for follow-up PRs
- Make this work for KCL functions defined in KCL, e.g. [`fn circle`](36c8ad439d/rust/kcl-lib/std/sketch.kcl (L31-L32)) -- something like `@(snippet_value = "[0, 0]")` perhaps
- Go through the stdlib and change defaults where appropriate
* 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>
* Pass the query parameters through to sign-in flow
So users can return to their invoked command after signing in
* Don't run query param commands if not logged in