fix subtract test (#6791)
* fix subtract test Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix subtract test Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -77,8 +77,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": -10.0,
|
||||
"y": -10.0,
|
||||
"x": -8.0,
|
||||
"y": -8.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
@ -106,8 +106,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 10.0,
|
||||
"y": -10.0,
|
||||
"x": 12.0,
|
||||
"y": -8.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": false
|
||||
@ -123,8 +123,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": 10.0,
|
||||
"y": 10.0,
|
||||
"x": 12.0,
|
||||
"y": 12.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": false
|
||||
@ -140,8 +140,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"segment": {
|
||||
"type": "line",
|
||||
"end": {
|
||||
"x": -10.0,
|
||||
"y": 10.0,
|
||||
"x": -8.0,
|
||||
"y": 12.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"relative": false
|
||||
@ -412,8 +412,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"y_axis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
},
|
||||
"size": 60.0,
|
||||
"clobber": false,
|
||||
@ -439,8 +439,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
"y": -1.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -453,8 +453,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"segment": {
|
||||
"type": "arc",
|
||||
"center": {
|
||||
"x": 2.0,
|
||||
"y": 2.0
|
||||
"x": 5.0,
|
||||
"y": 5.0
|
||||
},
|
||||
"radius": 2.0,
|
||||
"start": {
|
||||
@ -476,8 +476,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
"to": {
|
||||
"x": 4.0,
|
||||
"y": 2.0,
|
||||
"x": 7.0,
|
||||
"y": 5.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
@ -507,8 +507,8 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0
|
||||
"y": -1.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -518,7 +518,7 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"command": {
|
||||
"type": "extrude",
|
||||
"target": "[uuid]",
|
||||
"distance": 5.0,
|
||||
"distance": 34.0,
|
||||
"faces": null,
|
||||
"opposite": "None"
|
||||
}
|
||||
@ -594,6 +594,30 @@ description: Artifact commands subtract_cylinder_from_cube.kcl
|
||||
"face_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_object_transform",
|
||||
"object_id": "[uuid]",
|
||||
"transforms": [
|
||||
{
|
||||
"translate": {
|
||||
"property": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 3.14
|
||||
},
|
||||
"set": false,
|
||||
"is_local": true
|
||||
},
|
||||
"rotate_rpy": null,
|
||||
"rotate_angle_axis": null,
|
||||
"scale": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [],
|
||||
|
||||
@ -16,8 +16,8 @@ flowchart LR
|
||||
1["Plane<br>[27, 44, 0]"]
|
||||
2["Plane<br>[372, 389, 0]"]
|
||||
12["Sweep Extrusion<br>[306, 326, 0]"]
|
||||
13["Sweep Extrusion<br>[436, 455, 0]"]
|
||||
14["CompositeSolid Subtract<br>[468, 504, 0]"]
|
||||
13["Sweep Extrusion<br>[436, 456, 0]"]
|
||||
14["CompositeSolid Subtract<br>[494, 530, 0]"]
|
||||
15[Wall]
|
||||
16[Wall]
|
||||
17[Wall]
|
||||
|
||||
@ -765,24 +765,24 @@ description: Result of parsing subtract_cylinder_from_cube.kcl
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "0",
|
||||
"raw": "2",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"value": 2.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "0",
|
||||
"raw": "2",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 0.0,
|
||||
"value": 2.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
@ -867,7 +867,7 @@ description: Result of parsing subtract_cylinder_from_cube.kcl
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
@ -894,24 +894,24 @@ description: Result of parsing subtract_cylinder_from_cube.kcl
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "2",
|
||||
"raw": "5",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 2.0,
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "2",
|
||||
"raw": "5",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 2.0,
|
||||
"value": 5.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
@ -981,12 +981,12 @@ description: Result of parsing subtract_cylinder_from_cube.kcl
|
||||
"arg": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "5",
|
||||
"raw": "34",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 5.0,
|
||||
"value": 34.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
@ -1013,6 +1013,53 @@ description: Result of parsing subtract_cylinder_from_cube.kcl
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "z",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "3.14",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 3.14,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "translate",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
|
||||
@ -8,9 +8,10 @@ fn cube(center) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
part001 = cube(center = [0, 0])
|
||||
part002 = startSketchOn(XY)
|
||||
|> circle(center = [2, 2], radius = 2)
|
||||
|> extrude(length = 5)
|
||||
part001 = cube(center = [2, 2])
|
||||
part002 = startSketchOn(XZ)
|
||||
|> circle(center = [5, 5], radius = 2)
|
||||
|> extrude(length = 34)
|
||||
|> translate(z = 3.14)
|
||||
|
||||
fullPart = subtract([part001], tools=[part002])
|
||||
|
||||
@ -62,7 +62,7 @@ description: Operations executed subtract_cylinder_from_cube.kcl
|
||||
"value": [
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"value": 2.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
@ -75,7 +75,7 @@ description: Operations executed subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
{
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"value": 2.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
@ -112,7 +112,7 @@ description: Operations executed subtract_cylinder_from_cube.kcl
|
||||
"length": {
|
||||
"value": {
|
||||
"type": "Number",
|
||||
"value": 5.0,
|
||||
"value": 34.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
|
||||
@ -53,13 +53,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
10.0,
|
||||
-10.0
|
||||
12.0,
|
||||
-8.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -72,13 +72,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
10.0,
|
||||
-10.0
|
||||
12.0,
|
||||
-8.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
10.0,
|
||||
10.0
|
||||
12.0,
|
||||
12.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -91,13 +91,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
10.0,
|
||||
10.0
|
||||
12.0,
|
||||
12.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
-10.0,
|
||||
10.0
|
||||
-8.0,
|
||||
12.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -110,13 +110,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
-10.0,
|
||||
10.0
|
||||
-8.0,
|
||||
12.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -156,12 +156,12 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"start": {
|
||||
"from": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"to": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -233,13 +233,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
10.0,
|
||||
-10.0
|
||||
12.0,
|
||||
-8.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -252,13 +252,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
10.0,
|
||||
-10.0
|
||||
12.0,
|
||||
-8.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
10.0,
|
||||
10.0
|
||||
12.0,
|
||||
12.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -271,13 +271,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
10.0,
|
||||
10.0
|
||||
12.0,
|
||||
12.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
-10.0,
|
||||
10.0
|
||||
-8.0,
|
||||
12.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -290,13 +290,13 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
-10.0,
|
||||
10.0
|
||||
-8.0,
|
||||
12.0
|
||||
],
|
||||
"tag": null,
|
||||
"to": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"type": "ToPoint",
|
||||
"units": {
|
||||
@ -336,12 +336,12 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"start": {
|
||||
"from": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"to": [
|
||||
-10.0,
|
||||
-10.0
|
||||
-8.0,
|
||||
-8.0
|
||||
],
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -393,18 +393,18 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"ccw": true,
|
||||
"center": [
|
||||
2.0,
|
||||
2.0
|
||||
5.0,
|
||||
5.0
|
||||
],
|
||||
"from": [
|
||||
4.0,
|
||||
2.0
|
||||
7.0,
|
||||
5.0
|
||||
],
|
||||
"radius": 2.0,
|
||||
"tag": null,
|
||||
"to": [
|
||||
4.0,
|
||||
2.0
|
||||
7.0,
|
||||
5.0
|
||||
],
|
||||
"type": "Circle",
|
||||
"units": {
|
||||
@ -424,7 +424,7 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
}
|
||||
},
|
||||
"type": "plane",
|
||||
"value": "XY",
|
||||
"value": "XZ",
|
||||
"xAxis": {
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
@ -435,8 +435,8 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"yAxis": {
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 1.0,
|
||||
"units": {
|
||||
"type": "Unknown"
|
||||
}
|
||||
@ -444,12 +444,12 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
},
|
||||
"start": {
|
||||
"from": [
|
||||
4.0,
|
||||
2.0
|
||||
7.0,
|
||||
5.0
|
||||
],
|
||||
"to": [
|
||||
4.0,
|
||||
2.0
|
||||
7.0,
|
||||
5.0
|
||||
],
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
@ -466,7 +466,7 @@ description: Variables in memory after executing subtract_cylinder_from_cube.kcl
|
||||
"type": "Mm"
|
||||
}
|
||||
},
|
||||
"height": 5.0,
|
||||
"height": 34.0,
|
||||
"startCapId": "[uuid]",
|
||||
"endCapId": "[uuid]",
|
||||
"units": {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 74 KiB |
@ -12,9 +12,10 @@ fn cube(center) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
part001 = cube(center = [0, 0])
|
||||
part002 = startSketchOn(XY)
|
||||
|> circle(center = [2, 2], radius = 2)
|
||||
|> extrude(length = 5)
|
||||
part001 = cube(center = [2, 2])
|
||||
part002 = startSketchOn(XZ)
|
||||
|> circle(center = [5, 5], radius = 2)
|
||||
|> extrude(length = 34)
|
||||
|> translate(z = 3.14)
|
||||
|
||||
fullPart = subtract([part001], tools = [part002])
|
||||
|
||||
Reference in New Issue
Block a user