Files
modeling-app/rust/kcl-lib/tests/revolve_about_edge/program_memory.snap
Adam Chalmers 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

344 lines
6.5 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing revolve_about_edge.kcl
---
{
"rectangleSegmentB001": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "rectangleSegmentB001",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
71,
119,
0
]
},
"from": [
-25.0,
25.0
],
"tag": {
"end": 118,
"start": 97,
"type": "TagDeclarator",
"value": "rectangleSegmentB001"
},
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
"surface": null
},
"__meta": [
{
"sourceRange": [
97,
118,
0
]
}
]
},
"sketch001": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
71,
119,
0
]
},
"from": [
-25.0,
25.0
],
"tag": {
"end": 118,
"start": 97,
"type": "TagDeclarator",
"value": "rectangleSegmentB001"
},
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-25.0,
25.0
],
"to": [
-25.0,
25.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
65,
0
]
}
},
"tags": {
"rectangleSegmentB001": {
"type": "TagIdentifier",
"value": "rectangleSegmentB001",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
71,
119,
0
]
},
"from": [
-25.0,
25.0
],
"tag": {
"end": 118,
"start": 97,
"type": "TagDeclarator",
"value": "rectangleSegmentB001"
},
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
"surface": null
},
"__meta": [
{
"sourceRange": [
97,
118,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
37,
65,
0
]
}
]
}
},
"sketch002": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
157,
195,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
157,
195,
0
]
},
"ccw": true,
"center": [
-50.0,
0.0
],
"from": [
-40.0,
0.0
],
"radius": 10.0,
"tag": null,
"to": [
-40.0,
0.0
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-40.0,
0.0
],
"to": [
-40.0,
0.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
157,
195,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
157,
195,
0
]
}
]
},
"height": 0.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
157,
195,
0
]
}
]
}
}
}