Kwargs: startProfileAt (#6424)

Previous:

```
startProfileAt([x, y], %)
startProfileAt([x, y], sketch001)
```

New:
```
startProfile(%, at = [x, y])
startProfile(sketch001, at = [x, y])
```
This commit is contained in:
Adam Chalmers
2025-04-25 16:01:35 -05:00
committed by GitHub
parent 9547e95e9d
commit ffbe20b586
573 changed files with 19805 additions and 16552 deletions

View File

@ -55,60 +55,63 @@ description: Result of parsing artifact_graph_example_code1.kcl
{
"arguments": [
{
"commentStart": 0,
"elements": [
{
"argument": {
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "at",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 0,
"elements": [
{
"argument": {
"commentStart": 0,
"end": 0,
"raw": "5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"raw": "5",
"operator": "-",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
{
"argument": {
"commentStart": 0,
"end": 0,
"raw": "5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"raw": "5",
"operator": "-",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 0,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
@ -118,7 +121,7 @@ description: Result of parsing artifact_graph_example_code1.kcl
"name": {
"commentStart": 0,
"end": 0,
"name": "startProfileAt",
"name": "startProfile",
"start": 0,
"type": "Identifier"
},
@ -129,8 +132,9 @@ description: Result of parsing artifact_graph_example_code1.kcl
"commentStart": 0,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [
@ -790,60 +794,63 @@ description: Result of parsing artifact_graph_example_code1.kcl
{
"arguments": [
{
"commentStart": 0,
"elements": [
{
"argument": {
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "at",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 0,
"elements": [
{
"argument": {
"commentStart": 0,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"raw": "2",
"operator": "-",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
{
"argument": {
{
"argument": {
"commentStart": 0,
"end": 0,
"raw": "6",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 6.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"raw": "6",
"operator": "-",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 6.0,
"suffix": "None"
}
},
"commentStart": 0,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 0,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
@ -853,7 +860,7 @@ description: Result of parsing artifact_graph_example_code1.kcl
"name": {
"commentStart": 0,
"end": 0,
"name": "startProfileAt",
"name": "startProfile",
"start": 0,
"type": "Identifier"
},
@ -864,8 +871,9 @@ description: Result of parsing artifact_graph_example_code1.kcl
"commentStart": 0,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [

View File

@ -1,5 +1,5 @@
sketch001 = startSketchOn('XY')
|> startProfileAt([-5, -5], %)
|> startProfile(at = [-5, -5])
|> line(end = [0, 10])
|> line(end = [10.55, 0], tag = $seg01)
|> line(end = [0, -10], tag = $seg02)
@ -8,7 +8,7 @@ sketch001 = startSketchOn('XY')
extrude001 = extrude(sketch001, length = -10)
|> fillet(radius = 5, tags = [seg01])
sketch002 = startSketchOn(extrude001, face = seg02)
|> startProfileAt([-2, -6], %)
|> startProfile(at = [-2, -6])
|> line(end = [2, 3])
|> line(end = [2, -3])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])

View File

@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing artifact_graph_example_code1.kcl
---
sketch001 = startSketchOn(XY)
|> startProfileAt([-5, -5], %)
|> startProfile(at = [-5, -5])
|> line(end = [0, 10])
|> line(end = [10.55, 0], tag = $seg01)
|> line(end = [0, -10], tag = $seg02)
@ -12,7 +12,7 @@ sketch001 = startSketchOn(XY)
extrude001 = extrude(sketch001, length = -10)
|> fillet(radius = 5, tags = [seg01])
sketch002 = startSketchOn(extrude001, face = seg02)
|> startProfileAt([-2, -6], %)
|> startProfile(at = [-2, -6])
|> line(end = [2, 3])
|> line(end = [2, -3])
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])