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.
108 lines
1.9 KiB
Plaintext
108 lines
1.9 KiB
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Operations executed revolve_about_edge.kcl
|
|
---
|
|
[
|
|
{
|
|
"labeledArgs": {
|
|
"data": {
|
|
"value": {
|
|
"type": "String",
|
|
"value": "XY"
|
|
},
|
|
"sourceRange": [
|
|
26,
|
|
30,
|
|
0
|
|
]
|
|
}
|
|
},
|
|
"name": "startSketchOn",
|
|
"sourceRange": [
|
|
12,
|
|
31,
|
|
0
|
|
],
|
|
"type": "StdLibCall",
|
|
"unlabeledArg": null
|
|
},
|
|
{
|
|
"labeledArgs": {
|
|
"data": {
|
|
"value": {
|
|
"type": "String",
|
|
"value": "XY"
|
|
},
|
|
"sourceRange": [
|
|
146,
|
|
150,
|
|
0
|
|
]
|
|
}
|
|
},
|
|
"name": "startSketchOn",
|
|
"sourceRange": [
|
|
132,
|
|
151,
|
|
0
|
|
],
|
|
"type": "StdLibCall",
|
|
"unlabeledArg": null
|
|
},
|
|
{
|
|
"labeledArgs": {
|
|
"data": {
|
|
"value": {
|
|
"type": "Object",
|
|
"value": {
|
|
"angle": {
|
|
"type": "Number",
|
|
"value": 90.0,
|
|
"ty": {
|
|
"type": "Default",
|
|
"len": {
|
|
"type": "Mm"
|
|
},
|
|
"angle": {
|
|
"type": "Degrees"
|
|
}
|
|
}
|
|
},
|
|
"axis": {
|
|
"type": "TagIdentifier",
|
|
"value": "rectangleSegmentB001",
|
|
"artifact_id": "[uuid]"
|
|
}
|
|
}
|
|
},
|
|
"sourceRange": [
|
|
209,
|
|
271,
|
|
0
|
|
]
|
|
},
|
|
"sketch": {
|
|
"value": {
|
|
"type": "Sketch",
|
|
"value": {
|
|
"artifactId": "[uuid]"
|
|
}
|
|
},
|
|
"sourceRange": [
|
|
273,
|
|
274,
|
|
0
|
|
]
|
|
}
|
|
},
|
|
"name": "revolve",
|
|
"sourceRange": [
|
|
201,
|
|
275,
|
|
0
|
|
],
|
|
"type": "StdLibCall",
|
|
"unlabeledArg": null
|
|
}
|
|
]
|