Commit Graph

4255 Commits

Author SHA1 Message Date
3ae4b045ad Merge branch 'pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles' into pierremtb/issue7615-Expose-global-optional-arg-for-all-point-and-click-transforms 2025-07-04 11:33:53 -04:00
cd672d52f6 Merge branch 'main' into pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles 2025-07-04 11:33:24 -04:00
30c4f79285 Quick variable break out for clarity 2025-07-04 08:53:56 -04:00
c3c8b727bd Big time clean up and bringing clone on for the ride 2025-07-04 08:51:56 -04:00
65168eb139 Clean up 2025-07-04 07:47:09 -04:00
6a9870b6f3 Clean pu 2025-07-04 07:47:07 -04:00
78f885c3d1 Fixing up edit flows for transforms, and WIP for simpler feature tree action 2025-07-04 07:46:32 -04:00
a40ba06641 WIP edit flows 2025-07-03 19:45:52 -04:00
597f4a1d54 Bump vite from 5.4.18 to 5.4.19 in the security-major group (#7685)
* Bump vite from 5.4.18 to 5.4.19 in the security-major group

Bumps the security-major group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.18 to 5.4.19
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.19
  dependency-type: direct:development
  dependency-group: security-major
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-07-03 19:36:15 -04:00
c035398ad7 Update rotate and scale to match 2025-07-03 19:08:51 -04:00
1387c2fbcb Add support for imports 2025-07-03 17:10:39 -04:00
c814c90a9e Rebuild when the environment changes (#7688) 2025-07-03 17:05:59 -04:00
a9f95f7574 Progress integrating new stuff from sweeps 2025-07-03 16:50:25 -04:00
64832f9046 Bump esbuild from 0.25.3 to 0.25.4 in the security group (#7684)
* Bump esbuild from 0.25.3 to 0.25.4 in the security group

Bumps the security group with 1 update: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.25.3 to 0.25.4
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.4
  dependency-type: direct:development
  dependency-group: security
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update snapshots

* Update snapshots

---------

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>
2025-07-03 20:16:46 +00:00
b2b7ac5bf8 Merge branch 'pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles' into pierremtb/issue7615-Expose-global-optional-arg-for-all-point-and-click-transforms 2025-07-03 15:54:43 -04:00
172e01529c Add basic addLoft and addRevolve tests, will have to see how to distribute coverage 2025-07-03 15:45:32 -04:00
5a4a32c044 Add addSweep test 2025-07-03 15:00:21 -04:00
b955184191 Lint & complete addExtrude tests 2025-07-03 14:31:06 -04:00
d7914219da We going 2025-07-03 13:58:10 -04:00
ead4c1286b Add other test case 2025-07-03 13:41:31 -04:00
34494f3bba Consolidate KittyCAD API token environment variables (#7665)
* Consolidate KittyCAD API token environment variables

* Remove duplicate variable in type definition

* Remove unnecessary intermediate steps

* Keep base label for concatenation functions
2025-07-03 13:15:21 -04:00
a0fe33260e WIP new util function 2025-07-03 12:15:20 -04:00
8955b5fcd3 Merge branch 'main' into pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles 2025-07-03 11:28:57 -04:00
df6256266c [Chore] All api urls are now using the helper function (#7672)
* fix: logging information about the login

* chore: improving the withBaseURL workflow

* chore: moving VITE_KC_API_BASE_URL to the helper function

* fix: env to helper function api base url

* chore: fixing another api base url

* chore: shortlinks with base api helper function

* chore: prompt edit with base helper function

* fix: auto fmt

* fix: withAPIBaseURL for all urls

* fix: AI caught my typo, RIP

* fix: expected

* fix: renaming this so it is less specific to environment

---------

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
2025-07-03 13:54:03 +00:00
5708b8c64b Add unit test createPathToNodeForLastVariable 2025-07-03 08:50:08 -04:00
5b8284e737 Add unit tests for createVariableExpressionsArray 2025-07-03 07:44:29 -04:00
dd9b0ec5f0 Codespell 2025-07-02 19:38:34 -04:00
c467568ee4 Add unit tests for getVariableExprsFromSelection 2025-07-02 19:26:28 -04:00
e5d082f441 [Chore] Removing old confusing BASE_URL environment variable. (#7678)
chore: this is deprecated, we should be using the VITE_KC_*_BASE_URL workflows
2025-07-02 22:51:01 +00:00
d4d3e179b1 Update test data (#7674) 2025-07-02 15:04:03 -07:00
cb976ec31b Fix circ dep 2025-07-02 17:42:40 -04:00
cc9eb65456 Fix test 2025-07-02 17:00:17 -04:00
298583181b Merge branch 'pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles' into pierremtb/issue7615-Expose-global-optional-arg-for-all-point-and-click-transforms 2025-07-02 16:47:11 -04:00
a589f56e73 Merge branch 'main' into pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles 2025-07-02 12:42:38 -04:00
4f4c44e7c7 KCL: Getter for axes of planes (#7662)
## Goal

Currently, there's no way in KCL to get fields of a plane, e.g. the underlying X axis, Y axis or origin.

This would be useful for geometry calculations in KCL. It would help KCL users write transformations between planes for rotating geometry.

For example, this enables

```kcl
export fn crossProduct(@vectors) {
  a = vectors[0]
  b = vectors[1]
  x = a[1] * b[2] - (a[2] * b[1])
  y = a[2] * b[0] - (a[0] * b[2])
  z = a[0] * b[1] - (a[1] * b[0])
  return [x, y, z]
}

export fn normalOf(@plane) {
  return crossProduct([plane.xAxis, plane.yAxis])
}
```

## Implementation

My goal was just to enable a simple getter for planes, like `myPlane.xAxis` and yAxis and origins. That's nearly what happened, except I discovered that there's two ways to represent a plane: either `KclValue::Plane` or `KclValue::Object` with the right fields.

No matter which format your plane is represented as, it should behave consistently when you get its properties. Those properties should be returned as `[number; 3]` because that is how KCL represents points.

Unfortunately we actually require planes-as-objects to be defined with axes like `myPlane = { xAxis = { x = 1, y = 0, z = 0 }, ...}`, but that's a mistake in my opinion. So if you do use that representation of a plane, it should still return a [number; 3]. This required some futzing around so that we let you access object fields .x and .y as [0] and [1], which is weird, but whatever, I think it's good.

This PR is tested via planestuff.kcl which has a Rust unit test.

Part of the hole efforts, see https://github.com/KittyCAD/modeling-app/discussions/7543
2025-07-02 16:24:26 +00:00
1b75020686 Remove unused code to skip auth (#7280) 2025-07-02 14:49:34 +00:00
e668cb55f9 WIP 2025-07-01 19:49:05 -04:00
9942a65612 WIP 2025-07-01 19:38:47 -04:00
fba62dab98 Add parsing arrays and objects as binary operands (#7661)
* Add parsing arrays and objects as binary operands

* Add sim test showing the error message
2025-07-01 23:33:36 +00:00
187925ff21 Merge branch 'pierremtb/issue7657-Allow-all-sweeps-to-work-on-variable-less-profiles' into pierremtb/issue7615-Expose-global-optional-arg-for-all-point-and-click-transforms 2025-07-01 17:22:37 -04:00
4c1564e2b0 WIP: Allow all sweeps to work on variable-less profiles
Fixes #7657
2025-07-01 16:41:14 -04:00
50ac0244fd WIP transforms like sweep 2025-07-01 15:46:36 -04:00
a85a534d6b Release KCL 84 (#7653) kcl-84 2025-07-01 15:15:35 -04:00
6ddbb7a31d Fix unknown property error message on sketches and solids (#7632)
* Fix unknown property error message on sketches and solids

* Add suggestion for common case

* Move test code in file to avoid conflict
v1.0.8
2025-07-01 18:37:01 +00:00
051bb0589e KCL: rectangle function (#7616)
* KCL test for rectangle

* Rectangle function

* Rectangle helper tests

* Rectangle helper

* Fix clippy lints

* Update docs

* fmt

* Fix bug

* fmt

* Fix doc comments

* Update generated docs

---------

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-07-01 14:26:04 -04:00
7f9851ae28 [Chore]: Added url-checker, updated circular-deps, documented new static analysis .txt pattern (#7442)
* fix: ignoring url checker files

* fix: url checker

* fix: auto fmt and cleanup

* fix: moving the bash scripts and known files into the scripts repo

* fix: removed all url_results and made it be all in memory

* fix: fixed the newline issue

* fix: url checking as a step to the static analysis

* fix: removed old code

* chore: writing documentation on our static checker pattern

* fix: updating the docs more to be clearer

* fix: copy and paste without understanding requirements of ci cd dependencies? do i need all of these?

* fix: updating

* fix: I thought this got in?

* Update CONTRIBUTING.md

Co-authored-by: Jace Browning <jacebrowning@gmail.com>

---------

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
2025-07-01 13:01:42 -05:00
8d7858978f Merge branch 'main' into pierremtb/issue7615-Expose-global-optional-arg-for-all-point-and-click-transforms 2025-07-01 13:53:59 -04:00
fbcbb341e2 KCL: Add planeOf function to stdlib (#7643)
Gets the plane a face lies on, if any.

Closes #7642
2025-07-01 17:42:12 +00:00
4a080d1583 Bump @types/node from 22.15.32 to 24.0.3 in /packages/codemirror-lsp-client in the major group (#7490)
Bump @types/node in /packages/codemirror-lsp-client in the major group

Bumps the major group in /packages/codemirror-lsp-client with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 22.15.32 to 24.0.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-07-01 12:01:45 -04:00
85c721fb49 Add display of units for calculated KCL values (#7619)
* Add display of units in UI modals with calculated KCL values

* Fix command bar display to handle units

* Add display of units in the command bar

* Fix more cases of NaN from units

* Fix to support explicit plus for exponent in scientific notation

* Fix display in autocomplete

* Change to parseFloat to be more resilient

* Add e2e test for command bar

* Change an existing test to use explicit inline units

* Fix case when input string can't be parsed
2025-06-30 15:26:45 -04:00