644c561815
Declare std::math in KCL (BREAKING) ( #6588 )
...
Declare std::math in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-30 03:59:19 +00:00
844f229b5a
Remove trig functions from prelude and change their unit handling (BREAKING) ( #6565 )
...
Remove trig functions from prelude and change their unit handling
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-30 12:40:11 +12:00
aca5fdb521
Remove some deprecated functions from std ( #6531 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-28 20:24:18 -04:00
3a23ec1bee
Create std::units module ( #6528 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-29 08:41:31 +12:00
0f88598dc0
BREAKING: Migrate math functions to keyword args ( #6491 )
2025-04-26 23:33:41 +00:00
ffbe20b586
Kwargs: startProfileAt ( #6424 )
...
Previous:
```
startProfileAt([x, y], %)
startProfileAt([x, y], sketch001)
```
New:
```
startProfile(%, at = [x, y])
startProfile(sketch001, at = [x, y])
```
2025-04-25 21:01:35 +00:00
b7385d5f25
Turn on units of measure (BREAKING CHANGE) ( #6343 )
...
* Turn on uom checks
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Convert all lengths to mm for engine calls
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-22 22:58:35 +00:00
f99e44e371
Kwargs: assert functions ( #6406 )
...
Closes https://github.com/KittyCAD/modeling-app/issues/6408
2025-04-22 17:44:52 +00:00
160f55ede5
BREAKING: More units of measure work and keyword args ( #6291 )
...
* More units of measure work
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Update CSG output since engine change
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
Co-authored-by: Nick Cameron <nrc@ncameron.org >
2025-04-14 09:58:19 +00:00
d275995dfe
KCL: Angled line should use keyword args ( #5803 )
...
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
997f539a8c
More numeric type propagations ( #6221 )
...
Last few numeric type propagations
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-09 11:46:54 +12:00
be05dd7ba1
More propagation of numeric types ( #6177 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-07 19:02:41 +12:00
3b2abe5814
Declare std kwarg functions in KCL and migrate circle ( #5955 )
...
* Support calling KCL std KW fns, and move circle to KCL std
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Doc comments on parameters
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Update grammar
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Change use of counterClockWise to ccw
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-03-24 21:55:24 +13:00
aea82e004a
KCL: Convert x/y lines to use keyword arguments ( #5615 )
...
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.
2025-03-07 22:07:16 -06:00
c3bdc6f106
Move the wasm lib, and cleanup rust directory and all references ( #5585 )
...
* git mv src/wasm-lib rust
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv wasm-lib to workspace
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv kcl-lib
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* mv derive docs
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* resolve file paths
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* clippy
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* move more shit
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix more paths
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make yarn build:wasm work
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix scripts
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixups
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* better references
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix cargo ci
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix reference
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix more ci
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cargo sort
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix script
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix a dep
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* sort
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* remove unused deps
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* Revert "remove unused deps"
This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972.
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* deps;
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 >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2025-03-01 21:59:01 +00:00