Move axes to std constants; move helix, revolve, and mirror2d to be declared in KCL (#6105)

Move axes to std constants; move helix, revolve, and mirror2d to be declated in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-04-03 22:44:52 +13:00
committed by GitHub
parent 3e4505e2e3
commit aad583be2e
167 changed files with 11811 additions and 38646 deletions

View File

@ -1,41 +1,41 @@
```mermaid
flowchart LR
subgraph path2 [Path]
2["Path<br>[208, 252, 0]"]
3["Segment<br>[258, 292, 0]"]
4["Segment<br>[298, 361, 0]"]
5["Segment<br>[367, 394, 0]"]
6["Segment<br>[400, 431, 0]"]
7["Segment<br>[437, 472, 0]"]
8["Segment<br>[478, 577, 0]"]
9["Segment<br>[583, 614, 0]"]
10["Segment<br>[620, 698, 0]"]
11["Segment<br>[704, 731, 0]"]
12["Segment<br>[737, 759, 0]"]
13["Segment<br>[765, 800, 0]"]
14["Segment<br>[806, 852, 0]"]
15["Segment<br>[858, 866, 0]"]
2["Path<br>[206, 250, 0]"]
3["Segment<br>[256, 290, 0]"]
4["Segment<br>[296, 359, 0]"]
5["Segment<br>[365, 392, 0]"]
6["Segment<br>[398, 429, 0]"]
7["Segment<br>[435, 470, 0]"]
8["Segment<br>[476, 575, 0]"]
9["Segment<br>[581, 612, 0]"]
10["Segment<br>[618, 696, 0]"]
11["Segment<br>[702, 729, 0]"]
12["Segment<br>[735, 757, 0]"]
13["Segment<br>[763, 798, 0]"]
14["Segment<br>[804, 850, 0]"]
15["Segment<br>[856, 864, 0]"]
16[Solid2d]
end
subgraph path60 [Path]
60["Path<br>[1056, 1100, 0]"]
61["Segment<br>[1106, 1140, 0]"]
62["Segment<br>[1146, 1209, 0]"]
63["Segment<br>[1215, 1242, 0]"]
64["Segment<br>[1248, 1279, 0]"]
65["Segment<br>[1285, 1320, 0]"]
66["Segment<br>[1326, 1425, 0]"]
67["Segment<br>[1431, 1462, 0]"]
68["Segment<br>[1468, 1546, 0]"]
69["Segment<br>[1552, 1579, 0]"]
70["Segment<br>[1585, 1607, 0]"]
71["Segment<br>[1613, 1648, 0]"]
72["Segment<br>[1654, 1700, 0]"]
73["Segment<br>[1706, 1714, 0]"]
60["Path<br>[1032, 1076, 0]"]
61["Segment<br>[1082, 1116, 0]"]
62["Segment<br>[1122, 1185, 0]"]
63["Segment<br>[1191, 1218, 0]"]
64["Segment<br>[1224, 1255, 0]"]
65["Segment<br>[1261, 1296, 0]"]
66["Segment<br>[1302, 1401, 0]"]
67["Segment<br>[1407, 1438, 0]"]
68["Segment<br>[1444, 1522, 0]"]
69["Segment<br>[1528, 1555, 0]"]
70["Segment<br>[1561, 1583, 0]"]
71["Segment<br>[1589, 1624, 0]"]
72["Segment<br>[1630, 1676, 0]"]
73["Segment<br>[1682, 1690, 0]"]
74[Solid2d]
end
1["Plane<br>[182, 202, 0]"]
17["Sweep Revolve<br>[877, 1016, 0]"]
1["Plane<br>[182, 200, 0]"]
17["Sweep Revolve<br>[875, 994, 0]"]
18[Wall]
19[Wall]
20[Wall]
@ -77,8 +77,8 @@ flowchart LR
56["SweepEdge Adjacent"]
57["SweepEdge Opposite"]
58["SweepEdge Adjacent"]
59["Plane<br>[1030, 1050, 0]"]
75["Sweep Extrusion<br>[1720, 1758, 0]"]
59["Plane<br>[1008, 1026, 0]"]
75["Sweep Extrusion<br>[1696, 1734, 0]"]
76[Wall]
77[Wall]
78[Wall]

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ front_length = 6
Fx = 0.5
Fy = 0.5
sketch001 = startSketchOn('-YZ')
sketch001 = startSketchOn(-YZ)
|> startProfileAt([back_walls_width / 2, 0], %)
|> xLine(length = wall_thickness / 2)
|> angledLineToX({ angle = 45, to = back_walls_width }, %, $seg01)
@ -34,14 +34,12 @@ part001 = revolve(
sketch001,
angle = 90,
axis = {
custom = {
axis = [1.0, 0.0],
origin = [0.0, height + .0000001]
}
direction = [1.0, 0.0],
origin = [0.0, height + .0000001]
},
)
sketch002 = startSketchOn('-YZ')
sketch002 = startSketchOn(-YZ)
|> startProfileAt([back_walls_width / 2, 0], %)
|> xLine(length = wall_thickness / 2)
|> angledLineToX({ angle = 45, to = back_walls_width }, %, $seg02)

View File

@ -7,8 +7,8 @@ description: Operations executed poop_chute.kcl
"labeledArgs": {
"data": {
"value": {
"type": "String",
"value": "-YZ"
"type": "Plane",
"artifact_id": "[uuid]"
},
"sourceRange": []
}
@ -19,6 +19,22 @@ description: Operations executed poop_chute.kcl
"unlabeledArg": null
},
{
"type": "KclStdLibCall",
"name": "revolve",
"unlabeledArg": {
"value": {
"type": "Array",
"value": [
{
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
}
]
},
"sourceRange": []
},
"labeledArgs": {
"angle": {
"value": {
@ -40,97 +56,81 @@ description: Operations executed poop_chute.kcl
"value": {
"type": "Object",
"value": {
"custom": {
"type": "Object",
"value": {
"axis": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
"direction": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
{
"type": "Number",
"value": 0.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
"angle": {
"type": "Degrees"
}
]
}
},
"origin": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 0.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
{
"type": "Number",
"value": 0.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
{
"type": "Number",
"value": 5.5000001,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
"angle": {
"type": "Degrees"
}
]
}
}
}
]
},
"origin": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 0.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
{
"type": "Number",
"value": 5.5000001,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
}
]
}
}
},
"sourceRange": []
}
},
"name": "revolve",
"sourceRange": [],
"type": "StdLibCall",
"unlabeledArg": {
"value": {
"type": "Sketch",
"value": {
"artifactId": "[uuid]"
}
},
"sourceRange": []
}
"sourceRange": []
},
{
"labeledArgs": {
"data": {
"value": {
"type": "String",
"value": "-YZ"
"type": "Plane",
"artifact_id": "[uuid]"
},
"sourceRange": []
}

View File

@ -139,9 +139,9 @@ description: Variables in memory after executing poop_chute.kcl
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 354,
"end": 360,
"start": 354,
"commentStart": 352,
"end": 358,
"start": 352,
"type": "TagDeclarator",
"value": "seg01"
},
@ -258,9 +258,9 @@ description: Variables in memory after executing poop_chute.kcl
0.0
],
"tag": {
"commentStart": 354,
"end": 360,
"start": 354,
"commentStart": 352,
"end": 358,
"start": 352,
"type": "TagDeclarator",
"value": "seg01"
},
@ -595,9 +595,9 @@ description: Variables in memory after executing poop_chute.kcl
0.0
],
"tag": {
"commentStart": 354,
"end": 360,
"start": 354,
"commentStart": 352,
"end": 358,
"start": 352,
"type": "TagDeclarator",
"value": "seg01"
},
@ -899,9 +899,9 @@ description: Variables in memory after executing poop_chute.kcl
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 1202,
"end": 1208,
"start": 1202,
"commentStart": 1178,
"end": 1184,
"start": 1178,
"type": "TagDeclarator",
"value": "seg02"
},
@ -1018,9 +1018,9 @@ description: Variables in memory after executing poop_chute.kcl
0.0
],
"tag": {
"commentStart": 1202,
"end": 1208,
"start": 1202,
"commentStart": 1178,
"end": 1184,
"start": 1178,
"type": "TagDeclarator",
"value": "seg02"
},

View File

@ -38,10 +38,8 @@ part001 = revolve(
sketch001,
angle = 90,
axis = {
custom = {
axis = [1.0, 0.0],
origin = [0.0, height + .0000001]
}
direction = [1.0, 0.0],
origin = [0.0, height + .0000001]
},
)