ce566fb6e5
Accept idents as KW args ( #6644 )
...
Support kw arg/local variable shorthand
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-15 07:42:48 +12:00
cf2e9d4b91
Add kclVersion as a field of the setting attribute ( #6689 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-05-06 08:44:03 +12:00
4fe8741ea7
Remove CallExpression support ( #6639 )
...
Users MUST use keyword call syntax now.
Closes https://github.com/KittyCAD/modeling-app/issues/4600
2025-05-02 16:08:12 -05:00
1c697d30ee
Fix to not add extra spaces when formatting call ( #6652 )
2025-05-02 08:16:07 -05:00
89bae66257
KCL: User-defined KCL functions in examples etc now use keywords ( #6603 )
...
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.
2025-05-01 12:36:51 -04: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
83a87b046f
Declare std::offsetPlane in KCL ( #6344 )
...
* Declare std::offsetPlane in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org >
* Use two axes to define planes in KCL
Signed-off-by: Nick Cameron <nrc@ncameron.org >
---------
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-24 22:01:27 +12:00
f8ca6ad746
BREAKING: Change polygon to keyword args ( #6385 )
...
* Change polygon to keyword args
* Update docs
* Update generated output
* Update docs to mention the default for inscribed
* Appease clippy
* Remove tag parameter
* Update docs since removing tag
* Remove inscribed from autocomplete snippet since the default is true
2025-04-21 18:29:32 +00:00
90acc00369
Kwargs migration: arc/arcTo ( #6334 )
2025-04-18 17:40:44 -05:00
7d7b153085
Add START and END constants to std ( #6270 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-14 20:37:45 +12:00
319c60d4fa
BREAKING: Change tangential arc to keyword args ( #6266 )
...
* Change tangentialArc, tangentialArcTo, and tangentialArcToRelative to keyword args
* Change tangentialArc offset to angle and convert to kw arg calls
* Fix lints
* Fix sketch errors and all unit tests passing
* Fix tangentialArcTo calls in KCL samples
* Update tangentialArc in samples
* Update sim test output
* Fix formatting
* Fix mistake in merge
* Fix gear rack sample
* Update output after more samples fixes
* Update gear rack output
* Add end label to docs snippet
* Fix to not add endAbsolute for an arc with radius or angle arguments
* Update docs outputs
* Fix formatting
* Fix executor tests
* Fix formatting
* Fix bench input files
* Fix spelling
* Improve error messages
---------
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev >
2025-04-11 14:17:20 -04: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
fa16fcedff
update all kcl-samples w/ format ( #5999 )
2025-03-26 11:53:34 -04:00
58e0c0e916
Improve KCL Samples ( #5767 )
...
* improve KCL Samples & .gitignore
* update block and car wheel assembly
* update flange and lego, delete flange xy
* artifacts
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 >
* scale
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* docs
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 >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Jess Frazelle <github@jessfraz.com >
2025-03-13 23:38:51 -07:00