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
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
ccd5b0272d
Add math functions back to the prelude ( #6595 )
...
* Add math functions back to the prelude
* Update output
* Update docs
2025-04-30 11:07:05 -04:00
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
3a23ec1bee
Create std::units module ( #6528 )
...
Signed-off-by: Nick Cameron <nrc@ncameron.org >
2025-04-29 08:41:31 +12:00
6e115c19d5
KCL: Migrate hole to kwargs ( #6382 )
...
Previously:
`|> hole(circle(radius = 2, center = p), %)`
Now:
`|> subtract2d(tool = circle(radius = 2, center = p))`
2025-04-26 15:31:51 -05: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
90acc00369
Kwargs migration: arc/arcTo ( #6334 )
2025-04-18 17:40:44 -05:00
f9fbaa2298
Add files via upload ( #6227 )
...
* Add files via upload
Adding parametric pc fan and bottle
* Update and rename globals.kcl to parameters.kcl
* Update fan-housing.kcl
* Update fan-housing.kcl
* Update fan.kcl
* Update motor.kcl
* Update parameters.kcl
* Update kcl-samples simulation test output
* Update main.kcl
avoiding fn imports
* Update kcl-samples simulation test output
* remove functions
* angledLine kwargs
* tangentalArc kwargs
* Update kcl-samples simulation test output
* Update housing middle
more tweaks because I just can't help myself
* Update kcl-samples simulation test output
* Update kcl-samples simulation test output
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jgomez720 <114548659+jgomez720@users.noreply.github.com >
2025-04-17 17:46:56 +00:00