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

@ -6,18 +6,18 @@ flowchart LR
4[Solid2d]
end
subgraph path13 [Path]
13["Path<br>[660, 747, 0]"]
14["Segment<br>[755, 834, 0]"]
15["Segment<br>[842, 921, 0]"]
16["Segment<br>[929, 1008, 0]"]
17["Segment<br>[1016, 1094, 0]"]
18["Segment<br>[1102, 1180, 0]"]
19["Segment<br>[1188, 1195, 0]"]
13["Path<br>[660, 720, 0]"]
14["Segment<br>[728, 807, 0]"]
15["Segment<br>[815, 894, 0]"]
16["Segment<br>[902, 981, 0]"]
17["Segment<br>[989, 1067, 0]"]
18["Segment<br>[1075, 1153, 0]"]
19["Segment<br>[1161, 1168, 0]"]
20[Solid2d]
end
subgraph path41 [Path]
41["Path<br>[1303, 1372, 0]"]
42["Segment<br>[1303, 1372, 0]"]
41["Path<br>[1276, 1345, 0]"]
42["Segment<br>[1276, 1345, 0]"]
43[Solid2d]
end
1["Plane<br>[320, 337, 0]"]
@ -29,7 +29,7 @@ flowchart LR
10["SweepEdge Adjacent"]
11["EdgeCut Fillet<br>[464, 530, 0]"]
12["EdgeCut Fillet<br>[464, 530, 0]"]
21["Sweep Extrusion<br>[1203, 1243, 0]"]
21["Sweep Extrusion<br>[1176, 1216, 0]"]
22[Wall]
23[Wall]
24[Wall]
@ -49,14 +49,14 @@ flowchart LR
38["SweepEdge Adjacent"]
39["SweepEdge Opposite"]
40["SweepEdge Adjacent"]
44["Sweep Extrusion<br>[1380, 1408, 0]"]
44["Sweep Extrusion<br>[1353, 1381, 0]"]
45[Wall]
46["Cap End"]
47["SweepEdge Opposite"]
48["SweepEdge Adjacent"]
49["EdgeCut Fillet<br>[1416, 1475, 0]"]
49["EdgeCut Fillet<br>[1389, 1448, 0]"]
50["StartSketchOnFace<br>[613, 652, 0]"]
51["StartSketchOnFace<br>[1258, 1295, 0]"]
51["StartSketchOnFace<br>[1231, 1268, 0]"]
1 --- 2
2 --- 3
2 ---- 5

View File

@ -854,92 +854,95 @@ description: Result of parsing rotate_after_fillet.kcl
{
"arguments": [
{
"commentStart": 0,
"elements": [
{
"commentStart": 0,
"end": 0,
"left": {
"abs_path": false,
"type": "LabeledArg",
"label": {
"commentStart": 0,
"end": 0,
"name": "at",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 0,
"elements": [
{
"commentStart": 0,
"end": 0,
"name": {
"left": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": "boltHexDrive",
"name": {
"commentStart": 0,
"end": 0,
"name": "boltHexDrive",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Identifier"
"type": "Name",
"type": "Name"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 0,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"commentStart": 0,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"operator": "/",
"right": {
"commentStart": 0,
"end": 0,
"name": "boltHexFlatLength",
"raw": "2",
"start": 0,
"type": "Identifier"
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "/",
"right": {
{
"commentStart": 0,
"end": 0,
"raw": "2",
"left": {
"abs_path": false,
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 0,
"end": 0,
"name": "boltHexFlatLength",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 0,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"commentStart": 0,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
"type": "BinaryExpression",
"type": "BinaryExpression"
}
],
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
@ -949,7 +952,7 @@ description: Result of parsing rotate_after_fillet.kcl
"name": {
"commentStart": 0,
"end": 0,
"name": "startProfileAt",
"name": "startProfile",
"start": 0,
"type": "Identifier"
},
@ -960,8 +963,9 @@ description: Result of parsing rotate_after_fillet.kcl
"commentStart": 0,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
},
{
"arguments": [

View File

@ -15,10 +15,7 @@ export fn bolt() {
// Define the sketch of the hex pattern on the screw head
hexPatternSketch = startSketchOn(boltHead, face = 'start')
|> startProfileAt([
boltHexDrive / 2,
boltHexFlatLength / 2
], %)
|> startProfile(at = [boltHexDrive / 2, boltHexFlatLength / 2])
|> angledLine(
angle = 270,
length = boltHexFlatLength,

View File

@ -9,8 +9,8 @@ description: Operations executed rotate_after_fillet.kcl
"type": "FunctionCall",
"name": "toRadians",
"functionSourceRange": [
11497,
11546,
11503,
11552,
1
],
"unlabeledArg": null,
@ -46,7 +46,7 @@ description: Operations executed rotate_after_fillet.kcl
"name": "bolt",
"functionSourceRange": [
264,
1565,
1538,
0
],
"unlabeledArg": null,

View File

@ -19,10 +19,10 @@ export fn bolt() {
// Define the sketch of the hex pattern on the screw head
hexPatternSketch = startSketchOn(boltHead, face = START)
|> startProfileAt([
|> startProfile(at = [
boltHexDrive / 2,
boltHexFlatLength / 2
], %)
])
|> angledLine(angle = 270, length = boltHexFlatLength)
|> angledLine(angle = 210, length = boltHexFlatLength)
|> angledLine(angle = 150, length = boltHexFlatLength)