Files
modeling-app/rust/kcl-lib/tests/kcl_samples/socket-head-cap-screw/program_memory.snap
Nick Cameron 83a87b046f Declare std::offsetPlane in KCL (#6344)
* Declare std::offsetPlane in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Use two axes to define planes in KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-04-24 22:01:27 +12:00

949 lines
21 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing socket-head-cap-screw.kcl
---
{
"boltBody": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 1509,
"end": 1520,
"start": 1509,
"type": "TagDeclarator",
"value": "filletEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.095,
0.0
],
"radius": 0.095,
"tag": {
"commentStart": 1509,
"end": 1520,
"start": 1509,
"type": "TagDeclarator",
"value": "filletEdge"
},
"to": [
0.095,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "face",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Mm"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.1565,
0.0
],
"radius": 0.1565,
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"to": [
0.1565,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Mm"
}
}
},
"start": {
"from": [
0.1565,
0.0
],
"to": [
0.1565,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"topEdge": {
"type": "TagIdentifier",
"value": "topEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": -0.19,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
},
"units": {
"type": "Inches"
}
},
"start": {
"from": [
0.095,
0.0
],
"to": [
0.095,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"filletEdge": {
"type": "TagIdentifier",
"value": "filletEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": 1.0,
"startCapId": null,
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
}
},
"boltDiameter": {
"type": "Number",
"value": 0.19,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltHead": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.1565,
0.0
],
"radius": 0.1565,
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"to": [
0.1565,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Mm"
}
}
},
"start": {
"from": [
0.1565,
0.0
],
"to": [
0.1565,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"topEdge": {
"type": "TagIdentifier",
"value": "topEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": -0.19,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
}
},
"boltHeadDiameter": {
"type": "Number",
"value": 0.313,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltHeadLength": {
"type": "Number",
"value": 0.19,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltHexDrive": {
"type": "Number",
"value": 0.1563,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltHexFlatLength": {
"type": "Number",
"value": 0.0902,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"boltLength": {
"type": "Number",
"value": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"filletEdge": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "filletEdge"
},
"hexPatternSketch": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.0781,
0.0451
],
"tag": null,
"to": [
0.0781,
-0.0451
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.0781,
-0.0451
],
"tag": null,
"to": [
0.0,
-0.0902
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.0,
-0.0902
],
"tag": null,
"to": [
-0.0781,
-0.0451
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-0.0781,
-0.0451
],
"tag": null,
"to": [
-0.0781,
0.0451
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-0.0781,
0.0451
],
"tag": null,
"to": [
0.0,
0.0902
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.0,
0.0902
],
"tag": null,
"to": [
0.0781,
0.0451
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "face",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "start",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Mm"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.1565,
0.0
],
"radius": 0.1565,
"tag": {
"commentStart": 734,
"end": 742,
"start": 734,
"type": "TagDeclarator",
"value": "topEdge"
},
"to": [
0.1565,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Mm"
}
}
},
"start": {
"from": [
0.1565,
0.0
],
"to": [
0.1565,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"topEdge": {
"type": "TagIdentifier",
"value": "topEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": -0.19,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
},
"units": {
"type": "Inches"
}
},
"start": {
"from": [
0.0781,
0.0451
],
"to": [
0.0781,
0.0451
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": -0.14250000000000002,
"startCapId": "[uuid]",
"endCapId": null,
"units": {
"type": "Inches"
},
"sectional": false
}
},
"topEdge": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "topEdge"
}
}