diff --git a/ret0.json b/ret0.json new file mode 100644 index 000000000..672450986 --- /dev/null +++ b/ret0.json @@ -0,0 +1,128 @@ +{ + "type": "SketchGroup", + "type": "SketchGroup", + "id": "8586aa5a-2963-4725-9f61-e509fd821ec0", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "6e85dd35-e614-4848-8adb-9541efa02e82", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a6df3a20-8643-4d54-ab26-4e5908f66e08", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "f4dd7ea7-d6c5-42a8-9d76-579dbcef0d83", + "value": "b", + "sketchGroupId": "6b5ff2df-9fd9-41b0-a155-04051be2ab84", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3ade06b0-f81f-4e2d-9b94-5b0c648533a9", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "dd2f4ffb-dfc0-49c8-806b-74959306f440", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "f4dd7ea7-d6c5-42a8-9d76-579dbcef0d83", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] +} \ No newline at end of file diff --git a/ret1.json b/ret1.json new file mode 100644 index 000000000..3e0953c45 --- /dev/null +++ b/ret1.json @@ -0,0 +1,128 @@ +{ + "type": "SketchGroup", + "type": "SketchGroup", + "id": "40e761e2-cd8b-4353-8305-dddf1c015403", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "e80922aa-779f-41c9-ae5d-e5b9352d8b27", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ea01affc-f9e8-4ae0-be4c-adba8812ba75", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "e0128ab9-1f92-4ab5-8eed-d2d56baa541d", + "value": "a", + "sketchGroupId": "6b5ff2df-9fd9-41b0-a155-04051be2ab84", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "dc7dfae8-def1-494f-998a-baa83e361cf3", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "df18897b-d332-4286-a6f9-1ab50f66d69c", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e0128ab9-1f92-4ab5-8eed-d2d56baa541d", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] +} \ No newline at end of file diff --git a/src/wasm-lib/09ytV0I.json b/src/wasm-lib/09ytV0I.json new file mode 100644 index 000000000..e4b23592c --- /dev/null +++ b/src/wasm-lib/09ytV0I.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "7abd8be4-ddbf-4198-b3e4-068902092c95", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "b96c38b8-b3e4-4fc5-a1fc-220085433c5e", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7abd8be4-ddbf-4198-b3e4-068902092c95", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/27WzMO2.json b/src/wasm-lib/27WzMO2.json new file mode 100644 index 000000000..06442004c --- /dev/null +++ b/src/wasm-lib/27WzMO2.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1f0f5822-3b44-426f-833b-c32e6a6a3e07", + "name": "a", + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "5fb01486-114b-406d-bb6f-334371c94029", + "name": "b", + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "00db26e9-8dea-4002-9418-af0d6301972e", + "name": "c", + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0377700f-ed1d-4639-8c1d-824185c458a5", + "endCapId": "a880285e-be7b-445e-89ee-af5cd947b15c", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7a2be40f-be2e-4ab7-bd45-cc29464a2ed4", + "name": "arc-a", + "id": "8d33d671-f62a-48e9-8a7b-3999dd490b8a", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8d33d671-f62a-48e9-8a7b-3999dd490b8a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "064a3833-2078-42bd-995b-53ce76eaebbc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "363074f6-6288-4b30-a8f9-eb2ec8205421", + "endCapId": "4aa88212-2547-454a-b808-c5c4843984fa", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4bfbedd8-ea4d-4e7f-87b7-3314f0dc53d7", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "3e3e9738-c085-4385-9829-a3f0ccba3728", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a450bfc5-4b91-4aeb-a911-b19951188994", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "34a6e95d-1d51-4072-bf40-d1404301e3fd", + "value": "b", + "sketchGroupId": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "5fb01486-114b-406d-bb6f-334371c94029", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3115ac22-0223-47f4-a3a1-1f3594500e59", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "34a6e95d-1d51-4072-bf40-d1404301e3fd", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/2UzAFAS.json b/src/wasm-lib/2UzAFAS.json new file mode 100644 index 000000000..00c005af7 --- /dev/null +++ b/src/wasm-lib/2UzAFAS.json @@ -0,0 +1,716 @@ +{ + "root": { + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "79f2be94-5c00-4a25-9fa2-b0bd148072f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a19865aa-8cf1-487b-a2d2-8861c4054ce4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ff20a1f3-3535-482b-9fdc-42a01e7e009a", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "fcaf2842-2e4d-4db7-8554-078cd5a61284", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "949aab3c-33c2-47d7-a19c-bde1c93c9755", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "fcaf2842-2e4d-4db7-8554-078cd5a61284", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/310c8mq.json b/src/wasm-lib/310c8mq.json new file mode 100644 index 000000000..136074188 --- /dev/null +++ b/src/wasm-lib/310c8mq.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "0e3a111f-c69a-4f7a-8ac8-9494268b8535", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "3a401cba-3ae0-4536-9426-98462edba88b", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "0e3a111f-c69a-4f7a-8ac8-9494268b8535", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/3zpA9Wb.json b/src/wasm-lib/3zpA9Wb.json new file mode 100644 index 000000000..7f960fb00 --- /dev/null +++ b/src/wasm-lib/3zpA9Wb.json @@ -0,0 +1,716 @@ +{ + "root": { + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8e4750a3-06c2-4021-b925-1f79a3b4ed58", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4f8d035d-f07e-408d-baee-eac9560e0ff7", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "bf45d9cc-d829-4693-8e57-02d3d2c9c251", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "c7c076fc-df46-4260-8da6-8e81b57aba3b", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "adeb0ae4-9de8-445e-8842-933ac4e360a8", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c7c076fc-df46-4260-8da6-8e81b57aba3b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/5dFkr2H.json b/src/wasm-lib/5dFkr2H.json new file mode 100644 index 000000000..669e4180e --- /dev/null +++ b/src/wasm-lib/5dFkr2H.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a16a4701-dafe-4d1d-82b9-0da1641fde5e", + "name": "a", + "id": "ff28b371-b6e7-4b49-9fd0-1eb09c3db671", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a3666835-818b-43c1-b94e-d593f8b41886", + "name": "b", + "id": "b01c9b15-cfc8-4fd6-862b-6ea02f751fe3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "61117da5-7ed1-46de-99f2-35fb9421c932", + "name": "c", + "id": "e6535f04-7a56-418e-b41c-07cc102dddf5", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ff28b371-b6e7-4b49-9fd0-1eb09c3db671", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b01c9b15-cfc8-4fd6-862b-6ea02f751fe3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e6535f04-7a56-418e-b41c-07cc102dddf5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "d5dd7dd3-9f29-4ecb-8a21-c4c6cdc93acb", + "endCapId": "77d70dcf-2b3e-4c29-bd90-43e26a68fe46", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "363172ec-bfc5-4938-9f15-c3e878cca0d9", + "name": "arc-a", + "id": "e9f38ffd-32fa-42f4-b78d-a22cf0a03919", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "e9f38ffd-32fa-42f4-b78d-a22cf0a03919", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "fb423394-5c17-434b-a52a-fb7f961f1ff5", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "6e0c5b39-9609-4a19-8b21-4a2bb735bae3", + "endCapId": "600fd25a-86f5-4b44-9c7f-576510a9f35d", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 875, + 878 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "a6b0bbec-9007-4c05-b1cb-3b78af303724", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "ed3335eb-f0e1-4eaa-b2f5-f103ccfbdb2e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2562b87e-7f5f-413e-b8c1-e24a0abb3986", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "138908df-9928-4057-8200-df805ff9476f", + "value": "b", + "sketchGroupId": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "a3666835-818b-43c1-b94e-d593f8b41886", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "07b0e73d-6c61-4f80-a787-ba133e0eb2d1", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "138908df-9928-4057-8200-df805ff9476f", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/68SAQNl.json b/src/wasm-lib/68SAQNl.json new file mode 100644 index 000000000..ab84b23a7 --- /dev/null +++ b/src/wasm-lib/68SAQNl.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9a117b3b-ab10-4921-96c7-39416722f103", + "name": "a", + "id": "a051d0eb-70e7-4299-b69c-fe9f070a4383", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "aa222ce7-6926-45d0-8539-8604c5a06913", + "name": "b", + "id": "b51d4d76-451d-4e88-bc53-b9e95c50bef3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bb8ed3d7-6c6d-462a-b793-db8389de0887", + "name": "c", + "id": "2ba3b7c5-c481-495b-ab59-b14d671cf705", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "a051d0eb-70e7-4299-b69c-fe9f070a4383", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b51d4d76-451d-4e88-bc53-b9e95c50bef3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2ba3b7c5-c481-495b-ab59-b14d671cf705", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "fdb9f3ee-626c-414e-a381-2ad379c00162", + "endCapId": "f8fdf5cf-ff14-4c3c-b515-537964466da2", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "10a8ecf0-a556-4349-a927-ad1bfc0ead60", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "769c0bd9-96e5-4a7a-abae-5aabda25d60e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "31e01002-d303-4566-aa43-eb63acb79dbf", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "389414b3-c539-490e-8bbb-b124b81dcee8", + "value": "a", + "sketchGroupId": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "9a117b3b-ab10-4921-96c7-39416722f103", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "4a80f883-1aaa-4fa1-a6af-d9d88de83d4e", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "389414b3-c539-490e-8bbb-b124b81dcee8", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/6r2dLT3.json b/src/wasm-lib/6r2dLT3.json new file mode 100644 index 000000000..42b82e6f2 --- /dev/null +++ b/src/wasm-lib/6r2dLT3.json @@ -0,0 +1,1215 @@ +{ + "root": { + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "82d1d629-07fe-4259-b316-c4e674492c29", + "name": "a", + "id": "8e4750a3-06c2-4021-b925-1f79a3b4ed58", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3112e374-9508-4f21-972b-aadd273a0518", + "name": "b", + "id": "4f8d035d-f07e-408d-baee-eac9560e0ff7", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "cb368867-975f-40ea-81ea-cb219a3eeeb0", + "name": "c", + "id": "bf45d9cc-d829-4693-8e57-02d3d2c9c251", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8e4750a3-06c2-4021-b925-1f79a3b4ed58", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4f8d035d-f07e-408d-baee-eac9560e0ff7", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "bf45d9cc-d829-4693-8e57-02d3d2c9c251", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "ec665b72-aa95-42cb-933e-a91ed35a820e", + "endCapId": "5e6e201b-175f-4836-b70e-224cc188b126", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "34fee88d-a58d-491f-bc92-ca50142f7ae3", + "name": "arc-a", + "id": "ff52b414-747e-4d39-b502-5230a79e2766", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ff52b414-747e-4d39-b502-5230a79e2766", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "98ac9a6d-718e-4567-9676-f90d403c8535", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "903fcbf6-6c88-4e14-8d36-8ec4c1d78544", + "endCapId": "a9482fcb-15b4-42d8-b0b6-b027f43016b4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "255aa6d9-6de3-4a48-956b-cec7f2ae7189", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "b0178dd7-c681-4039-8b27-bc419fd0dcc5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6e66b0e3-1a10-4598-9c40-cdcf34fd4ccc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "e6cc5065-27d0-498d-afad-478718cf80a0", + "value": "b", + "sketchGroupId": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3112e374-9508-4f21-972b-aadd273a0518", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3e3f3f8a-2115-40ff-a6ec-9646695979e6", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e6cc5065-27d0-498d-afad-478718cf80a0", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/76tBa9P.json b/src/wasm-lib/76tBa9P.json new file mode 100644 index 000000000..c41060e7c --- /dev/null +++ b/src/wasm-lib/76tBa9P.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "0a80b628-c523-45e2-ab1b-775da060c8d2", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "11ffea84-a89b-432e-b693-447ffbba0d2f", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "0a80b628-c523-45e2-ab1b-775da060c8d2", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/7XrN3bX.json b/src/wasm-lib/7XrN3bX.json new file mode 100644 index 000000000..6288bc287 --- /dev/null +++ b/src/wasm-lib/7XrN3bX.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "78fb3026-5ae5-425e-95b9-37e9aa5b7fd4", + "name": "a", + "id": "4598a980-b1f3-4bd1-bdf3-66f356bff321", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a5634e28-2059-4bd0-8b3b-6f3bce18f376", + "name": "b", + "id": "791741d9-4cd8-4f13-bec4-97780e934151", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "be7c4237-8d26-4a53-8a2f-c0400c4cb9f2", + "name": "c", + "id": "04a888d1-dc0e-403d-9309-dfe59023193f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "4598a980-b1f3-4bd1-bdf3-66f356bff321", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "791741d9-4cd8-4f13-bec4-97780e934151", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "04a888d1-dc0e-403d-9309-dfe59023193f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "850cbb5f-500b-4f38-8653-c068ede2f609", + "endCapId": "fc863feb-ec79-4663-8e3b-d502edbc30c4", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a1aada1a-43db-4efc-95ce-90ac61cb1f33", + "name": "arc-b", + "id": "f8529801-371c-43c9-a340-eccf429c2ebb", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "f8529801-371c-43c9-a340-eccf429c2ebb", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "57551761-5f1f-497b-9c55-ca9afc12aa41", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3f7d3b2e-1cec-4ca0-ad06-68b72c4ae297", + "endCapId": "84c5093f-1a93-4ea1-be0d-03bd1b071ad9", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "56746b9a-9edb-4208-9247-08d20dea8d4a", + "name": "arc-a", + "id": "6529f575-c236-4143-b7e0-0da02684aef2", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6529f575-c236-4143-b7e0-0da02684aef2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "73db1d5a-b75c-4ab8-b120-7011bb2abca6", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "16487843-1bec-49f2-bb9b-e43c86e2269f", + "endCapId": "3c46e66c-e339-4231-ad15-cc144f7bad52", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/7oBhzWT.json b/src/wasm-lib/7oBhzWT.json new file mode 100644 index 000000000..f5aaee3c9 --- /dev/null +++ b/src/wasm-lib/7oBhzWT.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "78fb3026-5ae5-425e-95b9-37e9aa5b7fd4", + "name": "a", + "id": "4598a980-b1f3-4bd1-bdf3-66f356bff321", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a5634e28-2059-4bd0-8b3b-6f3bce18f376", + "name": "b", + "id": "791741d9-4cd8-4f13-bec4-97780e934151", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "be7c4237-8d26-4a53-8a2f-c0400c4cb9f2", + "name": "c", + "id": "04a888d1-dc0e-403d-9309-dfe59023193f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "4598a980-b1f3-4bd1-bdf3-66f356bff321", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "791741d9-4cd8-4f13-bec4-97780e934151", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "04a888d1-dc0e-403d-9309-dfe59023193f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "850cbb5f-500b-4f38-8653-c068ede2f609", + "endCapId": "fc863feb-ec79-4663-8e3b-d502edbc30c4", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "5b2b0391-6dc7-49db-b325-c92c6c782174", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6529f575-c236-4143-b7e0-0da02684aef2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "73db1d5a-b75c-4ab8-b120-7011bb2abca6", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "523c3605-4408-4d40-9aad-9275de98d549", + "value": "a", + "sketchGroupId": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "78fb3026-5ae5-425e-95b9-37e9aa5b7fd4", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2eed09bb-925e-48bb-9366-823df557428a", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "523c3605-4408-4d40-9aad-9275de98d549", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/7wbRkeY.json b/src/wasm-lib/7wbRkeY.json new file mode 100644 index 000000000..8b2066863 --- /dev/null +++ b/src/wasm-lib/7wbRkeY.json @@ -0,0 +1,1136 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3b5d4967-149a-4078-a3f9-05f4229dc2ba", + "name": "a", + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "889a5175-71f3-4720-a44d-58fad43d08e6", + "name": "b", + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9e35f842-b31f-4826-99d3-b6e2d4a8b2a3", + "name": "c", + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "41cc6138-f366-42df-b2bf-17ca86dc6675", + "endCapId": "2a99ff0a-445d-4f2b-874c-2d95b7c81e5d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "8f2a948e-009e-4ab0-9f32-9907e8439908", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "72c64e9a-7982-4548-a2f9-b0624a8c914e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "aefea688-e084-4db2-84f1-6e4a979d123d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7f6f687f-4959-4417-b5f2-f3167a5a448f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/841Tj6G.json b/src/wasm-lib/841Tj6G.json new file mode 100644 index 000000000..28ce29b67 --- /dev/null +++ b/src/wasm-lib/841Tj6G.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4664b91-44f5-4524-bb20-0ac32be91c76", + "name": "a", + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "812c2274-3b82-4328-b05e-968e341396af", + "name": "b", + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "354a1607-3cdd-4e31-9df2-a0420c502f31", + "name": "c", + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "60ab91b3-ef7a-47a3-95ab-e071fca6aaff", + "endCapId": "ea1da8fd-2ff5-4061-a273-005bb7c5f132", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "23f58cac-86da-4981-8084-9e098d96f2a7", + "name": "arc-a", + "id": "bf560458-1c1a-472b-abbf-a24e7355a3c9", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "bf560458-1c1a-472b-abbf-a24e7355a3c9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0c4b21ed-fbb4-4c94-b307-abe2275c4561", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "21ad7943-e0ef-41a8-bad2-65599dec92a8", + "endCapId": "b49ade4d-3a62-4d2c-97e9-2be40c1f5a50", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "68969dca-6174-4e8f-b6ce-754084857791", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "76088a33-2397-4fbc-97f7-9c810867e8e5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6faad31d-5790-47ef-b17c-53bbe717e07f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "4674b1a5-4d00-4087-9171-655f37adb8dd", + "value": "b", + "sketchGroupId": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "812c2274-3b82-4328-b05e-968e341396af", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8bd39aae-a3d6-45f3-9934-5a4c9f4be162", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "4674b1a5-4d00-4087-9171-655f37adb8dd", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/8RUCpaz.json b/src/wasm-lib/8RUCpaz.json new file mode 100644 index 000000000..64ecc306f --- /dev/null +++ b/src/wasm-lib/8RUCpaz.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "cfb31c55-853a-4f5c-93b2-77a9dc2c1c94", + "name": "a", + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3500fb23-ab59-46d4-a6de-7dbd00e205bf", + "name": "b", + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "90159a1c-5b1e-44ae-b3fc-35fd38317e59", + "name": "c", + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "032ae6fc-0958-4474-88f4-1321f5ab678a", + "endCapId": "c865cbdd-c63d-4326-96c2-1a69cc24b831", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "292664b5-444c-46b4-acf4-8430b29b992f", + "name": "arc-b", + "id": "4ea1d7ae-8233-41ce-82fd-226f4cbb80a9", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "4ea1d7ae-8233-41ce-82fd-226f4cbb80a9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c9702b04-f1ab-4e29-a89d-d47ebaf56fcd", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "26131d3c-51c9-4b3e-8ff5-8f48e82ff6c8", + "endCapId": "21ab5272-45d9-4bc8-abe0-a1f0f0d5cedb", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d09b9c69-5a6e-4dde-82d1-66deb0d117f9", + "name": "arc-a", + "id": "5d76f8db-0e29-4d44-98c4-03d92de872c5", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "5d76f8db-0e29-4d44-98c4-03d92de872c5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "36600808-5eab-4c3b-9dae-9c80df2c854f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b26cdf1b-6400-4e8d-82b6-cda12ad7ae35", + "endCapId": "e9575752-cece-49d5-81a3-29cabd06bf82", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/8WFFqL0.json b/src/wasm-lib/8WFFqL0.json new file mode 100644 index 000000000..35e5493bd --- /dev/null +++ b/src/wasm-lib/8WFFqL0.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8740c8db-3c48-4f8a-a99d-5cccd615c1bd", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "ac4fc064-fe7c-4c4d-ba99-0ded33174cec", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "7513ee3e-0c02-494a-ad73-47c12e6cf9c1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "8a455f41-7a4c-4817-bb1f-c676bd000cb2", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "60dc47f3-a40f-4dde-84a3-869081b78fde", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "8a455f41-7a4c-4817-bb1f-c676bd000cb2", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/9m40ngb.json b/src/wasm-lib/9m40ngb.json new file mode 100644 index 000000000..af2df921d --- /dev/null +++ b/src/wasm-lib/9m40ngb.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "50b94c84-8347-4979-b8ab-dce4e8d83d3a", + "name": "a", + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a5e88af5-04d1-4223-8a23-999d08e46d0e", + "name": "b", + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d32e78c5-b6e1-48b6-8c3c-44f94ace82dd", + "name": "c", + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "321df8c4-76fd-410e-aef9-55f414c03a9d", + "endCapId": "0f65e802-690f-4191-8196-ce3bb8f27d06", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "76319e8c-571c-4126-b48d-a603d6471e51", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ef138013-489a-4d3d-8de2-16a27e4ac4e9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8e79e996-cc94-4e7c-841e-18e78e58d15e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "df20f71f-3cba-4b8d-92f0-074d1d87f75a", + "value": "a", + "sketchGroupId": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "50b94c84-8347-4979-b8ab-dce4e8d83d3a", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "4aa603e9-c768-450e-bd3d-218b8c9dc26b", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "df20f71f-3cba-4b8d-92f0-074d1d87f75a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/A1VWYv0.json b/src/wasm-lib/A1VWYv0.json new file mode 100644 index 000000000..91f80686f --- /dev/null +++ b/src/wasm-lib/A1VWYv0.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d169e0c1-e217-4f34-bd5c-e355a524bfd0", + "name": "a", + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3671d3fb-5a1c-4a18-8497-088e1e1744bd", + "name": "b", + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8191a441-0823-4951-b104-299d2b767378", + "name": "c", + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b66c3a6c-6b21-4695-80a1-b7bde125a3e9", + "endCapId": "827fe57d-f6f9-4498-b932-dd5af06cb163", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "654ffadf-1ffe-4ea4-8be5-37b6580dc564", + "name": "arc-a", + "id": "edd79178-b775-446b-8462-c7a4119131f3", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "edd79178-b775-446b-8462-c7a4119131f3", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "4908f21f-e5ab-452a-9a29-c6ad1ad90666", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b2ba73d1-6115-47b6-9b5a-64b00c17b2b3", + "endCapId": "31fa6412-1f4d-4be5-9543-32a4acb0fb84", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "3750b129-9436-4c2e-8309-b58582f80df7", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "b1d950d2-83d7-43a2-9475-f53251849fa9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f80dc678-b5fa-4307-a88b-f518eac4eadc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "7adb1b65-cbaf-442d-81a8-6563844b1f78", + "value": "b", + "sketchGroupId": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3671d3fb-5a1c-4a18-8497-088e1e1744bd", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "89afdb6c-77cc-4ca7-9e15-8c40c75a43d3", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7adb1b65-cbaf-442d-81a8-6563844b1f78", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/A4xaoBU.json b/src/wasm-lib/A4xaoBU.json new file mode 100644 index 000000000..f99c87e19 --- /dev/null +++ b/src/wasm-lib/A4xaoBU.json @@ -0,0 +1,1265 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 721, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 721, + "body": [ + { + "type": "VariableDeclaration", + "type": "VariableDeclaration", + "start": 571, + "end": 708, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 575, + "end": 708, + "id": { + "type": "Identifier", + "start": 575, + "end": 576, + "name": "x" + }, + "init": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 579, + "end": 708, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 579, + "end": 600, + "callee": { + "type": "Identifier", + "start": 579, + "end": 592, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 593, + "end": 594, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 596, + "end": 599, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 606, + "end": 662, + "callee": { + "type": "Identifier", + "start": 606, + "end": 620, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 621, + "end": 658, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 622, + "end": 643, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 622, + "end": 634, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 622, + "end": 631, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 632, + "end": 633, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 637, + "end": 643, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 645, + "end": 657, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 645, + "end": 654, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 655, + "end": 656, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 660, + "end": 661 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 668, + "end": 694, + "callee": { + "type": "Identifier", + "start": 668, + "end": 671, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 672, + "end": 676, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 678, + "end": 679 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 681, + "end": 693, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 681, + "end": 687, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 690, + "end": 693, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 700, + "end": 708, + "callee": { + "type": "Identifier", + "start": 700, + "end": 705, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 706, + "end": 707 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "kind": "let" + }, + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 711, + "end": 719, + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 718, + "end": 719, + "name": "x" + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 721 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "74d9bf69-036c-4793-b346-6100f2ae11ee", + "name": "a", + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "85730386-c1d8-48ac-ac7b-f38ddd8c5975", + "name": "b", + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d54b7cba-0467-47a6-8a23-a0c39a0647dc", + "name": "c", + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0c336890-7751-42a7-a1a6-8b9b59cda307", + "endCapId": "13d4f026-7734-4d7e-ab77-84ca43b0c483", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 749, + 752 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "x": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fb8365b0-7299-47a1-9341-9eb5c5ab4f1a", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7c6e7935-9b6b-49b0-8b75-fd1e0b42765e", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "on": { + "type": "face", + "id": "6a3030df-a829-4e74-a4f4-da2c8a458d7d", + "value": "a", + "sketchGroupId": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "74d9bf69-036c-4793-b346-6100f2ae11ee", + "__meta": [ + { + "sourceRange": [ + 579, + 600 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "90425582-e054-47e0-891d-252c3edf71c1", + "sourceRange": [ + 606, + 662 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6a3030df-a829-4e74-a4f4-da2c8a458d7d", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fb8365b0-7299-47a1-9341-9eb5c5ab4f1a", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7c6e7935-9b6b-49b0-8b75-fd1e0b42765e", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "on": { + "type": "face", + "id": "6a3030df-a829-4e74-a4f4-da2c8a458d7d", + "value": "a", + "sketchGroupId": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "74d9bf69-036c-4793-b346-6100f2ae11ee", + "__meta": [ + { + "sourceRange": [ + 579, + 600 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "90425582-e054-47e0-891d-252c3edf71c1", + "sourceRange": [ + 606, + 662 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6a3030df-a829-4e74-a4f4-da2c8a458d7d", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/AJiKnrW.json b/src/wasm-lib/AJiKnrW.json new file mode 100644 index 000000000..d4eb36323 --- /dev/null +++ b/src/wasm-lib/AJiKnrW.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "50b94c84-8347-4979-b8ab-dce4e8d83d3a", + "name": "a", + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a5e88af5-04d1-4223-8a23-999d08e46d0e", + "name": "b", + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d32e78c5-b6e1-48b6-8c3c-44f94ace82dd", + "name": "c", + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "321df8c4-76fd-410e-aef9-55f414c03a9d", + "endCapId": "0f65e802-690f-4191-8196-ce3bb8f27d06", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c1c4b190-712e-4338-a63f-0436693084a8", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2fae8148-4c80-4373-b03e-63f53da20511", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "475427ac-08b1-441c-9a4e-53b4245b4aa1", + "name": "arc-a", + "id": "ef138013-489a-4d3d-8de2-16a27e4ac4e9", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ef138013-489a-4d3d-8de2-16a27e4ac4e9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8e79e996-cc94-4e7c-841e-18e78e58d15e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "d52b25bf-ef87-4b92-ad4a-3f5684535cac", + "endCapId": "022daf1e-d20b-4a01-a38b-e96d62f3f802", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/ALUK7Za.json b/src/wasm-lib/ALUK7Za.json new file mode 100644 index 000000000..71a66775c --- /dev/null +++ b/src/wasm-lib/ALUK7Za.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1665c659-1b60-4c0f-8a74-36795ad14dc1", + "name": "a", + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f8aef73c-94e5-4f53-ae3c-5cabdd8d3a78", + "name": "b", + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "764278f1-e337-486f-bc03-029767ef1296", + "name": "c", + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c32c4411-6be9-4105-911f-4c24390831be", + "endCapId": "91397c29-07a4-4cde-8726-c1bf25a08023", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c6c0bd72-1321-4534-adbc-dad22952009a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5637783a-6547-4d97-a29c-8b2565f2a639", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a70da842-c202-46f5-946d-49f706f516e7", + "name": "arc-a", + "id": "0791e17b-b5ca-4224-a1f2-a3a882876d03", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0791e17b-b5ca-4224-a1f2-a3a882876d03", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "51d0d19b-8ef7-4dfc-a4cd-f7e5d16e0c8f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "fa5e72f2-4f22-44b6-995e-5e4281ccaee4", + "endCapId": "508d16ec-3130-4541-837c-e3f0fd02674f", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/ARvrLfh.json b/src/wasm-lib/ARvrLfh.json new file mode 100644 index 000000000..c157684b4 --- /dev/null +++ b/src/wasm-lib/ARvrLfh.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "91748005-f1f8-4756-ac06-544e4b92e2af", + "name": "a", + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7f2525e2-611d-40b5-b611-80626065f769", + "name": "b", + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "81f0b2f9-e861-4ad9-84d9-4e6430bf1202", + "name": "c", + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4d851ba7-6119-481f-9b6f-47c640d48386", + "endCapId": "3ebf6fdd-a354-47c2-9efe-06f9d95171d7", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "0b8543b6-5512-4d22-9734-c44d04367e28", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6536c585-2815-41d8-a8c9-568b0347e5a5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a48ad09a-e95b-4557-a203-368ce7828d6c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "98f5c269-3b4c-4e9b-90e1-28f4e6a55f07", + "value": "a", + "sketchGroupId": "03cbdcb2-2f14-427a-9211-72924db46b36", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "91748005-f1f8-4756-ac06-544e4b92e2af", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "332ff4a8-eef0-4f9b-9cac-2c94253d36bd", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "98f5c269-3b4c-4e9b-90e1-28f4e6a55f07", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/BLTMOSY.json b/src/wasm-lib/BLTMOSY.json new file mode 100644 index 000000000..c6fb63243 --- /dev/null +++ b/src/wasm-lib/BLTMOSY.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3e18cc5d-b708-4ee8-916a-134051d208b0", + "name": "a", + "id": "b99366da-efe0-4812-b503-10af34df0c2f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad96fa27-042b-41d0-8645-fa4ac6e9ab72", + "name": "b", + "id": "4a90731e-d7db-4834-9457-ec54abefd66d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b1b464b2-6e92-4d41-a220-87cc4be7c753", + "name": "c", + "id": "d5803e62-b5ea-4ce1-98e0-1c53d4a90d61", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b99366da-efe0-4812-b503-10af34df0c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4a90731e-d7db-4834-9457-ec54abefd66d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d5803e62-b5ea-4ce1-98e0-1c53d4a90d61", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "6f9d6606-bc44-409e-b0cd-fce35855c5ae", + "endCapId": "8f64bcfc-6933-429c-8e6a-7de8c4cef8fb", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "5580d7ac-a83c-435b-937c-246b7ae1d2a4", + "name": "arc-b", + "id": "4f6891a1-efbc-4723-a662-438beefd29aa", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "4f6891a1-efbc-4723-a662-438beefd29aa", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6a2831b5-43fb-4383-848a-d2abfebce07f", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f716528f-ba91-48fa-95d4-5440803b91e1", + "endCapId": "22886f36-2f43-43e6-b866-f1fe58b77057", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0ab152bc-20f6-495c-9d19-37ff5e40ecce", + "name": "arc-a", + "id": "8f47fea5-9d72-42f8-930b-bac45cde4fc7", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8f47fea5-9d72-42f8-930b-bac45cde4fc7", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5a814f70-c4c2-4bb7-b984-8e07831cc1b7", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c666db79-5788-457f-a780-b0f3bc0d252b", + "endCapId": "d6e5e61e-3011-40c3-aaeb-dbf98bf0875b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/Cargo.lock b/src/wasm-lib/Cargo.lock index 7b92e1134..2a88acdab 100644 --- a/src/wasm-lib/Cargo.lock +++ b/src/wasm-lib/Cargo.lock @@ -1947,6 +1947,7 @@ dependencies = [ "mime_guess", "parse-display 0.9.0", "pretty_assertions", + "rand 0.8.5", "reqwest", "ropey", "schemars", @@ -1958,7 +1959,7 @@ dependencies = [ "tokio-tungstenite", "toml", "tower-lsp", - "ts-rs", + "ts-rs 8.1.0", "twenty-twenty", "url", "uuid", @@ -4388,6 +4389,16 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "ts-rs" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2cae1fc5d05d47aa24b64f9a4f7cba24cdc9187a2084dd97ac57bef5eccae6" +dependencies = [ + "thiserror", + "ts-rs-macros 7.1.1", +] + [[package]] name = "ts-rs" version = "8.1.0" @@ -4395,11 +4406,24 @@ source = "git+https://github.com/Aleph-Alpha/ts-rs#badbac08e61e65b312880aa64e9ec dependencies = [ "chrono", "thiserror", - "ts-rs-macros", + "ts-rs-macros 8.1.0", "url", "uuid", ] +[[package]] +name = "ts-rs-macros" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f7f9b821696963053a89a7bd8b292dc34420aea8294d7b225274d488f3ec92" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.65", + "termcolor", +] + [[package]] name = "ts-rs-macros" version = "8.1.0" @@ -4740,11 +4764,13 @@ dependencies = [ "kcl-lib", "kittycad", "pretty_assertions", + "rand 0.8.5", "reqwest", "serde_json", "tokio", "toml", "tower-lsp", + "ts-rs 7.1.1", "twenty-twenty", "uuid", "wasm-bindgen", diff --git a/src/wasm-lib/Cargo.toml b/src/wasm-lib/Cargo.toml index 14d604f46..b1411f552 100644 --- a/src/wasm-lib/Cargo.toml +++ b/src/wasm-lib/Cargo.toml @@ -15,6 +15,7 @@ clap = "4.5.4" gloo-utils = "0.2.0" kcl-lib = { path = "kcl" } kittycad = { workspace = true } +rand = "0.8.5" serde_json = "1.0.116" tokio = { version = "1.37.0", features = ["sync"] } toml = "0.8.13" @@ -31,6 +32,7 @@ reqwest = { version = "0.11.26", default-features = false } tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros", "time"] } twenty-twenty = "0.7" uuid = { version = "1.8.0", features = ["v4", "js", "serde"] } +ts-rs = { version = "7.1.1", features = ["no-serde-warnings"] } [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.7" @@ -84,3 +86,4 @@ path = "tests/modify/main.rs" #kittycad-execution-plan-traits = { path = "../../../modeling-api/execution-plan-traits" } #kittycad-modeling-cmds = { path = "../../../modeling-api/modeling-cmds" } #kittycad-modeling-session = { path = "../../../modeling-api/modeling-session" } + diff --git a/src/wasm-lib/CpdsOGc.json b/src/wasm-lib/CpdsOGc.json new file mode 100644 index 000000000..0b20b812b --- /dev/null +++ b/src/wasm-lib/CpdsOGc.json @@ -0,0 +1,1215 @@ +{ + "root": { + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8b5c849c-12c4-49ba-a158-d25c5403d81d", + "name": "a", + "id": "3160120b-5758-4688-88eb-32a6630653f0", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b268c839-0e47-4ac9-b2f9-611b0b9f00d0", + "name": "b", + "id": "2933e624-1c3d-4519-b7ab-3be23628045b", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d28b4fae-f76a-4059-b2e9-1d9880605421", + "name": "c", + "id": "8efe3f7e-9193-4128-86a1-9a0ca1a6d5a5", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3160120b-5758-4688-88eb-32a6630653f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2933e624-1c3d-4519-b7ab-3be23628045b", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "8efe3f7e-9193-4128-86a1-9a0ca1a6d5a5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "37ec7f11-79fe-41f6-bd47-f4acb0d60e26", + "endCapId": "abc58940-75c1-43c0-a121-e803d4fc56f3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b76b59fe-2529-4a34-9446-7ff808e566dd", + "name": "arc-a", + "id": "9b5403ae-c53c-42d8-b5d0-836b55573b23", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "9b5403ae-c53c-42d8-b5d0-836b55573b23", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "611b5b07-1eb3-493a-9d99-a8dfaffd9900", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "68dc966f-4966-498c-8fd0-9acb10d4a482", + "endCapId": "64fb1570-6de8-4b9c-a57a-cd29e487556c", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "1567815b-27df-448e-ade4-43a166f57605", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "f0cab58b-df71-4a00-8435-e3512dce9784", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7c87b014-b8fb-4ad2-8d83-112150bfb4a3", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "0b0adc23-21bc-4a4c-a9ba-bbb77207f243", + "value": "b", + "sketchGroupId": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "b268c839-0e47-4ac9-b2f9-611b0b9f00d0", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f8c9ea9d-077b-4ee0-bcbd-39db81ea3921", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "0b0adc23-21bc-4a4c-a9ba-bbb77207f243", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/D28j9u7.json b/src/wasm-lib/D28j9u7.json new file mode 100644 index 000000000..b2d18a332 --- /dev/null +++ b/src/wasm-lib/D28j9u7.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "37f584fe-44ff-4df9-98dd-930a2c9010f3", + "name": "a", + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad4cd00a-578d-4f79-a8cd-1d63c8ae2c1c", + "name": "b", + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "97bc2237-75e7-4118-b679-0519bc2aaf05", + "name": "c", + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f1a7f52f-6960-4d2b-88ca-73b2fad7c96e", + "endCapId": "2360f971-4bef-460e-8e48-affe3b22d792", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "81d614b5-d447-4285-a3bc-48c4be405da6", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "baa9f7c4-f94f-4a7a-a85e-e346796a214e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6753922-4d52-44ad-916d-8662ba154c11", + "name": "arc-a", + "id": "ca307167-b657-456c-aaff-cd3629f1a27e", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ca307167-b657-456c-aaff-cd3629f1a27e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2c5dcd5f-12aa-4c9d-8ff3-eef55c92ad86", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c53e5f10-ebde-4f7f-ae10-80ed8e2f1232", + "endCapId": "d9b228e7-2298-4d9b-9223-25d40790874a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/D766Q1w.json b/src/wasm-lib/D766Q1w.json new file mode 100644 index 000000000..88a998813 --- /dev/null +++ b/src/wasm-lib/D766Q1w.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad6266c1-1b9e-46ea-82d7-2460ec427bd3", + "name": "a", + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ae8b8199-fde0-4185-b3e5-40fd67b0a9f6", + "name": "b", + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "525a8614-1d3e-4a4c-a498-4f9e41861e60", + "name": "c", + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "5ac7c534-d331-4865-b21d-6c131e5cbed8", + "endCapId": "33888a1d-ce60-422a-b948-60c40323b5dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "44aa365d-b42c-436b-92a3-03a3b7fc9a26", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "29202001-2750-4a41-8d59-cca41f9b0a66", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "99e286ad-dcb5-4464-9b52-69195ea3b59b", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "7ee5128f-9864-44fe-846e-15ebf8cc51fd", + "value": "a", + "sketchGroupId": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "ad6266c1-1b9e-46ea-82d7-2460ec427bd3", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "dfaa5a71-d431-4dc8-a8ba-191d86b58070", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7ee5128f-9864-44fe-846e-15ebf8cc51fd", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/DeP9fPn.json b/src/wasm-lib/DeP9fPn.json new file mode 100644 index 000000000..3ec1ebdbb --- /dev/null +++ b/src/wasm-lib/DeP9fPn.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1f0f5822-3b44-426f-833b-c32e6a6a3e07", + "name": "a", + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "5fb01486-114b-406d-bb6f-334371c94029", + "name": "b", + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "00db26e9-8dea-4002-9418-af0d6301972e", + "name": "c", + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0377700f-ed1d-4639-8c1d-824185c458a5", + "endCapId": "a880285e-be7b-445e-89ee-af5cd947b15c", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "3e3e9738-c085-4385-9829-a3f0ccba3728", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a450bfc5-4b91-4aeb-a911-b19951188994", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7a2be40f-be2e-4ab7-bd45-cc29464a2ed4", + "name": "arc-a", + "id": "8d33d671-f62a-48e9-8a7b-3999dd490b8a", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8d33d671-f62a-48e9-8a7b-3999dd490b8a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "064a3833-2078-42bd-995b-53ce76eaebbc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "363074f6-6288-4b30-a8f9-eb2ec8205421", + "endCapId": "4aa88212-2547-454a-b808-c5c4843984fa", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/Di97t4N.json b/src/wasm-lib/Di97t4N.json new file mode 100644 index 000000000..c739a167b --- /dev/null +++ b/src/wasm-lib/Di97t4N.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4664b91-44f5-4524-bb20-0ac32be91c76", + "name": "a", + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "812c2274-3b82-4328-b05e-968e341396af", + "name": "b", + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "354a1607-3cdd-4e31-9df2-a0420c502f31", + "name": "c", + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "60ab91b3-ef7a-47a3-95ab-e071fca6aaff", + "endCapId": "ea1da8fd-2ff5-4061-a273-005bb7c5f132", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "bb2bba8d-c05e-4770-999e-b01beb011f4c", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "bf560458-1c1a-472b-abbf-a24e7355a3c9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0c4b21ed-fbb4-4c94-b307-abe2275c4561", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "9c589c22-4e66-4bb7-897d-d4404a0b7d83", + "value": "a", + "sketchGroupId": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "f4664b91-44f5-4524-bb20-0ac32be91c76", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "07a915ad-9502-4793-b56c-018305b1fb49", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "9c589c22-4e66-4bb7-897d-d4404a0b7d83", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Dkzy6Xu.json b/src/wasm-lib/Dkzy6Xu.json new file mode 100644 index 000000000..9a9c659a2 --- /dev/null +++ b/src/wasm-lib/Dkzy6Xu.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "78ce61b1-a34d-4439-bfd8-3b664fb64c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2be52eca-a42a-4475-8ff4-48cdcfe820e3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e439372c-e556-4ae3-8c0e-effbaf158cf1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "02d75303-75cc-4296-a606-a0a8e482f67d", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "a5144c56-d219-454d-adbf-b7ee890f9f43", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "02d75303-75cc-4296-a606-a0a8e482f67d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/E1QLq4z.json b/src/wasm-lib/E1QLq4z.json new file mode 100644 index 000000000..cede3224b --- /dev/null +++ b/src/wasm-lib/E1QLq4z.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "67a68bb5-dd19-410b-9159-01bfeeee4093", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "85454d31-15a7-4302-bcf3-51298c8d6e20", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "67a68bb5-dd19-410b-9159-01bfeeee4093", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/E2ZZ2Ju.json b/src/wasm-lib/E2ZZ2Ju.json new file mode 100644 index 000000000..255f45f21 --- /dev/null +++ b/src/wasm-lib/E2ZZ2Ju.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9a117b3b-ab10-4921-96c7-39416722f103", + "name": "a", + "id": "a051d0eb-70e7-4299-b69c-fe9f070a4383", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "aa222ce7-6926-45d0-8539-8604c5a06913", + "name": "b", + "id": "b51d4d76-451d-4e88-bc53-b9e95c50bef3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bb8ed3d7-6c6d-462a-b793-db8389de0887", + "name": "c", + "id": "2ba3b7c5-c481-495b-ab59-b14d671cf705", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "a051d0eb-70e7-4299-b69c-fe9f070a4383", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b51d4d76-451d-4e88-bc53-b9e95c50bef3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2ba3b7c5-c481-495b-ab59-b14d671cf705", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "fdb9f3ee-626c-414e-a381-2ad379c00162", + "endCapId": "f8fdf5cf-ff14-4c3c-b515-537964466da2", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0d0a577b-88ef-4b3a-aac4-1776ec10cdd2", + "name": "arc-b", + "id": "19680dac-56a8-4c17-8237-fd749235e864", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "19680dac-56a8-4c17-8237-fd749235e864", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "16a44715-bfd5-4f81-aa1f-80e4d9b6ff5c", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b4cb1ce2-bf3f-4f85-a6ea-4db36ef41798", + "endCapId": "1e0bacf6-5bb5-442f-a6d0-5817167ad68b", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "840eacc9-c6fc-48e7-b97b-b6313b7faff1", + "name": "arc-a", + "id": "769c0bd9-96e5-4a7a-abae-5aabda25d60e", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "769c0bd9-96e5-4a7a-abae-5aabda25d60e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "31e01002-d303-4566-aa43-eb63acb79dbf", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e2663bfa-0c26-4f80-82e6-3336db12f388", + "endCapId": "6d807993-0ec5-4f3b-9759-8ac8a8c95a20", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/EfLwLrB.json b/src/wasm-lib/EfLwLrB.json new file mode 100644 index 000000000..bbf756150 --- /dev/null +++ b/src/wasm-lib/EfLwLrB.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "461921ce-1e42-44c2-959c-3bb1c7a9a4d1", + "name": "a", + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6cf06f1-483e-4c08-a199-4380936d17fc", + "name": "b", + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7fe777a2-8c82-4702-ab87-d5110c1cd8aa", + "name": "c", + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c7391937-727e-4f1d-80aa-9aee5aa70360", + "endCapId": "9eed37be-c7da-4cf6-a353-cc4c5da636dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "210b6b41-ece5-4fef-b36a-ce022a3afbe7", + "name": "arc-a", + "id": "f4aacb94-1d10-4fea-8188-ce2fd3f68495", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "f4aacb94-1d10-4fea-8188-ce2fd3f68495", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6c3e4c5a-312b-49ec-9065-b9ea8c9aaa57", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "2b0e2032-5a5b-4082-8908-ead48a6412b4", + "endCapId": "ca5dfb1b-3119-4d1b-ad20-af1622a65ef5", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "b913514b-5675-4594-abf8-836eff380a90", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "707534eb-62a8-4044-9fc3-67a065aba8f9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f2b63eca-f22a-4971-8a53-211ed1540c57", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "d0f7bf9b-e2b0-4a7b-b0bb-7a44071ed442", + "value": "b", + "sketchGroupId": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "d6cf06f1-483e-4c08-a199-4380936d17fc", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1ed7076a-4341-4ef3-a286-4e080bd3953c", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "d0f7bf9b-e2b0-4a7b-b0bb-7a44071ed442", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/F2CDcnI.json b/src/wasm-lib/F2CDcnI.json new file mode 100644 index 000000000..17d78a37e --- /dev/null +++ b/src/wasm-lib/F2CDcnI.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "336fed79-218b-4054-af3e-5fcef6218610", + "name": "a", + "id": "8740c8db-3c48-4f8a-a99d-5cccd615c1bd", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "98cb12bb-0bae-4766-88b3-6b9c0ef136a4", + "name": "b", + "id": "ac4fc064-fe7c-4c4d-ba99-0ded33174cec", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7dc52fa3-960a-4045-b486-c28b5d0aa6a6", + "name": "c", + "id": "7513ee3e-0c02-494a-ad73-47c12e6cf9c1", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8740c8db-3c48-4f8a-a99d-5cccd615c1bd", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "ac4fc064-fe7c-4c4d-ba99-0ded33174cec", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "7513ee3e-0c02-494a-ad73-47c12e6cf9c1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c3e816cc-855f-4f29-ae9c-452d76db40e2", + "endCapId": "bb93b35e-796a-4550-9c1f-cabd00d1596c", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "0888c1c7-fb0a-4373-9c84-200b554dd628", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "7ba51a67-a267-47e9-8f33-0f8a85c7475b", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8f2ef187-d084-43ef-8c81-7baa63211549", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "1b318ff9-94ed-4749-bde8-325dafb7853a", + "value": "a", + "sketchGroupId": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "336fed79-218b-4054-af3e-5fcef6218610", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3ed265d9-a3f3-465a-ab06-90578b341496", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "1b318ff9-94ed-4749-bde8-325dafb7853a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Fk9EkFW.json b/src/wasm-lib/Fk9EkFW.json new file mode 100644 index 000000000..a93a970cd --- /dev/null +++ b/src/wasm-lib/Fk9EkFW.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c05abf7-6c59-4e7a-8f88-39ef046a5983", + "name": "a", + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2358fe38-a6c0-4bb4-8b90-056cc8e22880", + "name": "b", + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1cbb3546-56d8-4be6-9523-c695846b71b6", + "name": "c", + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3f20e37a-fb3f-4f04-a9e3-491a510f8fc4", + "endCapId": "912b8824-db3a-4803-aed9-cf0d7da8c99d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2e074545-ff40-40df-83e4-7494348bb44d", + "name": "arc-a", + "id": "ad26bf80-0265-4ee6-9afa-cabb323a49ce", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ad26bf80-0265-4ee6-9afa-cabb323a49ce", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5596ee94-546d-47a6-bc85-a8f6b112b5a2", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0cb7cb46-7500-4054-aae2-4a78a998f288", + "endCapId": "d9b9fd17-791f-48df-b19c-fead0aeeb09b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "080b18dc-47f7-416e-a472-b1a4b36bbaa9", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "2c76e0ab-4507-4791-909a-81e1383b84a1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8aa17d11-0a42-4cbf-8788-7fecf6514a77", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "6bff38e4-1e73-4518-b95d-f5b1e0267e55", + "value": "b", + "sketchGroupId": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "2358fe38-a6c0-4bb4-8b90-056cc8e22880", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "b1a68622-0fe3-45ff-8b4c-e4682a22b0a7", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6bff38e4-1e73-4518-b95d-f5b1e0267e55", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/G7oUqGR.json b/src/wasm-lib/G7oUqGR.json new file mode 100644 index 000000000..030095d9d --- /dev/null +++ b/src/wasm-lib/G7oUqGR.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "4e736fe2-3aa2-48e1-b8fa-94eefe0270a6", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "a0983600-a628-47fb-975c-baf8b70264a2", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "4e736fe2-3aa2-48e1-b8fa-94eefe0270a6", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/GMn2aTv.json b/src/wasm-lib/GMn2aTv.json new file mode 100644 index 000000000..e860e1656 --- /dev/null +++ b/src/wasm-lib/GMn2aTv.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "384569b4-6cb8-4b97-92d0-93b539e49800", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f6bb7e9b-10ec-4ca2-99dd-41f291f69325", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "eec6d14a-a2c5-4940-ad0d-ae080cb9fe4e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "8d647e31-1eaf-42e0-82ef-f294c9d227b1", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "88e73cbf-a5fc-49a3-84c2-c9a81b360646", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "8d647e31-1eaf-42e0-82ef-f294c9d227b1", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/GfRSwuv.json b/src/wasm-lib/GfRSwuv.json new file mode 100644 index 000000000..dd344d7fb --- /dev/null +++ b/src/wasm-lib/GfRSwuv.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "daf4845e-3f6d-436a-84a5-873e200858e9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b5669359-88e3-4aac-a9ec-f84d0bf4372c", + "name": "a", + "id": "508155c6-2c82-4f8f-8586-6a2aaa5e668c", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bcae2fee-21f2-434b-922d-615f247cb6ca", + "name": "b", + "id": "565695a6-b471-4f92-8918-8ee7c90a6978", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c2bd900d-564e-47d0-9f17-d7d4787557aa", + "name": "c", + "id": "52652e26-1a84-4d7b-a886-78ee804396bd", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "508155c6-2c82-4f8f-8586-6a2aaa5e668c", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "565695a6-b471-4f92-8918-8ee7c90a6978", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "52652e26-1a84-4d7b-a886-78ee804396bd", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "72f0d5d8-59c3-4137-abdc-95a1afd027f7", + "endCapId": "e510af33-fbf9-4447-ac6a-d9493367f1f6", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "daf4845e-3f6d-436a-84a5-873e200858e9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "854eadc5-8d61-4a1e-9ae1-2877db20d841", + "name": "arc-a", + "id": "7f2e4330-766b-4756-87fe-599c0d1c7ca4", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "7f2e4330-766b-4756-87fe-599c0d1c7ca4", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e8b2d6ea-f834-4267-ae4b-e65baad19fab", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c074565f-d2eb-4aaf-9cda-24ba878fe51b", + "endCapId": "d1d40289-4651-4779-b5e0-7d945fc7ab20", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4b8f8c50-fc74-4468-9e16-149b80427e2e", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "1dec47cf-5d87-4278-a3fb-ed6bbca238ae", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6e7cd466-740b-4003-891a-4ef79b0e32a9", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "fc842f47-836e-466a-8081-3fc98a833d8a", + "value": "b", + "sketchGroupId": "daf4845e-3f6d-436a-84a5-873e200858e9", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "bcae2fee-21f2-434b-922d-615f247cb6ca", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2b393ad3-7aa0-44ed-8a12-94efe9659c1a", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "fc842f47-836e-466a-8081-3fc98a833d8a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/HBzXWCW.json b/src/wasm-lib/HBzXWCW.json new file mode 100644 index 000000000..3ca4a4261 --- /dev/null +++ b/src/wasm-lib/HBzXWCW.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "bdeaa8a6-9d04-43e6-b95f-5f946a0fc91c", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "a051d0eb-70e7-4299-b69c-fe9f070a4383", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b51d4d76-451d-4e88-bc53-b9e95c50bef3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2ba3b7c5-c481-495b-ab59-b14d671cf705", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "1ae39b21-f145-4b27-a7cd-8d60eeb56029", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "9fec1525-7feb-464a-9875-e75523d5d130", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "1ae39b21-f145-4b27-a7cd-8d60eeb56029", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/HMpdS0z.json b/src/wasm-lib/HMpdS0z.json new file mode 100644 index 000000000..87412a908 --- /dev/null +++ b/src/wasm-lib/HMpdS0z.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7a60b404-772f-4e48-94b5-dfff2f9f3fe3", + "name": "a", + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2da95170-f962-4eaf-85b8-cb8b355c419a", + "name": "b", + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7442bd43-3f11-4502-bcd1-bb442d9cc0d8", + "name": "c", + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "497388b4-03ad-436a-be49-680dccdbd81b", + "endCapId": "b11ba6f3-5a68-4797-bef8-e91461cae3de", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "ebc507d9-8b08-432e-965a-063669606cd2", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "9929b3b6-e9ec-441a-af1f-95ffdfdc48e2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1c76d600-e9ac-4eba-8716-5d3773adbd6d", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "bfb68b13-703a-41f8-bf41-cfc2752ec8fd", + "value": "a", + "sketchGroupId": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "7a60b404-772f-4e48-94b5-dfff2f9f3fe3", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "68a48ca9-b4d6-4462-a057-1950bb030d4b", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "bfb68b13-703a-41f8-bf41-cfc2752ec8fd", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/HNfJEjU.json b/src/wasm-lib/HNfJEjU.json new file mode 100644 index 000000000..0d189aa08 --- /dev/null +++ b/src/wasm-lib/HNfJEjU.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d169e0c1-e217-4f34-bd5c-e355a524bfd0", + "name": "a", + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3671d3fb-5a1c-4a18-8497-088e1e1744bd", + "name": "b", + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8191a441-0823-4951-b104-299d2b767378", + "name": "c", + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b66c3a6c-6b21-4695-80a1-b7bde125a3e9", + "endCapId": "827fe57d-f6f9-4498-b932-dd5af06cb163", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "b1d950d2-83d7-43a2-9475-f53251849fa9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f80dc678-b5fa-4307-a88b-f518eac4eadc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "654ffadf-1ffe-4ea4-8be5-37b6580dc564", + "name": "arc-a", + "id": "edd79178-b775-446b-8462-c7a4119131f3", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "edd79178-b775-446b-8462-c7a4119131f3", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "4908f21f-e5ab-452a-9a29-c6ad1ad90666", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b2ba73d1-6115-47b6-9b5a-64b00c17b2b3", + "endCapId": "31fa6412-1f4d-4be5-9543-32a4acb0fb84", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/HPX1J4g.json b/src/wasm-lib/HPX1J4g.json new file mode 100644 index 000000000..b1eedb7ae --- /dev/null +++ b/src/wasm-lib/HPX1J4g.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c05abf7-6c59-4e7a-8f88-39ef046a5983", + "name": "a", + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2358fe38-a6c0-4bb4-8b90-056cc8e22880", + "name": "b", + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1cbb3546-56d8-4be6-9523-c695846b71b6", + "name": "c", + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3f20e37a-fb3f-4f04-a9e3-491a510f8fc4", + "endCapId": "912b8824-db3a-4803-aed9-cf0d7da8c99d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "481677b2-d446-40df-a479-54994ebcf54f", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ad26bf80-0265-4ee6-9afa-cabb323a49ce", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5596ee94-546d-47a6-bc85-a8f6b112b5a2", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "92820b19-e78c-4c3b-9d75-2898b83d3b2d", + "value": "a", + "sketchGroupId": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3c05abf7-6c59-4e7a-8f88-39ef046a5983", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "307bf2e9-60c7-4287-8f28-918da6ed43b0", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "92820b19-e78c-4c3b-9d75-2898b83d3b2d", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Hh6A7Zl.json b/src/wasm-lib/Hh6A7Zl.json new file mode 100644 index 000000000..fc4974c55 --- /dev/null +++ b/src/wasm-lib/Hh6A7Zl.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e3535ead-67ee-4756-8efe-301c8bfab24b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "c80f25d2-c27a-4249-ae46-8a2ab39dc238", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d02e7289-4ac0-477d-a5fa-c3e989282dea", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "e124e55b-d107-4f57-bc38-fdea99ee8651", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "a2dad633-56b0-4887-a069-a778e2dbb266", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e124e55b-d107-4f57-bc38-fdea99ee8651", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/HrlKDmw.json b/src/wasm-lib/HrlKDmw.json new file mode 100644 index 000000000..280273387 --- /dev/null +++ b/src/wasm-lib/HrlKDmw.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "cfb31c55-853a-4f5c-93b2-77a9dc2c1c94", + "name": "a", + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3500fb23-ab59-46d4-a6de-7dbd00e205bf", + "name": "b", + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "90159a1c-5b1e-44ae-b3fc-35fd38317e59", + "name": "c", + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "032ae6fc-0958-4474-88f4-1321f5ab678a", + "endCapId": "c865cbdd-c63d-4326-96c2-1a69cc24b831", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "a4ed3fb1-3456-49e2-adcf-13e283183fba", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "5d76f8db-0e29-4d44-98c4-03d92de872c5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "36600808-5eab-4c3b-9dae-9c80df2c854f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "2a58efc9-5cbf-42ed-9b84-350ed878be78", + "value": "a", + "sketchGroupId": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "cfb31c55-853a-4f5c-93b2-77a9dc2c1c94", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "eb1186e5-8874-4599-a18f-2cf88720b0f7", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "2a58efc9-5cbf-42ed-9b84-350ed878be78", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/I0OcY52.json b/src/wasm-lib/I0OcY52.json new file mode 100644 index 000000000..5361889d8 --- /dev/null +++ b/src/wasm-lib/I0OcY52.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "96899d9f-1605-4937-8154-af281d3e72c0", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "b6d0f142-ec59-4b7c-9fc9-aeed539f1300", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "96899d9f-1605-4937-8154-af281d3e72c0", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/IFgZALs.json b/src/wasm-lib/IFgZALs.json new file mode 100644 index 000000000..c4444b264 --- /dev/null +++ b/src/wasm-lib/IFgZALs.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3e18cc5d-b708-4ee8-916a-134051d208b0", + "name": "a", + "id": "b99366da-efe0-4812-b503-10af34df0c2f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad96fa27-042b-41d0-8645-fa4ac6e9ab72", + "name": "b", + "id": "4a90731e-d7db-4834-9457-ec54abefd66d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b1b464b2-6e92-4d41-a220-87cc4be7c753", + "name": "c", + "id": "d5803e62-b5ea-4ce1-98e0-1c53d4a90d61", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b99366da-efe0-4812-b503-10af34df0c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4a90731e-d7db-4834-9457-ec54abefd66d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d5803e62-b5ea-4ce1-98e0-1c53d4a90d61", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "6f9d6606-bc44-409e-b0cd-fce35855c5ae", + "endCapId": "8f64bcfc-6933-429c-8e6a-7de8c4cef8fb", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "aaec527e-c700-4d4e-b9d2-7fbfca457a42", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8f47fea5-9d72-42f8-930b-bac45cde4fc7", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5a814f70-c4c2-4bb7-b984-8e07831cc1b7", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "6422c511-0ab8-4ac1-92f5-5b5fd33b0e46", + "value": "a", + "sketchGroupId": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3e18cc5d-b708-4ee8-916a-134051d208b0", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2a4309ef-8ccc-4b94-a577-19f2520034fc", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6422c511-0ab8-4ac1-92f5-5b5fd33b0e46", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/IMhEvrj.json b/src/wasm-lib/IMhEvrj.json new file mode 100644 index 000000000..861a4d2cf --- /dev/null +++ b/src/wasm-lib/IMhEvrj.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "91748005-f1f8-4756-ac06-544e4b92e2af", + "name": "a", + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7f2525e2-611d-40b5-b611-80626065f769", + "name": "b", + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "81f0b2f9-e861-4ad9-84d9-4e6430bf1202", + "name": "c", + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4d851ba7-6119-481f-9b6f-47c640d48386", + "endCapId": "3ebf6fdd-a354-47c2-9efe-06f9d95171d7", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "4ff47c4c-294d-4829-bfa4-78c5b124eee9", + "name": "arc-a", + "id": "6536c585-2815-41d8-a8c9-568b0347e5a5", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6536c585-2815-41d8-a8c9-568b0347e5a5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a48ad09a-e95b-4557-a203-368ce7828d6c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "937ca9e1-befc-489f-9a87-0d6f80626ff1", + "endCapId": "55922b3a-2fc5-4326-aa73-a8cd1c7ed86e", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1160, + 1163 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "ba6d434a-1dc1-4e7b-a1b6-ec695285a5bc", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "87fe8169-7216-4d55-a614-adec3da5955d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e123eabb-2c6c-4988-af7d-e8ff3bbcb19c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "93f483cd-e53f-4c32-9a39-ebd05f290069", + "value": "b", + "sketchGroupId": "03cbdcb2-2f14-427a-9211-72924db46b36", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "7f2525e2-611d-40b5-b611-80626065f769", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "d5ca1c33-9277-46fd-a09c-007871849ce8", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "93f483cd-e53f-4c32-9a39-ebd05f290069", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/ISlRN9P.json b/src/wasm-lib/ISlRN9P.json new file mode 100644 index 000000000..d3b83ecea --- /dev/null +++ b/src/wasm-lib/ISlRN9P.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "6e30ca99-6353-4c90-aab7-e7d415b88cf9", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "3731a237-f1d7-48cc-9d03-6fc9545918f9", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6e30ca99-6353-4c90-aab7-e7d415b88cf9", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/JHN21D5.json b/src/wasm-lib/JHN21D5.json new file mode 100644 index 000000000..b63142288 --- /dev/null +++ b/src/wasm-lib/JHN21D5.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "9a01101d-6713-479f-ad68-7bcff86ebd96", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "74cd61b0-bb07-4349-a0d8-3360d4bc8d8b", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "9a01101d-6713-479f-ad68-7bcff86ebd96", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/KE38znc.json b/src/wasm-lib/KE38znc.json new file mode 100644 index 000000000..dd197210b --- /dev/null +++ b/src/wasm-lib/KE38znc.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bbf5706c-292e-455d-bc0d-7c306bf3079a", + "name": "a", + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "443f36e7-7e87-4b07-b7c1-0813540906f8", + "name": "b", + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d5fe579a-f308-41ce-8704-3cfa5e0146f9", + "name": "c", + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "81c6a6c9-8657-4751-b3b9-5756573343e8", + "endCapId": "c3e0d3b3-f60c-42cf-843c-933ddaeb739f", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0e23baee-3788-4b5d-907b-3eead6ec27e6", + "name": "arc-a", + "id": "0642c482-6b49-4b27-8f8d-d67d13f1a32d", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0642c482-6b49-4b27-8f8d-d67d13f1a32d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f17f4eaf-fb2f-43c1-a8d4-937c349a3c0f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "11e0e684-e03d-4158-8982-52798db5de73", + "endCapId": "907a1536-c797-438a-861b-c3c6c34d4c79", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "76ff1ce7-7e98-4a9c-909c-5f731ea4ec80", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "1f519b96-b298-4b7b-a099-edb04d5571e1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5efbd464-504e-48ed-b431-0cf0e00d72b3", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "f436b768-6fda-4cbe-92a6-29734821161b", + "value": "b", + "sketchGroupId": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "443f36e7-7e87-4b07-b7c1-0813540906f8", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "681485bf-e8ee-478b-b99a-0bba733b3046", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "f436b768-6fda-4cbe-92a6-29734821161b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/MGir5GO.json b/src/wasm-lib/MGir5GO.json new file mode 100644 index 000000000..889a6c0a6 --- /dev/null +++ b/src/wasm-lib/MGir5GO.json @@ -0,0 +1,716 @@ +{ + "root": { + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3160120b-5758-4688-88eb-32a6630653f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2933e624-1c3d-4519-b7ab-3be23628045b", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "8efe3f7e-9193-4128-86a1-9a0ca1a6d5a5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "62739beb-ce3e-4c8c-9f69-ef644aba96dc", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "b31c6d6a-6c55-42b8-8a1b-b8d6a46ee37c", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "62739beb-ce3e-4c8c-9f69-ef644aba96dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/N20FFgy.json b/src/wasm-lib/N20FFgy.json new file mode 100644 index 000000000..03d2f8bd1 --- /dev/null +++ b/src/wasm-lib/N20FFgy.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c9519f0-0c6b-4de9-9373-79b6269d2b55", + "name": "a", + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6ad40c93-1adf-4039-9744-4a8485d11560", + "name": "b", + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "883ab1c4-01c2-4425-82f1-6ef82ef10e0e", + "name": "c", + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "49e92cd5-c361-4fce-9124-a3a956a95819", + "endCapId": "18272a8b-c818-4b87-987f-b9f20bd5684b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "92c70c53-4d17-4f87-9269-1bb36b5ac1d4", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c34e3b75-acc8-450b-876a-21bf7c5c25e0", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a7177fae-267f-4163-b0b4-660841b7cbb0", + "name": "arc-a", + "id": "532d38cf-e1a8-45b8-b1be-7923da5d8214", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "532d38cf-e1a8-45b8-b1be-7923da5d8214", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a6f4e48c-d509-44da-91d2-2291e70699ff", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "1b0c052e-cef6-43ca-8379-9c866d606376", + "endCapId": "324797c0-4b54-4ad2-a77d-74214dc36b87", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/NOoYEhM.json b/src/wasm-lib/NOoYEhM.json new file mode 100644 index 000000000..9a76e128c --- /dev/null +++ b/src/wasm-lib/NOoYEhM.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1665c659-1b60-4c0f-8a74-36795ad14dc1", + "name": "a", + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f8aef73c-94e5-4f53-ae3c-5cabdd8d3a78", + "name": "b", + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "764278f1-e337-486f-bc03-029767ef1296", + "name": "c", + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c32c4411-6be9-4105-911f-4c24390831be", + "endCapId": "91397c29-07a4-4cde-8726-c1bf25a08023", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a70da842-c202-46f5-946d-49f706f516e7", + "name": "arc-a", + "id": "0791e17b-b5ca-4224-a1f2-a3a882876d03", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0791e17b-b5ca-4224-a1f2-a3a882876d03", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "51d0d19b-8ef7-4dfc-a4cd-f7e5d16e0c8f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "fa5e72f2-4f22-44b6-995e-5e4281ccaee4", + "endCapId": "508d16ec-3130-4541-837c-e3f0fd02674f", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "d0d21a3e-f38f-4e0f-bb10-357d7f90fce8", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c6c0bd72-1321-4534-adbc-dad22952009a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5637783a-6547-4d97-a29c-8b2565f2a639", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "413beb73-12ff-4c38-bb14-5b2660e8cfbf", + "value": "b", + "sketchGroupId": "960e1f65-772e-4cce-94fd-353c788ffced", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "f8aef73c-94e5-4f53-ae3c-5cabdd8d3a78", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e4de30a2-d649-4f0e-9705-c1822acafa28", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "413beb73-12ff-4c38-bb14-5b2660e8cfbf", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/NTxZoEs.json b/src/wasm-lib/NTxZoEs.json new file mode 100644 index 000000000..18577aa68 --- /dev/null +++ b/src/wasm-lib/NTxZoEs.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0fd1dec6-c8fc-4ebf-9ffa-c4649b8c0e5b", + "name": "a", + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3154046e-49b1-4373-aa28-a63ffff42c53", + "name": "b", + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4e8fe98-8348-4ca6-bdf0-a376e4f9ad47", + "name": "c", + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "2cfb30cb-aee9-489e-ad70-c48fec1417b7", + "endCapId": "1cea57e1-e7d6-4fd9-9bea-e9a4e840203e", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "32b2917d-89a1-47df-b4f5-09c64c294e6c", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "800d8975-bb2a-49ac-a71b-971b88a5b204", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "655b3cdb-fb80-4fb3-977a-979098fd3b4f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "e039beaf-790a-4392-970b-8fffd845005c", + "value": "a", + "sketchGroupId": "2b9b68d7-7279-4734-8275-931f5ec54805", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "0fd1dec6-c8fc-4ebf-9ffa-c4649b8c0e5b", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "fdf7d072-01be-47e4-bca9-67e86a5e5cea", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e039beaf-790a-4392-970b-8fffd845005c", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Ocq0Kln.json b/src/wasm-lib/Ocq0Kln.json new file mode 100644 index 000000000..069b8da28 --- /dev/null +++ b/src/wasm-lib/Ocq0Kln.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "cfb31c55-853a-4f5c-93b2-77a9dc2c1c94", + "name": "a", + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3500fb23-ab59-46d4-a6de-7dbd00e205bf", + "name": "b", + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "90159a1c-5b1e-44ae-b3fc-35fd38317e59", + "name": "c", + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "032ae6fc-0958-4474-88f4-1321f5ab678a", + "endCapId": "c865cbdd-c63d-4326-96c2-1a69cc24b831", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d09b9c69-5a6e-4dde-82d1-66deb0d117f9", + "name": "arc-a", + "id": "5d76f8db-0e29-4d44-98c4-03d92de872c5", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "5d76f8db-0e29-4d44-98c4-03d92de872c5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "36600808-5eab-4c3b-9dae-9c80df2c854f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b26cdf1b-6400-4e8d-82b6-cda12ad7ae35", + "endCapId": "e9575752-cece-49d5-81a3-29cabd06bf82", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "61a5a458-557a-4ae2-b3a4-a78cd59deacb", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "4ea1d7ae-8233-41ce-82fd-226f4cbb80a9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c9702b04-f1ab-4e29-a89d-d47ebaf56fcd", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "8cd8ebe9-48be-4c29-9786-ca2b059f38ac", + "value": "b", + "sketchGroupId": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3500fb23-ab59-46d4-a6de-7dbd00e205bf", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "07f4e13b-12ba-4cb3-9994-3d54c0cf24c3", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "8cd8ebe9-48be-4c29-9786-ca2b059f38ac", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Okyw94D.json b/src/wasm-lib/Okyw94D.json new file mode 100644 index 000000000..e58046edd --- /dev/null +++ b/src/wasm-lib/Okyw94D.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "4047b284-2931-4e0d-bfc7-253d7fbb5ec3", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "593a79b3-2e78-45f4-95c4-dda7fa46e323", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "4047b284-2931-4e0d-bfc7-253d7fbb5ec3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/PKfQoVq.json b/src/wasm-lib/PKfQoVq.json new file mode 100644 index 000000000..f65e490f1 --- /dev/null +++ b/src/wasm-lib/PKfQoVq.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "afd245b6-6a68-4382-93cd-3aed0a43b844", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "3bc0db86-3cb2-4b2b-9b88-520e16b3b3cd", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "afd245b6-6a68-4382-93cd-3aed0a43b844", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/R0GXkns.json b/src/wasm-lib/R0GXkns.json new file mode 100644 index 000000000..f59fc1557 --- /dev/null +++ b/src/wasm-lib/R0GXkns.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "383831b7-ce1d-4abf-897b-19155b0e7872", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "b607cafb-1b58-4208-83f5-2f4366a9cef7", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "383831b7-ce1d-4abf-897b-19155b0e7872", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/SJh4GGO.json b/src/wasm-lib/SJh4GGO.json new file mode 100644 index 000000000..7c4a68587 --- /dev/null +++ b/src/wasm-lib/SJh4GGO.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bbf5706c-292e-455d-bc0d-7c306bf3079a", + "name": "a", + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "443f36e7-7e87-4b07-b7c1-0813540906f8", + "name": "b", + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d5fe579a-f308-41ce-8704-3cfa5e0146f9", + "name": "c", + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "81c6a6c9-8657-4751-b3b9-5756573343e8", + "endCapId": "c3e0d3b3-f60c-42cf-843c-933ddaeb739f", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "8f54354b-7231-4474-b10f-a8ec320b2c0f", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0642c482-6b49-4b27-8f8d-d67d13f1a32d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f17f4eaf-fb2f-43c1-a8d4-937c349a3c0f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "ceb61315-e32a-47db-85b3-9d1a3d642ef4", + "value": "a", + "sketchGroupId": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "bbf5706c-292e-455d-bc0d-7c306bf3079a", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2bb0b0e9-7f1e-4ecd-80e3-b3a524eb9376", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "ceb61315-e32a-47db-85b3-9d1a3d642ef4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/SZlCKyL.json b/src/wasm-lib/SZlCKyL.json new file mode 100644 index 000000000..a0d6beeaa --- /dev/null +++ b/src/wasm-lib/SZlCKyL.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "c78b5a75-9ccb-4525-9cca-16226ed6057d", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "d4af590d-7ae0-4889-84be-7177b4c34f4d", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c78b5a75-9ccb-4525-9cca-16226ed6057d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/TMxL79i.json b/src/wasm-lib/TMxL79i.json new file mode 100644 index 000000000..0f07d5dce --- /dev/null +++ b/src/wasm-lib/TMxL79i.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "4c775d69-138e-4b72-9fd0-93a50565c7c2", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "904eaff4-5a6c-497d-bc3a-0c6d570d97f4", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "4c775d69-138e-4b72-9fd0-93a50565c7c2", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Ub5e9Nv.json b/src/wasm-lib/Ub5e9Nv.json new file mode 100644 index 000000000..8dc68bf45 --- /dev/null +++ b/src/wasm-lib/Ub5e9Nv.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e0d8d0aa-163c-4711-a58a-862b1050e825", + "name": "a", + "id": "e3535ead-67ee-4756-8efe-301c8bfab24b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ca496d3f-ae59-4fd7-96d7-b85e5f75ebc9", + "name": "b", + "id": "c80f25d2-c27a-4249-ae46-8a2ab39dc238", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ffb7778d-dc89-4c90-8342-f6a87c33923a", + "name": "c", + "id": "d02e7289-4ac0-477d-a5fa-c3e989282dea", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e3535ead-67ee-4756-8efe-301c8bfab24b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "c80f25d2-c27a-4249-ae46-8a2ab39dc238", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d02e7289-4ac0-477d-a5fa-c3e989282dea", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3001b743-e21e-4a2c-a8b9-6d56f0fa77de", + "endCapId": "0e6c2b34-0688-483d-94e4-3e59c6258f93", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "9deebc65-e143-4155-aaa0-1347452452ee", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "a87a0f1f-3c22-4e04-90e5-2264d9cccb2e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "782bd2a7-1b61-43ab-9a1e-e36db0485840", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "d5f1a649-561b-44c2-996d-277ac4c098f1", + "value": "a", + "sketchGroupId": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "e0d8d0aa-163c-4711-a58a-862b1050e825", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7cad2c59-bb35-40e9-8ec9-1d6b52035088", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "d5f1a649-561b-44c2-996d-277ac4c098f1", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/V5rFn6W.json b/src/wasm-lib/V5rFn6W.json new file mode 100644 index 000000000..d8d644533 --- /dev/null +++ b/src/wasm-lib/V5rFn6W.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c9519f0-0c6b-4de9-9373-79b6269d2b55", + "name": "a", + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6ad40c93-1adf-4039-9744-4a8485d11560", + "name": "b", + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "883ab1c4-01c2-4425-82f1-6ef82ef10e0e", + "name": "c", + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "49e92cd5-c361-4fce-9124-a3a956a95819", + "endCapId": "18272a8b-c818-4b87-987f-b9f20bd5684b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a7177fae-267f-4163-b0b4-660841b7cbb0", + "name": "arc-a", + "id": "532d38cf-e1a8-45b8-b1be-7923da5d8214", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "532d38cf-e1a8-45b8-b1be-7923da5d8214", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a6f4e48c-d509-44da-91d2-2291e70699ff", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "1b0c052e-cef6-43ca-8379-9c866d606376", + "endCapId": "324797c0-4b54-4ad2-a77d-74214dc36b87", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "1b117986-171a-4316-8002-6ebda1453c0a", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "92c70c53-4d17-4f87-9269-1bb36b5ac1d4", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c34e3b75-acc8-450b-876a-21bf7c5c25e0", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "e609b286-a963-4a06-96f9-63de747c42e4", + "value": "b", + "sketchGroupId": "0bf834e5-f329-426e-9e50-a82759595953", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "6ad40c93-1adf-4039-9744-4a8485d11560", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ca3d71e0-f3b6-49ed-8ab4-b0d66e09965f", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e609b286-a963-4a06-96f9-63de747c42e4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/VxIjVXf.json b/src/wasm-lib/VxIjVXf.json new file mode 100644 index 000000000..61e7ea5e6 --- /dev/null +++ b/src/wasm-lib/VxIjVXf.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "76be30d8-5433-4339-b9c0-6086ad84544b", + "name": "a", + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e64f1823-35e1-4002-829a-cea247e0cddd", + "name": "b", + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f52a80eb-a07d-4c87-9f9f-a3073780fd81", + "name": "c", + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4946fb29-4aaa-487b-87f3-1e6fdcd0ce0f", + "endCapId": "c4e8495f-8a1f-4c80-976f-e573dc8ae74b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1153d1fa-8d9c-4b5c-815d-f867250c9617", + "name": "arc-a", + "id": "956e0e33-ae0b-4ffa-a786-ed6bed96fdc8", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "956e0e33-ae0b-4ffa-a786-ed6bed96fdc8", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3be69801-19c0-4df0-877d-3105e2e14f59", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "adadab69-4056-4661-ac62-c2e3129025fc", + "endCapId": "806cbc12-8a71-499d-aca6-74b2f2b804a4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4cb35868-fd6c-44da-aace-c78c578e6826", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "4f367e77-4823-4cd1-bc8d-e350718bed94", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1ddc64d8-6898-44a2-9bf3-52ac8aa7bc6c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "a58c2b5e-4cb6-4883-8a5e-d7cc30b60330", + "value": "b", + "sketchGroupId": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "e64f1823-35e1-4002-829a-cea247e0cddd", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f3e20573-2244-4e13-915c-4c92afeb0091", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "a58c2b5e-4cb6-4883-8a5e-d7cc30b60330", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/VxjWkzO.json b/src/wasm-lib/VxjWkzO.json new file mode 100644 index 000000000..3d337e2e8 --- /dev/null +++ b/src/wasm-lib/VxjWkzO.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "2c4a874f-1356-46f4-bb4d-443ed1fc4b6f", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "a0870d76-45b3-48ed-ad05-e234d44ae42e", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "2c4a874f-1356-46f4-bb4d-443ed1fc4b6f", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/W2Niumr.json b/src/wasm-lib/W2Niumr.json new file mode 100644 index 000000000..04955f105 --- /dev/null +++ b/src/wasm-lib/W2Niumr.json @@ -0,0 +1,1370 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 721, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 721, + "body": [ + { + "type": "VariableDeclaration", + "type": "VariableDeclaration", + "start": 571, + "end": 708, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 575, + "end": 708, + "id": { + "type": "Identifier", + "start": 575, + "end": 576, + "name": "x" + }, + "init": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 579, + "end": 708, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 579, + "end": 600, + "callee": { + "type": "Identifier", + "start": 579, + "end": 592, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 593, + "end": 594, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 596, + "end": 599, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 606, + "end": 662, + "callee": { + "type": "Identifier", + "start": 606, + "end": 620, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 621, + "end": 658, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 622, + "end": 643, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 622, + "end": 634, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 622, + "end": 631, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 632, + "end": 633, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 637, + "end": 643, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 645, + "end": 657, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 645, + "end": 654, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 655, + "end": 656, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 660, + "end": 661 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 668, + "end": 694, + "callee": { + "type": "Identifier", + "start": 668, + "end": 671, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 672, + "end": 676, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 678, + "end": 679 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 681, + "end": 693, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 681, + "end": 687, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 690, + "end": 693, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 700, + "end": 708, + "callee": { + "type": "Identifier", + "start": 700, + "end": 705, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 706, + "end": 707 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "kind": "let" + }, + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 711, + "end": 719, + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 718, + "end": 719, + "name": "x" + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 721 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "74d9bf69-036c-4793-b346-6100f2ae11ee", + "name": "a", + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "85730386-c1d8-48ac-ac7b-f38ddd8c5975", + "name": "b", + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d54b7cba-0467-47a6-8a23-a0c39a0647dc", + "name": "c", + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0c336890-7751-42a7-a1a6-8b9b59cda307", + "endCapId": "13d4f026-7734-4d7e-ab77-84ca43b0c483", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e3107ff3-d5cc-4bdc-bd74-e6a7deba3c25", + "name": "arc-a", + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7c6e7935-9b6b-49b0-8b75-fd1e0b42765e", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "6af1a178-13cd-4cbb-a387-353ebd2e940a", + "endCapId": "5a276f5d-6f3c-4f0d-a3e2-bcea0851960a", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1160, + 1163 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "x": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "86dcc4d1-aa99-461d-8725-5ef52f920034", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "98812262-fc34-438c-a651-68134a0d8799", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0852fe24-e8ba-40c5-aacc-6f9144832a76", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "on": { + "type": "face", + "id": "7aa93a81-64fb-4900-8005-b1b8daf11d48", + "value": "b", + "sketchGroupId": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "85730386-c1d8-48ac-ac7b-f38ddd8c5975", + "__meta": [ + { + "sourceRange": [ + 579, + 600 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "47b820df-63cf-4b3f-9394-520ea4382f17", + "sourceRange": [ + 606, + 662 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7aa93a81-64fb-4900-8005-b1b8daf11d48", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "86dcc4d1-aa99-461d-8725-5ef52f920034", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "98812262-fc34-438c-a651-68134a0d8799", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0852fe24-e8ba-40c5-aacc-6f9144832a76", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "on": { + "type": "face", + "id": "7aa93a81-64fb-4900-8005-b1b8daf11d48", + "value": "b", + "sketchGroupId": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "85730386-c1d8-48ac-ac7b-f38ddd8c5975", + "__meta": [ + { + "sourceRange": [ + 579, + 600 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "47b820df-63cf-4b3f-9394-520ea4382f17", + "sourceRange": [ + 606, + 662 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7aa93a81-64fb-4900-8005-b1b8daf11d48", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/WDfVgzH.json b/src/wasm-lib/WDfVgzH.json new file mode 100644 index 000000000..96d16c1bc --- /dev/null +++ b/src/wasm-lib/WDfVgzH.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "697a9e83-718a-4c1a-b253-3ec3621bc65f", + "name": "a", + "id": "78ce61b1-a34d-4439-bfd8-3b664fb64c2f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "03dcb355-cdcb-4c65-9400-c51804069b1c", + "name": "b", + "id": "2be52eca-a42a-4475-8ff4-48cdcfe820e3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9e2b9264-ff0b-4001-ab9f-d165de55603d", + "name": "c", + "id": "e439372c-e556-4ae3-8c0e-effbaf158cf1", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "78ce61b1-a34d-4439-bfd8-3b664fb64c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2be52eca-a42a-4475-8ff4-48cdcfe820e3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e439372c-e556-4ae3-8c0e-effbaf158cf1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "41156b69-f3bb-4335-b33a-4e1fd0c3d45c", + "endCapId": "2f32c56f-fd6e-4965-9711-22d8130628e8", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "bfdbfbe5-3dea-4404-9347-e1adf66cf608", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6a16be07-5db9-4b6f-a1a3-5b34f92b87c1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "af29d53b-c3d2-4cbf-9fcd-fd901aa65001", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "c9608045-1e2b-402f-bdc1-ed86b775b32a", + "value": "a", + "sketchGroupId": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "697a9e83-718a-4c1a-b253-3ec3621bc65f", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "80ef5b0c-d790-4ca1-a7ea-31586bedf8f3", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c9608045-1e2b-402f-bdc1-ed86b775b32a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/YnaksUE.json b/src/wasm-lib/YnaksUE.json new file mode 100644 index 000000000..abfa1ce89 --- /dev/null +++ b/src/wasm-lib/YnaksUE.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c48b5628-a41e-4868-8736-235cd9d069ea", + "name": "a", + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "34890411-1aae-4b4e-94fd-49ddc6bc3981", + "name": "b", + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "314cf7ec-4c96-4d35-8364-cf81febe293a", + "name": "c", + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "38e3931d-f06d-45fd-b5ab-1bf25ae1fc80", + "endCapId": "c937d75f-0301-4df2-8d18-dccd41c248a1", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0d732d4d-ad46-486e-a358-a18804a94ffe", + "name": "arc-a", + "id": "b1dc366f-733d-42d7-9349-f33755861f05", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "b1dc366f-733d-42d7-9349-f33755861f05", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "db60dfc8-b508-480a-b6b4-657bef378ab9", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "22d07919-7db3-4867-b155-6786437e1597", + "endCapId": "2468f8f1-d9ef-4616-aaa1-b34ff5d3a26b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "03f79b4e-e6dc-49b0-bd36-67817e426a08", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c4f6ce54-7007-446c-9571-896fbbefa673", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "addc4368-0c4a-4815-8d6b-1a6af247a767", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "5d772853-ecfc-4198-a165-1378d1de362a", + "value": "b", + "sketchGroupId": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "34890411-1aae-4b4e-94fd-49ddc6bc3981", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3092c500-6d06-44e5-b30b-8936fde7637d", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "5d772853-ecfc-4198-a165-1378d1de362a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/Z8ezqCb.json b/src/wasm-lib/Z8ezqCb.json new file mode 100644 index 000000000..f7d8bd496 --- /dev/null +++ b/src/wasm-lib/Z8ezqCb.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4228d5d7-c334-4885-838d-5069309b0c45", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3f9c9f0f-4479-4f87-bfda-111f170282b1", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2c6d6360-3556-4eed-b249-ebbd32f35782", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "cc5ee219-87cc-441b-bf79-f3251d439464", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "8765a575-ac10-4d6d-9650-e4ee03204831", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "f19342f8-c7a2-46a2-b83e-5378dc79f9c2", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "8765a575-ac10-4d6d-9650-e4ee03204831", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/a5I7qcr.json b/src/wasm-lib/a5I7qcr.json new file mode 100644 index 000000000..33b428507 --- /dev/null +++ b/src/wasm-lib/a5I7qcr.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad6266c1-1b9e-46ea-82d7-2460ec427bd3", + "name": "a", + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ae8b8199-fde0-4185-b3e5-40fd67b0a9f6", + "name": "b", + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "525a8614-1d3e-4a4c-a498-4f9e41861e60", + "name": "c", + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "5ac7c534-d331-4865-b21d-6c131e5cbed8", + "endCapId": "33888a1d-ce60-422a-b948-60c40323b5dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "ba30993e-8c28-4acf-bd7d-67e952c4fb5b", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "54f2e1c8-11b0-4119-a036-a26584b93f2f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a4668dc4-8d32-4295-9568-982e1a27748b", + "name": "arc-a", + "id": "29202001-2750-4a41-8d59-cca41f9b0a66", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "29202001-2750-4a41-8d59-cca41f9b0a66", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "99e286ad-dcb5-4464-9b52-69195ea3b59b", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "66db131a-48cc-4ceb-a98c-af6a0bc263d7", + "endCapId": "12e74ce7-cb1a-474f-9af2-68d9e1155f19", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/aF4A3bM.json b/src/wasm-lib/aF4A3bM.json new file mode 100644 index 000000000..655560b5f --- /dev/null +++ b/src/wasm-lib/aF4A3bM.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "db80ebd0-8d2a-49cf-a7fe-bfb2f082553e", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0a0e395b-0cf7-4300-a8e7-298c4d96e14b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50f2d13d-333a-4f17-a5c3-7907fdb80bd9", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "079e5460-3e5c-4572-88d1-2e21f6446a5d", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "c3b0fe1f-71d5-4835-9b18-35dcf8c8a991", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "6e6cb04e-32cf-4949-94f8-888cd835ff6a", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c3b0fe1f-71d5-4835-9b18-35dcf8c8a991", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/aQRNivK.json b/src/wasm-lib/aQRNivK.json new file mode 100644 index 000000000..d59082df0 --- /dev/null +++ b/src/wasm-lib/aQRNivK.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bf031d6a-038d-405b-9e12-5c7dc9fb3cff", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "dee50147-64de-4885-8cec-093ffcbdf3a5", + "name": "a", + "id": "0b81e21f-6ff1-4f2d-a61d-82cec33acd75", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e8bf39ed-7a62-440d-ba59-011b04d3636d", + "name": "b", + "id": "62c6e6cd-b34b-4057-a716-84c696cd25cc", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8c8c8e17-0f0f-49e4-9c5b-eece04710292", + "name": "c", + "id": "07d56afe-95a5-4524-8d1f-da3f58ba3416", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0b81e21f-6ff1-4f2d-a61d-82cec33acd75", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "62c6e6cd-b34b-4057-a716-84c696cd25cc", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "07d56afe-95a5-4524-8d1f-da3f58ba3416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "98c70850-e062-4cd6-92fd-f51c3ec03542", + "endCapId": "abcd0a71-75a6-438e-bbad-0c1c64fa6418", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "7b53926c-688f-48d8-9d93-f3a5a7b321a2", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "415bfa89-b920-4867-82fe-dd3e0494f35a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ef95d870-3415-4756-bd59-b9fe6176b60b", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "53b762ce-c8b9-41bf-b814-1cd6f1b0cce8", + "value": "a", + "sketchGroupId": "bf031d6a-038d-405b-9e12-5c7dc9fb3cff", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "dee50147-64de-4885-8cec-093ffcbdf3a5", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c3fba435-dcbb-452c-bb5d-8b414cd51e8c", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "53b762ce-c8b9-41bf-b814-1cd6f1b0cce8", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/aZKZYPs.json b/src/wasm-lib/aZKZYPs.json new file mode 100644 index 000000000..70356e483 --- /dev/null +++ b/src/wasm-lib/aZKZYPs.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "54a1c762-b9c6-413f-b5be-322734aa0a21", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "065051a9-790f-4f28-b254-a42002bf4f4b", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "54a1c762-b9c6-413f-b5be-322734aa0a21", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/at4s5x7.json b/src/wasm-lib/at4s5x7.json new file mode 100644 index 000000000..163ac1451 --- /dev/null +++ b/src/wasm-lib/at4s5x7.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "675d0ae0-de6d-4999-923e-5a9750f7092c", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "38af0809-2509-4501-bec9-f4113ebc789e", + "name": "a", + "id": "6296932b-748f-4fe7-bddf-71aea7522a1f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6b9c066-9d34-42c2-bda5-8e4b62f0f87a", + "name": "b", + "id": "ceb9bc26-8ce0-487c-9d06-522a7093c62f", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a304cd37-5e66-4d8f-a4c4-d9c74dbcf671", + "name": "c", + "id": "c2835549-c0a8-40e8-842c-1acdf33775c2", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "6296932b-748f-4fe7-bddf-71aea7522a1f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "ceb9bc26-8ce0-487c-9d06-522a7093c62f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "c2835549-c0a8-40e8-842c-1acdf33775c2", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b8521470-0968-4988-a0e8-bc3d7fc48062", + "endCapId": "08ec2f1f-0f4c-4854-9d33-7a5c3ea59639", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "8858f4dd-39db-4156-80d2-a6f4570dd873", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6e3c6e4a-c5c3-49c2-8127-4fb4c37e3108", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "879d0971-824a-4ac0-83fd-d0fa6bc4f360", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "6c4cba2d-0604-492e-9780-abad981b2b37", + "value": "a", + "sketchGroupId": "675d0ae0-de6d-4999-923e-5a9750f7092c", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "38af0809-2509-4501-bec9-f4113ebc789e", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "35cc4f4e-86dc-4d83-89e9-19ba0839f1c4", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "6c4cba2d-0604-492e-9780-abad981b2b37", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/b02BT8W.json b/src/wasm-lib/b02BT8W.json new file mode 100644 index 000000000..c782f17a5 --- /dev/null +++ b/src/wasm-lib/b02BT8W.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0bf834e5-f329-426e-9e50-a82759595953", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c9519f0-0c6b-4de9-9373-79b6269d2b55", + "name": "a", + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6ad40c93-1adf-4039-9744-4a8485d11560", + "name": "b", + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "883ab1c4-01c2-4425-82f1-6ef82ef10e0e", + "name": "c", + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0d6c7eb6-b9ab-48c8-9379-0ce14788c89f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "bd0da758-3371-42cb-b8cb-9274a83ff053", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6a1d8db2-21fd-4ffd-92a6-fe502eee68df", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "49e92cd5-c361-4fce-9124-a3a956a95819", + "endCapId": "18272a8b-c818-4b87-987f-b9f20bd5684b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "74c762a0-f9d7-4c10-abe5-989d4a3f2a25", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "532d38cf-e1a8-45b8-b1be-7923da5d8214", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a6f4e48c-d509-44da-91d2-2291e70699ff", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "bf78284f-cb0d-4f24-a667-fd06af1704db", + "value": "a", + "sketchGroupId": "0bf834e5-f329-426e-9e50-a82759595953", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3c9519f0-0c6b-4de9-9373-79b6269d2b55", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "495f18f1-4af9-4a3c-be80-4dd1b6db82cb", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "bf78284f-cb0d-4f24-a667-fd06af1704db", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/b5S90RE.json b/src/wasm-lib/b5S90RE.json new file mode 100644 index 000000000..982e8c1bc --- /dev/null +++ b/src/wasm-lib/b5S90RE.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4664b91-44f5-4524-bb20-0ac32be91c76", + "name": "a", + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "812c2274-3b82-4328-b05e-968e341396af", + "name": "b", + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "354a1607-3cdd-4e31-9df2-a0420c502f31", + "name": "c", + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f11f043c-04e5-4f0a-ba76-9607b4549b6d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b3a80be7-ba9b-4685-9527-e02285c760c4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "69251271-7979-4e60-8f8d-6c16b6699de6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "60ab91b3-ef7a-47a3-95ab-e071fca6aaff", + "endCapId": "ea1da8fd-2ff5-4061-a273-005bb7c5f132", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "76088a33-2397-4fbc-97f7-9c810867e8e5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6faad31d-5790-47ef-b17c-53bbe717e07f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "260a7a71-6dff-44e1-ae71-ef9acc0964a1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "23f58cac-86da-4981-8084-9e098d96f2a7", + "name": "arc-a", + "id": "bf560458-1c1a-472b-abbf-a24e7355a3c9", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "bf560458-1c1a-472b-abbf-a24e7355a3c9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0c4b21ed-fbb4-4c94-b307-abe2275c4561", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "21ad7943-e0ef-41a8-bad2-65599dec92a8", + "endCapId": "b49ade4d-3a62-4d2c-97e9-2be40c1f5a50", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/bmeYxtL.json b/src/wasm-lib/bmeYxtL.json new file mode 100644 index 000000000..b00cde5b7 --- /dev/null +++ b/src/wasm-lib/bmeYxtL.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b015fc86-8e52-492b-b05e-29ef1960fc27", + "name": "a", + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a2f2078f-b855-4c16-b19b-513d01de8608", + "name": "b", + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2d018336-ae6b-495b-a787-711c3f6a8038", + "name": "c", + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e3d18e4b-345f-4038-bcaf-f313db504f5b", + "endCapId": "573ef23f-cce8-4f45-8c8d-70b5a6323c55", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "a92a8599-7167-433f-88d9-acbf3423b773", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "863981fa-2698-4049-a11c-1ee93ce18830", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1d45c0a2-d2f5-4803-8af0-0fab694fcf61", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "ed789875-f36e-421a-aaf1-4d294b8d8939", + "value": "a", + "sketchGroupId": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "b015fc86-8e52-492b-b05e-29ef1960fc27", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "d25516bf-b095-4565-922d-85e220a87c86", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "ed789875-f36e-421a-aaf1-4d294b8d8939", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/c4HaiO0.json b/src/wasm-lib/c4HaiO0.json new file mode 100644 index 000000000..f1ce02f54 --- /dev/null +++ b/src/wasm-lib/c4HaiO0.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7a60b404-772f-4e48-94b5-dfff2f9f3fe3", + "name": "a", + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2da95170-f962-4eaf-85b8-cb8b355c419a", + "name": "b", + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7442bd43-3f11-4502-bcd1-bb442d9cc0d8", + "name": "c", + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "497388b4-03ad-436a-be49-680dccdbd81b", + "endCapId": "b11ba6f3-5a68-4797-bef8-e91461cae3de", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7dbe89f9-2b23-41b6-a6b7-cd040ded5917", + "name": "arc-b", + "id": "d2d964cd-d4cc-49bd-a461-8156a32ca3db", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "d2d964cd-d4cc-49bd-a461-8156a32ca3db", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "20dd28a6-1027-4a07-8c2f-4beb2a046c65", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "484a7eed-c7ff-4919-b798-dc4d70ba8c5e", + "endCapId": "460defa1-3af6-45b9-a8ab-14559d666417", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "968a10a7-5dfd-4bc3-981a-5f5cc5b6236c", + "name": "arc-a", + "id": "9929b3b6-e9ec-441a-af1f-95ffdfdc48e2", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "9929b3b6-e9ec-441a-af1f-95ffdfdc48e2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1c76d600-e9ac-4eba-8716-5d3773adbd6d", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e4df5daf-164f-4d3e-a08b-1abee084f40f", + "endCapId": "af96166d-cd31-4e02-962b-9dbc20690751", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/dPxOePe.json b/src/wasm-lib/dPxOePe.json new file mode 100644 index 000000000..bf86341cb --- /dev/null +++ b/src/wasm-lib/dPxOePe.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ec5b871b-046e-4029-8f2b-3d423704fcd7", + "name": "a", + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "36a88a8c-06e3-4d5d-af03-42f3675198c4", + "name": "b", + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e0a07e07-6dd1-47c6-ba1e-ac91439d64af", + "name": "c", + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f8285c0f-6c29-44d2-a981-136f7b5a8767", + "endCapId": "cbb2412b-19ef-4dc2-9a04-112cb9af6392", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "d6b638fb-994c-4dc3-b25c-4ea93a7142f3", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "55ac46e9-3e03-41cf-be21-b2334a512776", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6586ea7b-fb91-465d-9bc9-3edbaeb3171e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "fb93d31d-a335-4ba8-83db-59cba873409b", + "value": "a", + "sketchGroupId": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "ec5b871b-046e-4029-8f2b-3d423704fcd7", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "04e585dd-a314-470b-8c62-348fd4505e22", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "fb93d31d-a335-4ba8-83db-59cba873409b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/dSNumQw.json b/src/wasm-lib/dSNumQw.json new file mode 100644 index 000000000..26f663f6d --- /dev/null +++ b/src/wasm-lib/dSNumQw.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b015fc86-8e52-492b-b05e-29ef1960fc27", + "name": "a", + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a2f2078f-b855-4c16-b19b-513d01de8608", + "name": "b", + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2d018336-ae6b-495b-a787-711c3f6a8038", + "name": "c", + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e3d18e4b-345f-4038-bcaf-f313db504f5b", + "endCapId": "573ef23f-cce8-4f45-8c8d-70b5a6323c55", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "851176aa-a85b-45fc-9318-df1b9c1ca919", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a4019c9f-ccb6-4fd0-a68b-3fbb4564de66", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ce1d3730-0afc-47d7-8c84-bf5578acf4cf", + "name": "arc-a", + "id": "863981fa-2698-4049-a11c-1ee93ce18830", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "863981fa-2698-4049-a11c-1ee93ce18830", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1d45c0a2-d2f5-4803-8af0-0fab694fcf61", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f2dca00a-5d45-450a-8011-f0ace58b5c65", + "endCapId": "46fc6b60-09a1-4862-8855-0c46b5bed126", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/e4oTYG7.json b/src/wasm-lib/e4oTYG7.json new file mode 100644 index 000000000..9fd6fa9db --- /dev/null +++ b/src/wasm-lib/e4oTYG7.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c48b5628-a41e-4868-8736-235cd9d069ea", + "name": "a", + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "34890411-1aae-4b4e-94fd-49ddc6bc3981", + "name": "b", + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "314cf7ec-4c96-4d35-8364-cf81febe293a", + "name": "c", + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "38e3931d-f06d-45fd-b5ab-1bf25ae1fc80", + "endCapId": "c937d75f-0301-4df2-8d18-dccd41c248a1", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fa61986b-7e33-4dfd-a266-ee153ff3e60a", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "b1dc366f-733d-42d7-9349-f33755861f05", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "db60dfc8-b508-480a-b6b4-657bef378ab9", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "ab64fafc-eda3-4070-8b48-a51f48c6645a", + "value": "a", + "sketchGroupId": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "c48b5628-a41e-4868-8736-235cd9d069ea", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1ba924d8-2851-4028-9e07-3d2c3ec7beb0", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "ab64fafc-eda3-4070-8b48-a51f48c6645a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/eNqwK7O.json b/src/wasm-lib/eNqwK7O.json new file mode 100644 index 000000000..806e0d3d1 --- /dev/null +++ b/src/wasm-lib/eNqwK7O.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "37f584fe-44ff-4df9-98dd-930a2c9010f3", + "name": "a", + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad4cd00a-578d-4f79-a8cd-1d63c8ae2c1c", + "name": "b", + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "97bc2237-75e7-4118-b679-0519bc2aaf05", + "name": "c", + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f1a7f52f-6960-4d2b-88ca-73b2fad7c96e", + "endCapId": "2360f971-4bef-460e-8e48-affe3b22d792", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "99553399-a6f9-4fc0-8f33-d94782fc682d", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ca307167-b657-456c-aaff-cd3629f1a27e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2c5dcd5f-12aa-4c9d-8ff3-eef55c92ad86", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "08962107-21b1-4ab8-b52d-453476ae6456", + "value": "a", + "sketchGroupId": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "37f584fe-44ff-4df9-98dd-930a2c9010f3", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e25a4283-22d8-4af8-8dac-aff6031823fe", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "08962107-21b1-4ab8-b52d-453476ae6456", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/end_of_program_p0_circl.json b/src/wasm-lib/end_of_program_p0_circl.json new file mode 100644 index 000000000..4722e3a9c --- /dev/null +++ b/src/wasm-lib/end_of_program_p0_circl.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "93fe50bc-4ebb-40f9-900d-04380f114c4c", + "name": "a", + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a359291e-5c58-480a-914e-08e7ae51a2b5", + "name": "b", + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a0b1691c-5d1f-467e-848b-91e4662c40e9", + "name": "c", + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "ab53d6ba-56fe-4ab8-adea-48a23ed81a63", + "endCapId": "6fa95bbc-7285-4d98-9b19-d865628f7ea9", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "be7d3363-957b-480b-ab72-2316496a7c2f", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "9e92b354-8294-49d3-8b1f-31c951bc457f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "957e97fd-9522-42d7-aa64-5e361073b6c3", + "name": "arc-a", + "id": "ae0752bd-c5d1-4fd1-888f-9c7cc4bc455c", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ae0752bd-c5d1-4fd1-888f-9c7cc4bc455c", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "050e340b-018e-42c1-93dd-68bc1b8b6120", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3844f74f-f4cd-48f0-8d93-aeb04b4e7668", + "endCapId": "13437cf8-a404-4a8c-94bf-1d216da57924", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/end_of_program_p0_inlined.json b/src/wasm-lib/end_of_program_p0_inlined.json new file mode 100644 index 000000000..e08a0a61d --- /dev/null +++ b/src/wasm-lib/end_of_program_p0_inlined.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e0d8d0aa-163c-4711-a58a-862b1050e825", + "name": "a", + "id": "e3535ead-67ee-4756-8efe-301c8bfab24b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ca496d3f-ae59-4fd7-96d7-b85e5f75ebc9", + "name": "b", + "id": "c80f25d2-c27a-4249-ae46-8a2ab39dc238", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ffb7778d-dc89-4c90-8342-f6a87c33923a", + "name": "c", + "id": "d02e7289-4ac0-477d-a5fa-c3e989282dea", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e3535ead-67ee-4756-8efe-301c8bfab24b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "c80f25d2-c27a-4249-ae46-8a2ab39dc238", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d02e7289-4ac0-477d-a5fa-c3e989282dea", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3001b743-e21e-4a2c-a8b9-6d56f0fa77de", + "endCapId": "0e6c2b34-0688-483d-94e4-3e59c6258f93", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "795d5bd8-99c7-4bcd-b953-7b9a2be937a4", + "name": "arc-b", + "id": "cadcdbcb-b2da-4194-9e24-1aee9dcc5339", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "cadcdbcb-b2da-4194-9e24-1aee9dcc5339", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6a6b79a3-911d-4e18-b636-11f9fcb6085e", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "44afcb4d-ec79-4ee7-b552-69db652be5c4", + "endCapId": "ccebc874-ff79-4984-adc9-7f001649a426", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "c02eb643-e8b2-4302-bf50-103b76cafa31", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "42dc9e72-97f8-467d-9bd3-a6c8c9b0cf1b", + "name": "arc-a", + "id": "a87a0f1f-3c22-4e04-90e5-2264d9cccb2e", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "a87a0f1f-3c22-4e04-90e5-2264d9cccb2e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "782bd2a7-1b61-43ab-9a1e-e36db0485840", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "29a61096-7fde-4cd5-94b1-4b36d3ed0f22", + "endCapId": "efca15a0-08e3-459c-8467-b41fb0195653", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/f2qt8On.json b/src/wasm-lib/f2qt8On.json new file mode 100644 index 000000000..b4e53781c --- /dev/null +++ b/src/wasm-lib/f2qt8On.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "91748005-f1f8-4756-ac06-544e4b92e2af", + "name": "a", + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7f2525e2-611d-40b5-b611-80626065f769", + "name": "b", + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "81f0b2f9-e861-4ad9-84d9-4e6430bf1202", + "name": "c", + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cee869c0-874b-41dd-a719-b2e331350e07", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "73037861-531f-4830-b900-18aa30f9edca", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "de005784-bb8a-4fe6-8360-fd8fc22b47dc", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4d851ba7-6119-481f-9b6f-47c640d48386", + "endCapId": "3ebf6fdd-a354-47c2-9efe-06f9d95171d7", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "080f03e9-4660-4211-bd48-067246e82966", + "name": "arc-b", + "id": "87fe8169-7216-4d55-a614-adec3da5955d", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "87fe8169-7216-4d55-a614-adec3da5955d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e123eabb-2c6c-4988-af7d-e8ff3bbcb19c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c745a154-ed07-46bf-b10a-bd9745d40c9a", + "endCapId": "740a10c3-c67d-4727-83ba-652e608e70cb", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "03cbdcb2-2f14-427a-9211-72924db46b36", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "4ff47c4c-294d-4829-bfa4-78c5b124eee9", + "name": "arc-a", + "id": "6536c585-2815-41d8-a8c9-568b0347e5a5", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6536c585-2815-41d8-a8c9-568b0347e5a5", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a48ad09a-e95b-4557-a203-368ce7828d6c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "937ca9e1-befc-489f-9a87-0d6f80626ff1", + "endCapId": "55922b3a-2fc5-4326-aa73-a8cd1c7ed86e", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/g9emtuC.json b/src/wasm-lib/g9emtuC.json new file mode 100644 index 000000000..f0419521d --- /dev/null +++ b/src/wasm-lib/g9emtuC.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "42c368f2-709e-4254-9e99-0e208e3c03eb", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "1b9ba73d-4588-431b-a76d-f8ac7d656b17", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "42c368f2-709e-4254-9e99-0e208e3c03eb", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/gE5NVu3.json b/src/wasm-lib/gE5NVu3.json new file mode 100644 index 000000000..4ba34559e --- /dev/null +++ b/src/wasm-lib/gE5NVu3.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1665c659-1b60-4c0f-8a74-36795ad14dc1", + "name": "a", + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f8aef73c-94e5-4f53-ae3c-5cabdd8d3a78", + "name": "b", + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "764278f1-e337-486f-bc03-029767ef1296", + "name": "c", + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c32c4411-6be9-4105-911f-4c24390831be", + "endCapId": "91397c29-07a4-4cde-8726-c1bf25a08023", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fdf334c7-46f4-428f-8b51-d3c0bff4930f", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0791e17b-b5ca-4224-a1f2-a3a882876d03", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "51d0d19b-8ef7-4dfc-a4cd-f7e5d16e0c8f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "c1e6386d-ced8-41e5-af0b-32c81e4eb0b1", + "value": "a", + "sketchGroupId": "960e1f65-772e-4cce-94fd-353c788ffced", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "1665c659-1b60-4c0f-8a74-36795ad14dc1", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5336a695-c214-4413-97c4-da667bb01503", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c1e6386d-ced8-41e5-af0b-32c81e4eb0b1", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/gU3lRnz.json b/src/wasm-lib/gU3lRnz.json new file mode 100644 index 000000000..9f8ae37e0 --- /dev/null +++ b/src/wasm-lib/gU3lRnz.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1f0f5822-3b44-426f-833b-c32e6a6a3e07", + "name": "a", + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "5fb01486-114b-406d-bb6f-334371c94029", + "name": "b", + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "00db26e9-8dea-4002-9418-af0d6301972e", + "name": "c", + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ca363eb0-aab1-4b74-b916-b437cd1fea0f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "845afbc9-5d7a-4558-80c7-8fbb10b49773", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3722e3b1-cf4c-43ff-a111-eea55d55d27f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0377700f-ed1d-4639-8c1d-824185c458a5", + "endCapId": "a880285e-be7b-445e-89ee-af5cd947b15c", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "ab116323-912f-43a4-b554-bd678184daf7", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8d33d671-f62a-48e9-8a7b-3999dd490b8a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "064a3833-2078-42bd-995b-53ce76eaebbc", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "8e6257d5-b82e-4d87-9afb-2f64845bea87", + "value": "a", + "sketchGroupId": "7c0be725-a31b-40b8-8b66-b023d3cb27ab", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "1f0f5822-3b44-426f-833b-c32e6a6a3e07", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1dde9ace-7bad-4d50-84d2-5e43207d3e38", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "8e6257d5-b82e-4d87-9afb-2f64845bea87", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/gqdDoDn.json b/src/wasm-lib/gqdDoDn.json new file mode 100644 index 000000000..b9898a46d --- /dev/null +++ b/src/wasm-lib/gqdDoDn.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "37f584fe-44ff-4df9-98dd-930a2c9010f3", + "name": "a", + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad4cd00a-578d-4f79-a8cd-1d63c8ae2c1c", + "name": "b", + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "97bc2237-75e7-4118-b679-0519bc2aaf05", + "name": "c", + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bffbac30-fb61-43e6-8e09-70e8a4d4a96d", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "feaa4b80-1d20-4a7a-8357-ec622a16eede", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d4a6103b-ca34-437c-9d5f-44f680b10ed0", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f1a7f52f-6960-4d2b-88ca-73b2fad7c96e", + "endCapId": "2360f971-4bef-460e-8e48-affe3b22d792", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6753922-4d52-44ad-916d-8662ba154c11", + "name": "arc-a", + "id": "ca307167-b657-456c-aaff-cd3629f1a27e", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ca307167-b657-456c-aaff-cd3629f1a27e", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2c5dcd5f-12aa-4c9d-8ff3-eef55c92ad86", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c53e5f10-ebde-4f7f-ae10-80ed8e2f1232", + "endCapId": "d9b228e7-2298-4d9b-9223-25d40790874a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "7e6f3955-555b-433a-8fb0-b4946000426d", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "81d614b5-d447-4285-a3bc-48c4be405da6", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "baa9f7c4-f94f-4a7a-a85e-e346796a214e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "58813441-d371-459a-b002-982e83ac584c", + "value": "b", + "sketchGroupId": "703b0dcb-beb6-4aeb-8df5-7e04caf6316b", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "ad4cd00a-578d-4f79-a8cd-1d63c8ae2c1c", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8b553aff-2e7f-4000-9899-c7eabb7bfb80", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "58813441-d371-459a-b002-982e83ac584c", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/h276Jz4.json b/src/wasm-lib/h276Jz4.json new file mode 100644 index 000000000..9231f8c66 --- /dev/null +++ b/src/wasm-lib/h276Jz4.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "daf4845e-3f6d-436a-84a5-873e200858e9", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "508155c6-2c82-4f8f-8586-6a2aaa5e668c", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "565695a6-b471-4f92-8918-8ee7c90a6978", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "52652e26-1a84-4d7b-a886-78ee804396bd", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "752ea6ce-ae25-4c71-8e4b-e4cc84b3221e", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "c32b6eb8-4385-4829-8813-d015b0dc772a", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "752ea6ce-ae25-4c71-8e4b-e4cc84b3221e", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/hAWsHfe.json b/src/wasm-lib/hAWsHfe.json new file mode 100644 index 000000000..84bddfb49 --- /dev/null +++ b/src/wasm-lib/hAWsHfe.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bbf5706c-292e-455d-bc0d-7c306bf3079a", + "name": "a", + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "443f36e7-7e87-4b07-b7c1-0813540906f8", + "name": "b", + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d5fe579a-f308-41ce-8704-3cfa5e0146f9", + "name": "c", + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "81c6a6c9-8657-4751-b3b9-5756573343e8", + "endCapId": "c3e0d3b3-f60c-42cf-843c-933ddaeb739f", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c8e8ff7b-93aa-4b97-ba9a-d2ef641ca616", + "name": "arc-b", + "id": "1f519b96-b298-4b7b-a099-edb04d5571e1", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "1f519b96-b298-4b7b-a099-edb04d5571e1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5efbd464-504e-48ed-b431-0cf0e00d72b3", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "75827077-f5c2-4715-ab41-468cabe68904", + "endCapId": "9f66baba-1ec9-4a85-8dc4-265006ec14b5", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0e23baee-3788-4b5d-907b-3eead6ec27e6", + "name": "arc-a", + "id": "0642c482-6b49-4b27-8f8d-d67d13f1a32d", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "0642c482-6b49-4b27-8f8d-d67d13f1a32d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f17f4eaf-fb2f-43c1-a8d4-937c349a3c0f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "11e0e684-e03d-4158-8982-52798db5de73", + "endCapId": "907a1536-c797-438a-861b-c3c6c34d4c79", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/hyBuZ3U.json b/src/wasm-lib/hyBuZ3U.json new file mode 100644 index 000000000..42f93dba8 --- /dev/null +++ b/src/wasm-lib/hyBuZ3U.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3b5d4967-149a-4078-a3f9-05f4229dc2ba", + "name": "a", + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "889a5175-71f3-4720-a44d-58fad43d08e6", + "name": "b", + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9e35f842-b31f-4826-99d3-b6e2d4a8b2a3", + "name": "c", + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "41cc6138-f366-42df-b2bf-17ca86dc6675", + "endCapId": "2a99ff0a-445d-4f2b-874c-2d95b7c81e5d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "aabd335b-5f1a-4b5f-b934-f94531e1b35a", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "aefea688-e084-4db2-84f1-6e4a979d123d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7f6f687f-4959-4417-b5f2-f3167a5a448f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "e4b09984-a245-4270-a44f-8958eadcb867", + "value": "a", + "sketchGroupId": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3b5d4967-149a-4078-a3f9-05f4229dc2ba", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ca584291-5b6c-4a97-b664-d30d805c5aef", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e4b09984-a245-4270-a44f-8958eadcb867", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/iKfKUKJ.json b/src/wasm-lib/iKfKUKJ.json new file mode 100644 index 000000000..2d724c1b9 --- /dev/null +++ b/src/wasm-lib/iKfKUKJ.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "c0b49f94-dd4a-4b5b-92cb-7e4a08c27b75", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "f73e7ec3-6df1-4565-954a-187a1487451a", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c0b49f94-dd4a-4b5b-92cb-7e4a08c27b75", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/jmjp6Em.json b/src/wasm-lib/jmjp6Em.json new file mode 100644 index 000000000..f882fcc12 --- /dev/null +++ b/src/wasm-lib/jmjp6Em.json @@ -0,0 +1,1215 @@ +{ + "root": { + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8620785e-d7c8-4a56-b1c3-d7fcc548b3f5", + "name": "a", + "id": "79f2be94-5c00-4a25-9fa2-b0bd148072f0", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1041bf84-13ac-408a-980b-804079245424", + "name": "b", + "id": "a19865aa-8cf1-487b-a2d2-8861c4054ce4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3a5fe23d-ed30-4cdd-8e1b-2c164d8e9d9e", + "name": "c", + "id": "ff20a1f3-3535-482b-9fdc-42a01e7e009a", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "79f2be94-5c00-4a25-9fa2-b0bd148072f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a19865aa-8cf1-487b-a2d2-8861c4054ce4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ff20a1f3-3535-482b-9fdc-42a01e7e009a", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3af801f5-3210-4b5f-9de6-a78396e9a356", + "endCapId": "24be9158-6197-43f5-a044-02f37efc39f3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "67ac0dcd-bd98-4ecf-8864-c53add5b8b64", + "name": "arc-a", + "id": "8f152667-eca7-412a-931b-f3c6fdfabab2", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8f152667-eca7-412a-931b-f3c6fdfabab2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "10608604-1727-4b57-982a-6bf0cb3c9e40", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "a9c6eb16-2750-4fee-9fce-f563f4e4c2b1", + "endCapId": "11c3b732-d2dc-4708-bab7-5195721fe1b6", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 875, + 878 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "ea61a180-51e3-414d-b5f3-c365adf971f3", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "75320d24-ac00-4ed0-977e-7cade9897e8a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "74bc9971-d16c-43b5-9fc8-efe36b1a86c2", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "99a3cf93-8c00-4d15-a903-43557edee342", + "value": "b", + "sketchGroupId": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "1041bf84-13ac-408a-980b-804079245424", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ed0f42c7-2988-48c9-9d4f-d048ca63537b", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "99a3cf93-8c00-4d15-a903-43557edee342", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/kIbSIpl.json b/src/wasm-lib/kIbSIpl.json new file mode 100644 index 000000000..dd38c79a4 --- /dev/null +++ b/src/wasm-lib/kIbSIpl.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "93fe50bc-4ebb-40f9-900d-04380f114c4c", + "name": "a", + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a359291e-5c58-480a-914e-08e7ae51a2b5", + "name": "b", + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a0b1691c-5d1f-467e-848b-91e4662c40e9", + "name": "c", + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "ab53d6ba-56fe-4ab8-adea-48a23ed81a63", + "endCapId": "6fa95bbc-7285-4d98-9b19-d865628f7ea9", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "957e97fd-9522-42d7-aa64-5e361073b6c3", + "name": "arc-a", + "id": "ae0752bd-c5d1-4fd1-888f-9c7cc4bc455c", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ae0752bd-c5d1-4fd1-888f-9c7cc4bc455c", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "050e340b-018e-42c1-93dd-68bc1b8b6120", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3844f74f-f4cd-48f0-8d93-aeb04b4e7668", + "endCapId": "13437cf8-a404-4a8c-94bf-1d216da57924", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "2f036205-95dc-412e-a1ee-70b45824d05f", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "be7d3363-957b-480b-ab72-2316496a7c2f", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "9e92b354-8294-49d3-8b1f-31c951bc457f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "30d373bc-bc1f-4c10-b7c2-6d715be49338", + "value": "b", + "sketchGroupId": "9d764874-d30d-4ec4-864b-db911663e148", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "a359291e-5c58-480a-914e-08e7ae51a2b5", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "65669759-e052-432e-b647-0590d0c06494", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "30d373bc-bc1f-4c10-b7c2-6d715be49338", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/kcl/Cargo.toml b/src/wasm-lib/kcl/Cargo.toml index fc60cdb8b..8e6b3ea22 100644 --- a/src/wasm-lib/kcl/Cargo.toml +++ b/src/wasm-lib/kcl/Cargo.toml @@ -29,6 +29,7 @@ kittycad-execution-plan-macros = { workspace = true } kittycad-execution-plan-traits = { workspace = true } lazy_static = "1.4.0" mime_guess = "2.0.4" +rand = "0.8.5" parse-display = "0.9.0" reqwest = { version = "0.11.26", default-features = false, features = ["stream", "rustls-tls"] } ropey = "1.6.1" diff --git a/src/wasm-lib/kcl/src/ast/types.rs b/src/wasm-lib/kcl/src/ast/types.rs index 5dc4357d2..07388d149 100644 --- a/src/wasm-lib/kcl/src/ast/types.rs +++ b/src/wasm-lib/kcl/src/ast/types.rs @@ -2793,7 +2793,10 @@ async fn execute_pipe_body( // of its own. let output = match first { Value::BinaryExpression(binary_expression) => binary_expression.get_result(memory, pipe_info, ctx).await?, - Value::CallExpression(call_expression) => call_expression.execute(memory, pipe_info, ctx).await?, + Value::CallExpression(call_expression) => { + let out = call_expression.execute(memory, pipe_info, ctx).await?; + out + } Value::Identifier(identifier) => memory.get(&identifier.name, identifier.into())?.clone(), _ => { // Return an error this should not happen. @@ -2806,15 +2809,20 @@ async fn execute_pipe_body( // Now that we've evaluated the first child expression in the pipeline, following child expressions // should use the previous child expression for %. // This means there's no more need for the previous `pipe_info` from the parent AST node above this one. - let mut new_pipe_info = PipeInfo::new(); - new_pipe_info.previous_results = Some(output); + let mut new_pipe_info = PipeInfo { + previous_results: Some(output), + log: false, + }; // Evaluate remaining elements. for expression in body { let output = match expression { Value::BinaryExpression(binary_expression) => { binary_expression.get_result(memory, &new_pipe_info, ctx).await? } - Value::CallExpression(call_expression) => call_expression.execute(memory, &new_pipe_info, ctx).await?, + Value::CallExpression(call_expression) => { + let out = call_expression.execute(memory, &new_pipe_info, ctx).await?; + out + } Value::Identifier(identifier) => memory.get(&identifier.name, identifier.into())?.clone(), _ => { // Return an error this should not happen. diff --git a/src/wasm-lib/kcl/src/engine/mod.rs b/src/wasm-lib/kcl/src/engine/mod.rs index 9a25b9a61..462b542a1 100644 --- a/src/wasm-lib/kcl/src/engine/mod.rs +++ b/src/wasm-lib/kcl/src/engine/mod.rs @@ -94,6 +94,8 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static { // Flush the batch queue. self.flush_batch(source_range).await + // self.inner_send_modeling_cmd(id, source_range, req, Default::default()) + // .await } /// Force flush the batch queue. @@ -126,6 +128,8 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static { batch_id: uuid::Uuid::new_v4(), responses: false, }; + println!("ADAM: Batched requests:"); + println!("{:#?}", batched_requests); let final_req = if self.batch().lock().unwrap().len() == 1 { // We can unwrap here because we know the batch has only one element. diff --git a/src/wasm-lib/kcl/src/executor.rs b/src/wasm-lib/kcl/src/executor.rs index c7077ff8c..1852def3c 100644 --- a/src/wasm-lib/kcl/src/executor.rs +++ b/src/wasm-lib/kcl/src/executor.rs @@ -19,10 +19,20 @@ use crate::{ std::{FunctionKind, StdLib}, }; +/// For use with serde's [serialize_with] attribute +fn ordered_map(value: &HashMap, serializer: S) -> Result +where + S: serde::Serializer, +{ + let ordered: std::collections::BTreeMap<_, _> = value.iter().collect(); + ordered.serialize(serializer) +} + #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] #[ts(export)] #[serde(rename_all = "camelCase")] pub struct ProgramMemory { + #[serde(serialize_with = "ordered_map")] pub root: HashMap, #[serde(rename = "return")] pub return_: Option, @@ -67,6 +77,19 @@ impl ProgramMemory { /// Add to the program memory. pub fn add(&mut self, key: &str, value: MemoryItem, source_range: SourceRange) -> Result<(), KclError> { + if key.starts_with("p") { + println!("ADAM: Defined KCL binding '{key}'"); + } + if key == "plumbus0" { + match value { + MemoryItem::ExtrudeGroup(ref e) => { + println!("\tDefined as {:?}", e.value); + } + _ => { + println!("\tIt's not an ExtrudeGroup"); + } + } + } if self.root.contains_key(key) { return Err(KclError::ValueAlreadyDefined(KclErrorDetails { message: format!("Cannot redefine {}", key), @@ -967,11 +990,15 @@ impl ExtrudeSurface { #[serde(rename_all = "camelCase")] pub struct PipeInfo { pub previous_results: Option, + pub log: bool, } impl PipeInfo { pub fn new() -> Self { - Self { previous_results: None } + Self { + previous_results: None, + log: false, + } } } @@ -1111,8 +1138,11 @@ impl ExecutorContext { } else { Default::default() }; - self.inner_execute(program, &mut memory, crate::executor::BodyType::Root) - .await + let mem = self + .inner_execute(program, &mut memory, crate::executor::BodyType::Root) + .await?; + dump_json(&serde_json::to_string_pretty(&mem).unwrap(), "end of program"); + Ok(mem) } /// Execute an AST's program. @@ -1123,7 +1153,7 @@ impl ExecutorContext { memory: &mut ProgramMemory, _body_type: BodyType, ) -> Result { - let pipe_info = PipeInfo::default(); + let mut pipe_info = PipeInfo::default(); // Iterate over the body of the program. for statement in &program.body { @@ -1252,8 +1282,10 @@ impl ExecutorContext { memory.add(&var_name, result, source_range)?; } Value::PipeExpression(pipe_expression) => { + pipe_info.log = var_name == "plumbus0"; let result = pipe_expression.get_result(memory, &pipe_info, self).await?; memory.add(&var_name, result, source_range)?; + pipe_info.log = false; } Value::PipeSubstitution(pipe_substitution) => { return Err(KclError::Semantic(KclErrorDetails { @@ -1283,48 +1315,52 @@ impl ExecutorContext { } } } - BodyItem::ReturnStatement(return_statement) => match &return_statement.argument { - Value::BinaryExpression(bin_expr) => { - let result = bin_expr.get_result(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); + BodyItem::ReturnStatement(return_statement) => { + match &return_statement.argument { + Value::BinaryExpression(bin_expr) => { + let result = bin_expr.get_result(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::UnaryExpression(unary_expr) => { + let result = unary_expr.get_result(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::Identifier(identifier) => { + let value = memory.get(&identifier.name, identifier.into())?.clone(); + memory.return_ = Some(ProgramReturn::Value(value)); + } + Value::Literal(literal) => { + memory.return_ = Some(ProgramReturn::Value(literal.into())); + } + Value::ArrayExpression(array_expr) => { + let result = array_expr.execute(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::ObjectExpression(obj_expr) => { + let result = obj_expr.execute(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::CallExpression(call_expr) => { + let result = call_expr.execute(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::MemberExpression(member_expr) => { + let result = member_expr.get_result(memory)?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::PipeExpression(pipe_expr) => { + let result = pipe_expr.get_result(memory, &pipe_info, self).await?; + memory.return_ = Some(ProgramReturn::Value(result)); + } + Value::PipeSubstitution(_) => {} + Value::FunctionExpression(_) => {} + Value::None(none) => { + memory.return_ = Some(ProgramReturn::Value(MemoryItem::from(none))); + } } - Value::UnaryExpression(unary_expr) => { - let result = unary_expr.get_result(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::Identifier(identifier) => { - let value = memory.get(&identifier.name, identifier.into())?.clone(); - memory.return_ = Some(ProgramReturn::Value(value)); - } - Value::Literal(literal) => { - memory.return_ = Some(ProgramReturn::Value(literal.into())); - } - Value::ArrayExpression(array_expr) => { - let result = array_expr.execute(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::ObjectExpression(obj_expr) => { - let result = obj_expr.execute(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::CallExpression(call_expr) => { - let result = call_expr.execute(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::MemberExpression(member_expr) => { - let result = member_expr.get_result(memory)?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::PipeExpression(pipe_expr) => { - let result = pipe_expr.get_result(memory, &pipe_info, self).await?; - memory.return_ = Some(ProgramReturn::Value(result)); - } - Value::PipeSubstitution(_) => {} - Value::FunctionExpression(_) => {} - Value::None(none) => { - memory.return_ = Some(ProgramReturn::Value(MemoryItem::from(none))); - } - }, + let mem_json = serde_json::to_string_pretty(&memory).unwrap(); + dump_json(&mem_json, "return statement"); + } } } @@ -2051,3 +2087,15 @@ const bracket = startSketchOn('XY') assert_eq!(json, r#"{"type":"ExtrudeGroups","value":[]}"#); } } + +fn dump_json(j: &str, where_at: &'static str) { + use rand::Rng; + let id: String = rand::thread_rng() + .sample_iter(&rand::distributions::Alphanumeric) + .take(7) + .map(char::from) + .collect(); + let filepath = format!("{id}.json"); + std::fs::write(&filepath, j).unwrap(); + println!("ADAM: Wrote all memory from {where_at} as {filepath}"); +} diff --git a/src/wasm-lib/kcl/src/std/extrude.rs b/src/wasm-lib/kcl/src/std/extrude.rs index 186a92ead..37f6cff10 100644 --- a/src/wasm-lib/kcl/src/std/extrude.rs +++ b/src/wasm-lib/kcl/src/std/extrude.rs @@ -108,6 +108,7 @@ pub(crate) async fn do_post_extrude( id: Uuid, args: Args, ) -> Result, KclError> { + println!("\tExtrude: post"); // We need to do this after extrude for sketch on face. if let SketchSurface::Face(_) = sketch_group.on { // Disable the sketch mode. @@ -133,6 +134,15 @@ pub(crate) async fn do_post_extrude( } let mut edge_id = None; + // println!("---"); + // println!( + // "ADAM: sketch group {} has {} children", + // sketch_group.id, + // sketch_group.value.len() + // ); + // for child in &sketch_group.value { + // println!("\t{} ({})", child.get_id(), child.get_name()); + // } for segment in sketch_group.value.iter() { if let Path::ToPoint { base } = segment { edge_id = Some(base.geo_meta.id); @@ -153,6 +163,32 @@ pub(crate) async fn do_post_extrude( if let SketchSurface::Face(face) = sketch_group.on { sketch_group.id = face.sketch_group_id; } + let sg_kids = args + .send_modeling_cmd( + id, + kittycad::types::ModelingCmd::EntityGetAllChildUuids { + entity_id: sketch_group.id, + }, + ) + .await?; + + let mut sg_kids = if let kittycad::types::OkWebSocketResponseData::Modeling { + modeling_response: kittycad::types::OkModelingCmdResponse::EntityGetAllChildUuids { data }, + } = sg_kids + { + data.entity_ids + } else { + return Err(KclError::Engine(KclErrorDetails { + source_ranges: vec![args.source_range], + message: "engine returned wrong type".to_owned(), + })); + }; + sg_kids.sort(); + // println!("The actual children of the sketch group are:"); + // for child in &sg_kids { + // println!("\t{child}"); + // } + // println!("---"); let solid3d_info = args .send_modeling_cmd( @@ -170,8 +206,12 @@ pub(crate) async fn do_post_extrude( { data.faces } else { - vec![] + return Err(KclError::Engine(KclErrorDetails { + source_ranges: vec![args.source_range], + message: "engine returned wrong type".to_owned(), + })); }; + println!("\t\tExtrude: GetExtrusionFaceInfo: {:?}", face_infos); // Create a hashmap for quick id lookup let mut face_id_map = std::collections::HashMap::new(); diff --git a/src/wasm-lib/kcl/src/std/fillet.rs b/src/wasm-lib/kcl/src/std/fillet.rs index 6f0a27683..367a794e2 100644 --- a/src/wasm-lib/kcl/src/std/fillet.rs +++ b/src/wasm-lib/kcl/src/std/fillet.rs @@ -110,6 +110,7 @@ async fn inner_fillet( } }; + println!("ADAM: Fillet API call starting"); args.send_modeling_cmd( uuid::Uuid::new_v4(), ModelingCmd::Solid3DFilletEdge { @@ -121,6 +122,7 @@ async fn inner_fillet( ) .await?; } + println!("ADAM: Fillet API call done"); Ok(extrude_group) } diff --git a/src/wasm-lib/kcl/src/std/sketch.rs b/src/wasm-lib/kcl/src/std/sketch.rs index 9319092f2..358afc678 100644 --- a/src/wasm-lib/kcl/src/std/sketch.rs +++ b/src/wasm-lib/kcl/src/std/sketch.rs @@ -1051,6 +1051,7 @@ async fn start_sketch_on_face( }) })?, }; + println!("ADAM: Extrude plane ID: {extrude_plane_id}"); // Enter sketch mode on the face. let id = uuid::Uuid::new_v4(); diff --git a/src/wasm-lib/lDPGEFQ.json b/src/wasm-lib/lDPGEFQ.json new file mode 100644 index 000000000..421df8c65 --- /dev/null +++ b/src/wasm-lib/lDPGEFQ.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3c05abf7-6c59-4e7a-8f88-39ef046a5983", + "name": "a", + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2358fe38-a6c0-4bb4-8b90-056cc8e22880", + "name": "b", + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1cbb3546-56d8-4be6-9523-c695846b71b6", + "name": "c", + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c8a554d0-6456-4034-b2ab-ce06fe950904", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "50bcdad2-2069-4e84-802d-86e08500eaf4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "2d03fb4c-7995-4953-ad28-7bf9a01fa416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3f20e37a-fb3f-4f04-a9e3-491a510f8fc4", + "endCapId": "912b8824-db3a-4803-aed9-cf0d7da8c99d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "2c76e0ab-4507-4791-909a-81e1383b84a1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8aa17d11-0a42-4cbf-8788-7fecf6514a77", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4bc9d173-494a-4f99-b5ef-1005fcc16ce1", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2e074545-ff40-40df-83e4-7494348bb44d", + "name": "arc-a", + "id": "ad26bf80-0265-4ee6-9afa-cabb323a49ce", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ad26bf80-0265-4ee6-9afa-cabb323a49ce", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5596ee94-546d-47a6-bc85-a8f6b112b5a2", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0cb7cb46-7500-4054-aae2-4a78a998f288", + "endCapId": "d9b9fd17-791f-48df-b19c-fead0aeeb09b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/lqhtGXv.json b/src/wasm-lib/lqhtGXv.json new file mode 100644 index 000000000..d70755ac0 --- /dev/null +++ b/src/wasm-lib/lqhtGXv.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "3f2fb5b9-02bd-446e-9aae-2926fc7a8403", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8bcb88d1-8d49-45e3-866f-83074d92c921", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "33a09239-d8c2-4436-ac56-dda361cc9b9e", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "78aea1a3-9f25-4b73-a5b3-f5af2b2e5fa4", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "85f92fb6-68ff-46e7-8c4d-575c4af46db0", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "ec075868-72cd-4387-ba5d-e3650dbd77f9", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "85f92fb6-68ff-46e7-8c4d-575c4af46db0", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/lshJlgR.json b/src/wasm-lib/lshJlgR.json new file mode 100644 index 000000000..4b69b2861 --- /dev/null +++ b/src/wasm-lib/lshJlgR.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c48b5628-a41e-4868-8736-235cd9d069ea", + "name": "a", + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "34890411-1aae-4b4e-94fd-49ddc6bc3981", + "name": "b", + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "314cf7ec-4c96-4d35-8364-cf81febe293a", + "name": "c", + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "38e3931d-f06d-45fd-b5ab-1bf25ae1fc80", + "endCapId": "c937d75f-0301-4df2-8d18-dccd41c248a1", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c4f6ce54-7007-446c-9571-896fbbefa673", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "addc4368-0c4a-4815-8d6b-1a6af247a767", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0d732d4d-ad46-486e-a358-a18804a94ffe", + "name": "arc-a", + "id": "b1dc366f-733d-42d7-9349-f33755861f05", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "b1dc366f-733d-42d7-9349-f33755861f05", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "db60dfc8-b508-480a-b6b4-657bef378ab9", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "22d07919-7db3-4867-b155-6786437e1597", + "endCapId": "2468f8f1-d9ef-4616-aaa1-b34ff5d3a26b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/mKiVGrW.json b/src/wasm-lib/mKiVGrW.json new file mode 100644 index 000000000..193781897 --- /dev/null +++ b/src/wasm-lib/mKiVGrW.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d169e0c1-e217-4f34-bd5c-e355a524bfd0", + "name": "a", + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3671d3fb-5a1c-4a18-8497-088e1e1744bd", + "name": "b", + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8191a441-0823-4951-b104-299d2b767378", + "name": "c", + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "b66c3a6c-6b21-4695-80a1-b7bde125a3e9", + "endCapId": "827fe57d-f6f9-4498-b932-dd5af06cb163", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "28154e12-d097-41de-83dd-789f5c26fb24", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "edd79178-b775-446b-8462-c7a4119131f3", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "4908f21f-e5ab-452a-9a29-c6ad1ad90666", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "d012ffb4-8eae-448b-b240-58207dec3e78", + "value": "a", + "sketchGroupId": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "d169e0c1-e217-4f34-bd5c-e355a524bfd0", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "dc0ee03f-d785-4b2e-8b87-e307ec9cdb84", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "d012ffb4-8eae-448b-b240-58207dec3e78", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/mvw2wxi.json b/src/wasm-lib/mvw2wxi.json new file mode 100644 index 000000000..fa98755eb --- /dev/null +++ b/src/wasm-lib/mvw2wxi.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "461921ce-1e42-44c2-959c-3bb1c7a9a4d1", + "name": "a", + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6cf06f1-483e-4c08-a199-4380936d17fc", + "name": "b", + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7fe777a2-8c82-4702-ab87-d5110c1cd8aa", + "name": "c", + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c7391937-727e-4f1d-80aa-9aee5aa70360", + "endCapId": "9eed37be-c7da-4cf6-a353-cc4c5da636dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "707534eb-62a8-4044-9fc3-67a065aba8f9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "f2b63eca-f22a-4971-8a53-211ed1540c57", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "210b6b41-ece5-4fef-b36a-ce022a3afbe7", + "name": "arc-a", + "id": "f4aacb94-1d10-4fea-8188-ce2fd3f68495", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "f4aacb94-1d10-4fea-8188-ce2fd3f68495", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6c3e4c5a-312b-49ec-9065-b9ea8c9aaa57", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "2b0e2032-5a5b-4082-8908-ead48a6412b4", + "endCapId": "ca5dfb1b-3119-4d1b-ad20-af1622a65ef5", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/naQMz08.json b/src/wasm-lib/naQMz08.json new file mode 100644 index 000000000..8044c4bb4 --- /dev/null +++ b/src/wasm-lib/naQMz08.json @@ -0,0 +1,1193 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "bf031d6a-038d-405b-9e12-5c7dc9fb3cff", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "dee50147-64de-4885-8cec-093ffcbdf3a5", + "name": "a", + "id": "0b81e21f-6ff1-4f2d-a61d-82cec33acd75", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e8bf39ed-7a62-440d-ba59-011b04d3636d", + "name": "b", + "id": "62c6e6cd-b34b-4057-a716-84c696cd25cc", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8c8c8e17-0f0f-49e4-9c5b-eece04710292", + "name": "c", + "id": "07d56afe-95a5-4524-8d1f-da3f58ba3416", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0b81e21f-6ff1-4f2d-a61d-82cec33acd75", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "62c6e6cd-b34b-4057-a716-84c696cd25cc", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "07d56afe-95a5-4524-8d1f-da3f58ba3416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "98c70850-e062-4cd6-92fd-f51c3ec03542", + "endCapId": "abcd0a71-75a6-438e-bbad-0c1c64fa6418", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7b53926c-688f-48d8-9d93-f3a5a7b321a2", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "415bfa89-b920-4867-82fe-dd3e0494f35a", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ef95d870-3415-4756-bd59-b9fe6176b60b", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "f7bf6d8b-bcdd-4742-8713-154387b57c49", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "31587720-580d-4eec-8cfe-caaa60e7ddb2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e2921e5e-28cc-4d77-9fa6-e997282df0b7", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "fcd58234-45ae-4acb-8ebd-795db914af9e", + "value": "b", + "sketchGroupId": "bf031d6a-038d-405b-9e12-5c7dc9fb3cff", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "e8bf39ed-7a62-440d-ba59-011b04d3636d", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3fe06479-0058-4bc9-af10-41ee53a662df", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "fcd58234-45ae-4acb-8ebd-795db914af9e", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/nkuRLLM.json b/src/wasm-lib/nkuRLLM.json new file mode 100644 index 000000000..8a6127106 --- /dev/null +++ b/src/wasm-lib/nkuRLLM.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b015fc86-8e52-492b-b05e-29ef1960fc27", + "name": "a", + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a2f2078f-b855-4c16-b19b-513d01de8608", + "name": "b", + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2d018336-ae6b-495b-a787-711c3f6a8038", + "name": "c", + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "cc7a6dff-9daf-4368-9408-4f5410da8dff", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "8b5dfc47-150b-4d2b-8d62-ae1a49bfd4c6", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "27c5b21e-9cba-425c-9ed2-dba4a42afdfe", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e3d18e4b-345f-4038-bcaf-f313db504f5b", + "endCapId": "573ef23f-cce8-4f45-8c8d-70b5a6323c55", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ce1d3730-0afc-47d7-8c84-bf5578acf4cf", + "name": "arc-a", + "id": "863981fa-2698-4049-a11c-1ee93ce18830", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "863981fa-2698-4049-a11c-1ee93ce18830", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1d45c0a2-d2f5-4803-8af0-0fab694fcf61", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f2dca00a-5d45-450a-8011-f0ace58b5c65", + "endCapId": "46fc6b60-09a1-4862-8855-0c46b5bed126", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "64e01f25-2224-4fd9-9696-3f8635b06793", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "851176aa-a85b-45fc-9318-df1b9c1ca919", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "a4019c9f-ccb6-4fd0-a68b-3fbb4564de66", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "42c3d246-9091-4951-9122-a32ba7ea3b1b", + "value": "b", + "sketchGroupId": "8e646237-3736-439f-8aec-cb0ab2713e8d", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "a2f2078f-b855-4c16-b19b-513d01de8608", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "761a228b-a4c3-453e-9e26-6beeb6a5b927", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "42c3d246-9091-4951-9122-a32ba7ea3b1b", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/no_fillet.json b/src/wasm-lib/no_fillet.json new file mode 100644 index 000000000..837884e66 --- /dev/null +++ b/src/wasm-lib/no_fillet.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a16a4701-dafe-4d1d-82b9-0da1641fde5e", + "name": "a", + "id": "ff28b371-b6e7-4b49-9fd0-1eb09c3db671", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a3666835-818b-43c1-b94e-d593f8b41886", + "name": "b", + "id": "b01c9b15-cfc8-4fd6-862b-6ea02f751fe3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "61117da5-7ed1-46de-99f2-35fb9421c932", + "name": "c", + "id": "e6535f04-7a56-418e-b41c-07cc102dddf5", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ff28b371-b6e7-4b49-9fd0-1eb09c3db671", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b01c9b15-cfc8-4fd6-862b-6ea02f751fe3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e6535f04-7a56-418e-b41c-07cc102dddf5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "d5dd7dd3-9f29-4ecb-8a21-c4c6cdc93acb", + "endCapId": "77d70dcf-2b3e-4c29-bd90-43e26a68fe46", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "60c5d6e3-2573-41da-87d5-ee8c10891613", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "e9f38ffd-32fa-42f4-b78d-a22cf0a03919", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "fb423394-5c17-434b-a52a-fb7f961f1ff5", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "901d06e8-b095-484a-b170-d140de49cbb6", + "value": "a", + "sketchGroupId": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "a16a4701-dafe-4d1d-82b9-0da1641fde5e", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "026ac845-c3fb-488f-b085-87ced2804d60", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "901d06e8-b095-484a-b170-d140de49cbb6", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/nxJCEfG.json b/src/wasm-lib/nxJCEfG.json new file mode 100644 index 000000000..20c6ab4ac --- /dev/null +++ b/src/wasm-lib/nxJCEfG.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "e2bf52a4-3b5a-4adb-8cf6-98366ae16be5", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "c190cb17-9fc3-43cc-ad79-fa5fdae364ce", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "90a74698-415c-47ca-93f8-3dd7dca6d969", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "43536237-73f9-44ad-b17c-ac4e909ef505", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "1fa024f7-ee7f-403d-a683-b1b7ac7a9e9b", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "5edf34f4-bda2-485a-82b8-0174171ec1d3", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "1fa024f7-ee7f-403d-a683-b1b7ac7a9e9b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/oTQfj8B.json b/src/wasm-lib/oTQfj8B.json new file mode 100644 index 000000000..0895f3989 --- /dev/null +++ b/src/wasm-lib/oTQfj8B.json @@ -0,0 +1,1110 @@ +{ + "root": { + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8b5c849c-12c4-49ba-a158-d25c5403d81d", + "name": "a", + "id": "3160120b-5758-4688-88eb-32a6630653f0", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b268c839-0e47-4ac9-b2f9-611b0b9f00d0", + "name": "b", + "id": "2933e624-1c3d-4519-b7ab-3be23628045b", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d28b4fae-f76a-4059-b2e9-1d9880605421", + "name": "c", + "id": "8efe3f7e-9193-4128-86a1-9a0ca1a6d5a5", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3160120b-5758-4688-88eb-32a6630653f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2933e624-1c3d-4519-b7ab-3be23628045b", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "8efe3f7e-9193-4128-86a1-9a0ca1a6d5a5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "37ec7f11-79fe-41f6-bd47-f4acb0d60e26", + "endCapId": "abc58940-75c1-43c0-a121-e803d4fc56f3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "cccc2e9f-236a-49f1-b7d2-94241fb8d3fb", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "9b5403ae-c53c-42d8-b5d0-836b55573b23", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "611b5b07-1eb3-493a-9d99-a8dfaffd9900", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "b6c1c396-29ef-45f6-91d6-75131e60fc1d", + "value": "a", + "sketchGroupId": "0a6e9872-8d74-4587-92b0-75f76494dc42", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "8b5c849c-12c4-49ba-a158-d25c5403d81d", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "435a11f7-b17e-421e-bc31-285a62aea26c", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "b6c1c396-29ef-45f6-91d6-75131e60fc1d", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/ojGYLcJ.json b/src/wasm-lib/ojGYLcJ.json new file mode 100644 index 000000000..5df26102c --- /dev/null +++ b/src/wasm-lib/ojGYLcJ.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "bf031d6a-038d-405b-9e12-5c7dc9fb3cff", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "0b81e21f-6ff1-4f2d-a61d-82cec33acd75", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "62c6e6cd-b34b-4057-a716-84c696cd25cc", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "07d56afe-95a5-4524-8d1f-da3f58ba3416", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "e8b0d416-91d5-4a09-9704-74dd2e9367f3", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "63b4656a-fc90-4b6b-a20a-958889a8d708", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e8b0d416-91d5-4a09-9704-74dd2e9367f3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/omdWelP.json b/src/wasm-lib/omdWelP.json new file mode 100644 index 000000000..fe8c09709 --- /dev/null +++ b/src/wasm-lib/omdWelP.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "9d764874-d30d-4ec4-864b-db911663e148", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "93fe50bc-4ebb-40f9-900d-04380f114c4c", + "name": "a", + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a359291e-5c58-480a-914e-08e7ae51a2b5", + "name": "b", + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a0b1691c-5d1f-467e-848b-91e4662c40e9", + "name": "c", + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ea64086f-d1ad-40c8-a4f3-64c0a78039ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f56b21b2-2695-4868-985d-2c90d70bff1f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "4f8a93ff-3bfc-4d44-b4a0-26e33654b1a6", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "ab53d6ba-56fe-4ab8-adea-48a23ed81a63", + "endCapId": "6fa95bbc-7285-4d98-9b19-d865628f7ea9", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "c7a68045-2fca-4b86-afe3-9aafdb58bcd7", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ae0752bd-c5d1-4fd1-888f-9c7cc4bc455c", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "050e340b-018e-42c1-93dd-68bc1b8b6120", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "816dfc12-1951-43c8-aee2-25bf7560e371", + "value": "a", + "sketchGroupId": "9d764874-d30d-4ec4-864b-db911663e148", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "93fe50bc-4ebb-40f9-900d-04380f114c4c", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "82f56dd9-813e-4fd4-b345-646acc17b61f", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "816dfc12-1951-43c8-aee2-25bf7560e371", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/ooZ56qy.json b/src/wasm-lib/ooZ56qy.json new file mode 100644 index 000000000..057e3d6df --- /dev/null +++ b/src/wasm-lib/ooZ56qy.json @@ -0,0 +1,1158 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "76be30d8-5433-4339-b9c0-6086ad84544b", + "name": "a", + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e64f1823-35e1-4002-829a-cea247e0cddd", + "name": "b", + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f52a80eb-a07d-4c87-9f9f-a3073780fd81", + "name": "c", + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4946fb29-4aaa-487b-87f3-1e6fdcd0ce0f", + "endCapId": "c4e8495f-8a1f-4c80-976f-e573dc8ae74b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "4f367e77-4823-4cd1-bc8d-e350718bed94", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1ddc64d8-6898-44a2-9bf3-52ac8aa7bc6c", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1153d1fa-8d9c-4b5c-815d-f867250c9617", + "name": "arc-a", + "id": "956e0e33-ae0b-4ffa-a786-ed6bed96fdc8", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "956e0e33-ae0b-4ffa-a786-ed6bed96fdc8", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3be69801-19c0-4df0-877d-3105e2e14f59", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "adadab69-4056-4661-ac62-c2e3129025fc", + "endCapId": "806cbc12-8a71-499d-aca6-74b2f2b804a4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/p0_circl.json b/src/wasm-lib/p0_circl.json new file mode 100644 index 000000000..1af8f7c6f --- /dev/null +++ b/src/wasm-lib/p0_circl.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2b51e7a2-b0a8-4b2b-ba2e-0041bb9ef9f1", + "name": "a", + "id": "384569b4-6cb8-4b97-92d0-93b539e49800", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "73f29b44-9d44-48ca-8846-bf4664d15136", + "name": "b", + "id": "f6bb7e9b-10ec-4ca2-99dd-41f291f69325", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6bc4bdd3-9cc8-4c25-a1c1-1492c00026a0", + "name": "c", + "id": "eec6d14a-a2c5-4940-ad0d-ae080cb9fe4e", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "384569b4-6cb8-4b97-92d0-93b539e49800", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f6bb7e9b-10ec-4ca2-99dd-41f291f69325", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "eec6d14a-a2c5-4940-ad0d-ae080cb9fe4e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "7bee3827-5c77-4c08-850f-1938a502497a", + "endCapId": "d1d77c9a-f5af-4c52-bc2c-6ff8dbc65106", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6ecc9ac2-21dd-474f-84c3-0ba6f8d497cb", + "name": "arc-a", + "id": "a51de0e8-efb6-4277-9cf9-fb73393e200f", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "a51de0e8-efb6-4277-9cf9-fb73393e200f", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ffae0e50-f153-40ba-8551-868bdf470829", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c7135955-359f-4d70-ba5e-03690a8712b3", + "endCapId": "bcad0fa4-c165-4ac7-adc8-ea9dadf1bf2a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "f4663233-9fed-4533-8224-aa1f8e11ec91", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "f8b45114-425e-4f47-9b75-0d523c93735b", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e11fa5d1-230b-4b11-819f-b1ec7e6d0acf", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "4e92a302-9699-4fc5-8879-4410d41195dc", + "value": "b", + "sketchGroupId": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "73f29b44-9d44-48ca-8846-bf4664d15136", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2bf07743-95b2-413c-9f1d-2465c98beeb0", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "4e92a302-9699-4fc5-8879-4410d41195dc", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/p0_inlined.json b/src/wasm-lib/p0_inlined.json new file mode 100644 index 000000000..0031cf69d --- /dev/null +++ b/src/wasm-lib/p0_inlined.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "697a9e83-718a-4c1a-b253-3ec3621bc65f", + "name": "a", + "id": "78ce61b1-a34d-4439-bfd8-3b664fb64c2f", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "03dcb355-cdcb-4c65-9400-c51804069b1c", + "name": "b", + "id": "2be52eca-a42a-4475-8ff4-48cdcfe820e3", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9e2b9264-ff0b-4001-ab9f-d165de55603d", + "name": "c", + "id": "e439372c-e556-4ae3-8c0e-effbaf158cf1", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "78ce61b1-a34d-4439-bfd8-3b664fb64c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "2be52eca-a42a-4475-8ff4-48cdcfe820e3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e439372c-e556-4ae3-8c0e-effbaf158cf1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "41156b69-f3bb-4335-b33a-4e1fd0c3d45c", + "endCapId": "2f32c56f-fd6e-4965-9711-22d8130628e8", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "280dac85-0a9a-4f45-a224-412c0bac7a0f", + "name": "arc-b", + "id": "d845934c-078c-4b38-a3d9-e0b0f81d72ef", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "d845934c-078c-4b38-a3d9-e0b0f81d72ef", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5a44a31c-fd4a-4cdf-8c41-020e0bdabcfd", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "a896389d-da4d-4de6-9c9a-6c532638bb91", + "endCapId": "431726d3-51ba-4f10-86cc-a5080d690da5", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "7e00960d-13f8-4ad4-aa49-32173451c94b", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "4933bd5b-4fc5-4068-9659-c81b12f0f160", + "name": "arc-a", + "id": "6a16be07-5db9-4b6f-a1a3-5b34f92b87c1", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "6a16be07-5db9-4b6f-a1a3-5b34f92b87c1", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "af29d53b-c3d2-4cbf-9fcd-fd901aa65001", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "98bc8023-70d7-41ea-be4c-851a1fa3978d", + "endCapId": "77047c91-c416-4ec2-82f7-df7d795cd345", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/p1.json b/src/wasm-lib/p1.json new file mode 100644 index 000000000..5d7709fbc --- /dev/null +++ b/src/wasm-lib/p1.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2b51e7a2-b0a8-4b2b-ba2e-0041bb9ef9f1", + "name": "a", + "id": "384569b4-6cb8-4b97-92d0-93b539e49800", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "73f29b44-9d44-48ca-8846-bf4664d15136", + "name": "b", + "id": "f6bb7e9b-10ec-4ca2-99dd-41f291f69325", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6bc4bdd3-9cc8-4c25-a1c1-1492c00026a0", + "name": "c", + "id": "eec6d14a-a2c5-4940-ad0d-ae080cb9fe4e", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "384569b4-6cb8-4b97-92d0-93b539e49800", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "f6bb7e9b-10ec-4ca2-99dd-41f291f69325", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "eec6d14a-a2c5-4940-ad0d-ae080cb9fe4e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "7bee3827-5c77-4c08-850f-1938a502497a", + "endCapId": "d1d77c9a-f5af-4c52-bc2c-6ff8dbc65106", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "39e5afc2-0621-4627-a830-92a39fcac49c", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "a51de0e8-efb6-4277-9cf9-fb73393e200f", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "ffae0e50-f153-40ba-8551-868bdf470829", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "bea2d24f-3721-4680-9427-43408c32063c", + "value": "a", + "sketchGroupId": "a39ccaad-b6fb-41d4-a691-d509843d1d92", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "2b51e7a2-b0a8-4b2b-ba2e-0041bb9ef9f1", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2977ca4b-ebd9-4e3d-a65b-7b4f1ff4cba3", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "bea2d24f-3721-4680-9427-43408c32063c", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/pJBWD1T.json b/src/wasm-lib/pJBWD1T.json new file mode 100644 index 000000000..33600986e --- /dev/null +++ b/src/wasm-lib/pJBWD1T.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0fd1dec6-c8fc-4ebf-9ffa-c4649b8c0e5b", + "name": "a", + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3154046e-49b1-4373-aa28-a63ffff42c53", + "name": "b", + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4e8fe98-8348-4ca6-bdf0-a376e4f9ad47", + "name": "c", + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "2cfb30cb-aee9-489e-ad70-c48fec1417b7", + "endCapId": "1cea57e1-e7d6-4fd9-9bea-e9a4e840203e", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1d8798da-3074-406f-a8b2-9534d241be4a", + "name": "arc-b", + "id": "20f32bb5-55f7-45e5-b091-d892edf5f8cb", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "20f32bb5-55f7-45e5-b091-d892edf5f8cb", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1901692f-f1fe-43f7-8875-758eefa676c1", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "69cb3485-a21c-4e37-b524-1b21912afd53", + "endCapId": "fe426a9c-8a40-4120-8866-17e556b33cfb", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "949cf00b-1fe6-4fd2-8261-322640bd41da", + "name": "arc-a", + "id": "800d8975-bb2a-49ac-a71b-971b88a5b204", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "800d8975-bb2a-49ac-a71b-971b88a5b204", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "655b3cdb-fb80-4fb3-977a-979098fd3b4f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "89662d9d-8897-4062-a80d-f6e7dac71adc", + "endCapId": "bc9b5060-fb58-439c-b484-2549c9c8d8b4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/pNdtaCV.json b/src/wasm-lib/pNdtaCV.json new file mode 100644 index 000000000..fc7ee6034 --- /dev/null +++ b/src/wasm-lib/pNdtaCV.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "461921ce-1e42-44c2-959c-3bb1c7a9a4d1", + "name": "a", + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d6cf06f1-483e-4c08-a199-4380936d17fc", + "name": "b", + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7fe777a2-8c82-4702-ab87-d5110c1cd8aa", + "name": "c", + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b00d1ce0-389f-4121-a4c3-1b77270cd592", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "dccd0974-9a7e-43ac-b70a-8696fdab9849", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "54cf2327-855a-4407-b878-3f41c3beb55b", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c7391937-727e-4f1d-80aa-9aee5aa70360", + "endCapId": "9eed37be-c7da-4cf6-a353-cc4c5da636dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "0f9061cd-a1c1-485c-8551-c0a0f2473999", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "f4aacb94-1d10-4fea-8188-ce2fd3f68495", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6c3e4c5a-312b-49ec-9065-b9ea8c9aaa57", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "c69fe889-6356-425d-b263-6a1e5f5fc2af", + "value": "a", + "sketchGroupId": "af95c32f-3719-42b5-8af0-06baf432ed5e", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "461921ce-1e42-44c2-959c-3bb1c7a9a4d1", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6f1ab3ae-8ec1-47dc-b1ed-82790f9bd7a2", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "c69fe889-6356-425d-b263-6a1e5f5fc2af", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/piTnfBp.json b/src/wasm-lib/piTnfBp.json new file mode 100644 index 000000000..2ee838091 --- /dev/null +++ b/src/wasm-lib/piTnfBp.json @@ -0,0 +1,1110 @@ +{ + "root": { + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "82d1d629-07fe-4259-b316-c4e674492c29", + "name": "a", + "id": "8e4750a3-06c2-4021-b925-1f79a3b4ed58", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3112e374-9508-4f21-972b-aadd273a0518", + "name": "b", + "id": "4f8d035d-f07e-408d-baee-eac9560e0ff7", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "cb368867-975f-40ea-81ea-cb219a3eeeb0", + "name": "c", + "id": "bf45d9cc-d829-4693-8e57-02d3d2c9c251", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8e4750a3-06c2-4021-b925-1f79a3b4ed58", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4f8d035d-f07e-408d-baee-eac9560e0ff7", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "bf45d9cc-d829-4693-8e57-02d3d2c9c251", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "ec665b72-aa95-42cb-933e-a91ed35a820e", + "endCapId": "5e6e201b-175f-4836-b70e-224cc188b126", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "6ac82b0f-9cfd-4d29-81e7-f745e45d3d51", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ff52b414-747e-4d39-b502-5230a79e2766", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "98ac9a6d-718e-4567-9676-f90d403c8535", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "7d596876-3c02-4054-a090-f2dd9d139c93", + "value": "a", + "sketchGroupId": "2bd1c522-7573-498d-848e-ffc8875bb2f8", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "82d1d629-07fe-4259-b316-c4e674492c29", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "264b478c-c294-4cf9-9b87-5d5943a3eb0b", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7d596876-3c02-4054-a090-f2dd9d139c93", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/pzv37fY.json b/src/wasm-lib/pzv37fY.json new file mode 100644 index 000000000..3d130a96f --- /dev/null +++ b/src/wasm-lib/pzv37fY.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "50b94c84-8347-4979-b8ab-dce4e8d83d3a", + "name": "a", + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a5e88af5-04d1-4223-8a23-999d08e46d0e", + "name": "b", + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d32e78c5-b6e1-48b6-8c3c-44f94ace82dd", + "name": "c", + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "25bca208-b73f-464a-b043-3c203574d9ca", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "d0f67312-acb9-42be-ac03-5f56ebf58674", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "3a6cd06b-96e9-4158-a798-a1a0678f0566", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "321df8c4-76fd-410e-aef9-55f414c03a9d", + "endCapId": "0f65e802-690f-4191-8196-ce3bb8f27d06", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "475427ac-08b1-441c-9a4e-53b4245b4aa1", + "name": "arc-a", + "id": "ef138013-489a-4d3d-8de2-16a27e4ac4e9", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "ef138013-489a-4d3d-8de2-16a27e4ac4e9", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8e79e996-cc94-4e7c-841e-18e78e58d15e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "d52b25bf-ef87-4b92-ad4a-3f5684535cac", + "endCapId": "022daf1e-d20b-4a01-a38b-e96d62f3f802", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "6f31ca24-995d-48cf-a853-785d2adae3b5", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "c1c4b190-712e-4338-a63f-0436693084a8", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2fae8148-4c80-4373-b03e-63f53da20511", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "605ab6d8-63d4-4aa9-9dd3-cdeef666d46d", + "value": "b", + "sketchGroupId": "e3760185-e471-4d33-82f4-ceac5e0b82cf", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "a5e88af5-04d1-4223-8a23-999d08e46d0e", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2e96954c-b861-442f-914b-4b4ff8e9253e", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "605ab6d8-63d4-4aa9-9dd3-cdeef666d46d", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/rBUWqRq.json b/src/wasm-lib/rBUWqRq.json new file mode 100644 index 000000000..4bce9aa75 --- /dev/null +++ b/src/wasm-lib/rBUWqRq.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "336fed79-218b-4054-af3e-5fcef6218610", + "name": "a", + "id": "8740c8db-3c48-4f8a-a99d-5cccd615c1bd", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "98cb12bb-0bae-4766-88b3-6b9c0ef136a4", + "name": "b", + "id": "ac4fc064-fe7c-4c4d-ba99-0ded33174cec", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7dc52fa3-960a-4045-b486-c28b5d0aa6a6", + "name": "c", + "id": "7513ee3e-0c02-494a-ad73-47c12e6cf9c1", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "8740c8db-3c48-4f8a-a99d-5cccd615c1bd", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "ac4fc064-fe7c-4c4d-ba99-0ded33174cec", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "7513ee3e-0c02-494a-ad73-47c12e6cf9c1", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "c3e816cc-855f-4f29-ae9c-452d76db40e2", + "endCapId": "bb93b35e-796a-4550-9c1f-cabd00d1596c", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "81a7530a-5854-4bf6-afd6-6b45107c297f", + "name": "arc-b", + "id": "2b4b1684-bcdf-4a2f-8c28-3bbd1636df25", + "sourceRange": [ + 944, + 970 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "2b4b1684-bcdf-4a2f-8c28-3bbd1636df25", + "sourceRange": [ + 944, + 970 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "c928c04d-d039-460b-8a24-bd948b88a3c2", + "sourceRange": [ + 976, + 984 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e9890c0f-c657-471d-97d1-205e9ec5e50d", + "endCapId": "7dbcd828-9eed-4ace-97d1-51fa96b39f1c", + "__meta": [ + { + "sourceRange": [ + 882, + 938 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "55acf4ff-4bb9-4e23-997c-267ee0a98530", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0d196744-9cb1-418b-a612-7f51be456583", + "name": "arc-a", + "id": "7ba51a67-a267-47e9-8f33-0f8a85c7475b", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "7ba51a67-a267-47e9-8f33-0f8a85c7475b", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8f2ef187-d084-43ef-8c81-7baa63211549", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "96475d63-4702-403f-a145-f726da93dd89", + "endCapId": "3b3ea30b-3787-4e7a-b4f6-5c8fd855e20e", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/rUdnfjV.json b/src/wasm-lib/rUdnfjV.json new file mode 100644 index 000000000..c0af0123d --- /dev/null +++ b/src/wasm-lib/rUdnfjV.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "a2ecd9a1-c7cc-4db3-bb63-5be5974855cd", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "4598a980-b1f3-4bd1-bdf3-66f356bff321", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "791741d9-4cd8-4f13-bec4-97780e934151", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "04a888d1-dc0e-403d-9309-dfe59023193f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "e31fedb4-f9fc-4faa-8e34-ddb5c6921979", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "b790dff1-171c-487e-b389-6004e5a6402a", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "e31fedb4-f9fc-4faa-8e34-ddb5c6921979", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/ret0.json b/src/wasm-lib/ret0.json new file mode 100644 index 000000000..8d0c9a111 --- /dev/null +++ b/src/wasm-lib/ret0.json @@ -0,0 +1,128 @@ +{ + "type": "SketchGroup", + "type": "SketchGroup", + "id": "25010844-4c69-4731-8a9f-6796250942bd", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "d4270cf3-ff89-444b-a8f4-9ea97bbc7030", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5dd76753-f331-4a2d-a617-73a832a1f99a", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "157dec0d-2aae-4909-8264-b0e96c14f408", + "value": "b", + "sketchGroupId": "28caf11c-38dd-4fab-8e0b-bd554f89b51e", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "488fcdec-30d7-4443-ba19-dd2949d3526d", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "5c11dfea-d718-4dac-84b8-22d06b6a894f", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "157dec0d-2aae-4909-8264-b0e96c14f408", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] +} \ No newline at end of file diff --git a/src/wasm-lib/ret1.json b/src/wasm-lib/ret1.json new file mode 100644 index 000000000..e8d86fa03 --- /dev/null +++ b/src/wasm-lib/ret1.json @@ -0,0 +1,144 @@ +[ + { + "type": "SketchGroup", + "id": "f2e46b25-efcc-4d77-aaff-c9fa57200d98", + "value": [ + { + "type": "ToPoint", + "from": [ + -250, + -250 + ], + "to": [ + 250, + -250 + ], + "name": "a", + "__geoMeta": { + "id": "b08a1a48-af52-40e0-bcb8-addd0ab21c59", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250, + -250 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "80383477-ff1c-4189-8fd5-de006a063945", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "cb414ed6-5362-4021-8c19-9baa4a9e744d", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "160f3b26-60d3-4a15-b6c2-5a44b5c0ad47", + "value": "XY", + "origin": { + "x": 0, + "y": 0, + "z": 0 + }, + "xAxis": { + "x": 1, + "y": 0, + "z": 0 + }, + "yAxis": { + "x": 0, + "y": 1, + "z": 0 + }, + "zAxis": { + "x": 0, + "y": 0, + "z": 1 + }, + "__meta": [] + }, + "start": { + "from": [ + -250, + -250 + ], + "to": [ + -250, + -250 + ], + "name": "", + "__geoMeta": { + "id": "b0840c0b-514e-4ff4-a38b-cfe984248cdb", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0, + 0, + 0 + ], + "rotation": [ + 0, + 0, + 0, + 1 + ], + "xAxis": { + "x": 1, + "y": 0, + "z": 0 + }, + "yAxis": { + "x": 0, + "y": 1, + "z": 0 + }, + "zAxis": { + "x": 0, + "y": 0, + "z": 1 + }, + "entityId": "160f3b26-60d3-4a15-b6c2-5a44b5c0ad47", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +] diff --git a/src/wasm-lib/return_plumbus0.json b/src/wasm-lib/return_plumbus0.json new file mode 100644 index 000000000..2df12f131 --- /dev/null +++ b/src/wasm-lib/return_plumbus0.json @@ -0,0 +1 @@ +{"type":"SketchGroup","type":"SketchGroup","id":"a2c2e85b-c27d-44c7-a7d7-06950f4ed58b","value":[{"type":"ToPoint","from":[80.0,100.0],"to":[80.0,99.99999999999999],"name":"arc-b","__geoMeta":{"id":"01e7cfd9-bcb6-489f-aeb7-769b016417f6","sourceRange":[667,693]}},{"type":"ToPoint","from":[80.0,99.99999999999999],"to":[80.0,100.0],"name":"","__geoMeta":{"id":"77fd4f73-2077-4b6a-bf46-eb17ca22e71b","sourceRange":[699,707]}}],"on":{"type":"face","id":"1f9b9b3b-62b9-4508-a727-bf2c08cd709f","value":"b","sketchGroupId":"f2e46b25-efcc-4d77-aaff-c9fa57200d98","xAxis":{"x":1.0,"y":0.0,"z":0.0},"yAxis":{"x":0.0,"y":1.0,"z":0.0},"zAxis":{"x":0.0,"y":0.0,"z":1.0},"faceId":"99f1e5d6-c1dc-46ef-a102-5f0e57b8c133","__meta":[{"sourceRange":[578,599]}]},"start":{"from":[80.0,100.0],"to":[80.0,100.0],"name":"","__geoMeta":{"id":"94f9bf99-1774-4dfe-92f0-3581281dc858","sourceRange":[605,661]}},"position":[0.0,0.0,0.0],"rotation":[0.0,0.0,0.0,1.0],"xAxis":{"x":1.0,"y":0.0,"z":0.0},"yAxis":{"x":0.0,"y":1.0,"z":0.0},"zAxis":{"x":0.0,"y":0.0,"z":1.0},"entityId":"1f9b9b3b-62b9-4508-a727-bf2c08cd709f","__meta":[{"sourceRange":[605,661]}]} \ No newline at end of file diff --git a/src/wasm-lib/return_plumbus1.json b/src/wasm-lib/return_plumbus1.json new file mode 100644 index 000000000..2bf1af4ec --- /dev/null +++ b/src/wasm-lib/return_plumbus1.json @@ -0,0 +1 @@ +{"type":"SketchGroup","type":"SketchGroup","id":"f2e46b25-efcc-4d77-aaff-c9fa57200d98","value":[{"type":"ToPoint","from":[-250.0,-250.0],"to":[250.0,-250.0],"name":"a","__geoMeta":{"id":"b08a1a48-af52-40e0-bcb8-addd0ab21c59","sourceRange":[104,149]}},{"type":"ToPoint","from":[250.0,-250.0],"to":[8.526512829121202e-14,183.01270189221935],"name":"b","__geoMeta":{"id":"80383477-ff1c-4189-8fd5-de006a063945","sourceRange":[155,238]}},{"type":"ToPoint","from":[8.526512829121202e-14,183.01270189221935],"to":[-250.00000000000014,-249.99999999999983],"name":"c","__geoMeta":{"id":"cb414ed6-5362-4021-8c19-9baa4a9e744d","sourceRange":[244,327]}}],"on":{"type":"plane","id":"160f3b26-60d3-4a15-b6c2-5a44b5c0ad47","value":"XY","origin":{"x":0.0,"y":0.0,"z":0.0},"xAxis":{"x":1.0,"y":0.0,"z":0.0},"yAxis":{"x":0.0,"y":1.0,"z":0.0},"zAxis":{"x":0.0,"y":0.0,"z":1.0},"__meta":[]},"start":{"from":[-250.0,-250.0],"to":[-250.0,-250.0],"name":"","__geoMeta":{"id":"b0840c0b-514e-4ff4-a38b-cfe984248cdb","sourceRange":[59,98]}},"position":[0.0,0.0,0.0],"rotation":[0.0,0.0,0.0,1.0],"xAxis":{"x":1.0,"y":0.0,"z":0.0},"yAxis":{"x":0.0,"y":1.0,"z":0.0},"zAxis":{"x":0.0,"y":0.0,"z":1.0},"entityId":"160f3b26-60d3-4a15-b6c2-5a44b5c0ad47","__meta":[{"sourceRange":[59,98]}]} \ No newline at end of file diff --git a/src/wasm-lib/scratch b/src/wasm-lib/scratch new file mode 100644 index 000000000..3ca124d01 --- /dev/null +++ b/src/wasm-lib/scratch @@ -0,0 +1,123 @@ +ADAM: Wrote all memory from return statement as rUdnfjV.json + Extrude: post +--- +ADAM: sketch group a2ecd9a1-c7cc-4db3-bb63-5be5974855cd has 3 children + 4598a980-b1f3-4bd1-bdf3-66f356bff321 (a) + 791741d9-4cd8-4f13-bec4-97780e934151 (b) + 04a888d1-dc0e-403d-9309-dfe59023193f (c) +The actual children of the sketch group are: + 04a888d1-dc0e-403d-9309-dfe59023193f + 0c9a33b2-f704-45f3-8f28-1f79c437eb4b + 1ebd2369-5888-4593-8e5f-7fa49f286ca0 + 3abe9a2d-2db4-443d-b53a-93519802b387 + 4598a980-b1f3-4bd1-bdf3-66f356bff321 + 50b765e9-2682-4e29-8a1c-8513c1d7a17e + 5560780a-1fa1-4e32-b95f-91cd457d46e1 + 575bd726-0e1e-47be-a526-b29f7d766a6a + 78fb3026-5ae5-425e-95b9-37e9aa5b7fd4 + 791741d9-4cd8-4f13-bec4-97780e934151 + 796164d8-7dd1-4d87-9c9d-50c4c4f6ed75 + 850cbb5f-500b-4f38-8653-c068ede2f609 + 8511f1ab-a926-44ff-a2ce-3ab7357ca855 + a3cbfacc-19dc-4648-86fb-592ad464fa90 + a5634e28-2059-4bd0-8b3b-6f3bce18f376 + b3770896-29b6-46f4-9e25-8431077ac055 + bbd12dcb-b775-4dce-86ad-cb4cf08ea078 + be7c4237-8d26-4a53-8a2f-c0400c4cb9f2 + da09cbd3-0007-457e-825a-b53654f441c6 + fc863feb-ec79-4663-8e3b-d502edbc30c4 +--- + Extrude: GetExtrusionFaceInfo: [ExtrusionFaceInfo { cap: None, curve_id: Some(4598a980-b1f3-4bd1-bdf3-66f356bff321), face_id: Some(78fb3026-5ae5-425e-95b9-37e9aa5b7fd4) }, ExtrusionFaceInfo { cap: None, curve_id: Some(791741d9-4cd8-4f13-bec4-97780e934151), face_id: Some(a5634e28-2059-4bd0-8b3b-6f3bce18f376) }, ExtrusionFaceInfo { cap: None, curve_id: Some(04a888d1-dc0e-403d-9309-dfe59023193f), face_id: Some(be7c4237-8d26-4a53-8a2f-c0400c4cb9f2) }, ExtrusionFaceInfo { cap: Bottom, curve_id: None, face_id: Some(850cbb5f-500b-4f38-8653-c068ede2f609) }, ExtrusionFaceInfo { cap: Top, curve_id: None, face_id: Some(fc863feb-ec79-4663-8e3b-d502edbc30c4) }] +ADAM: Defined KCL binding 'p' +ADAM: Extrude plane ID: 78fb3026-5ae5-425e-95b9-37e9aa5b7fd4 +ADAM: Wrote all memory from return statement as 7oBhzWT.json + Extrude: post +--- +ADAM: sketch group 5b2b0391-6dc7-49db-b325-c92c6c782174 has 2 children + 6529f575-c236-4143-b7e0-0da02684aef2 (arc-a) + 73db1d5a-b75c-4ab8-b120-7011bb2abca6 () +The actual children of the sketch group are: + 04a888d1-dc0e-403d-9309-dfe59023193f + 0c9a33b2-f704-45f3-8f28-1f79c437eb4b + 10fd7345-bad7-48d9-a0c3-83b057c9a5ab + 29717780-ee90-4ff6-a3a0-c3201f62e9b7 + 3c46e66c-e339-4231-ad15-cc144f7bad52 + 4598a980-b1f3-4bd1-bdf3-66f356bff321 + 46ea9493-f2b2-4619-bd69-954c372b64f8 + 4d2c8c60-7db5-42f5-9dff-2aade229a09c + 4fb69f7d-c218-4d8a-a957-e720135d4b2c + 56746b9a-9edb-4208-9247-08d20dea8d4a + 6529f575-c236-4143-b7e0-0da02684aef2 + 72fa057a-8ad2-40bc-8522-577eea988cf7 + 78fb3026-5ae5-425e-95b9-37e9aa5b7fd4 + 791741d9-4cd8-4f13-bec4-97780e934151 + 795ce0aa-1cef-42ae-a296-378bbcd0d0c5 + 800b2b77-ed6b-4fb3-9c99-d40b82aa9752 + 8378e037-3b90-4d93-a056-0c5c07723be3 + 850cbb5f-500b-4f38-8653-c068ede2f609 + a5634e28-2059-4bd0-8b3b-6f3bce18f376 + b0f8ab71-2006-45eb-b0c1-7623197ef88b + bbd12dcb-b775-4dce-86ad-cb4cf08ea078 + be7c4237-8d26-4a53-8a2f-c0400c4cb9f2 + da09cbd3-0007-457e-825a-b53654f441c6 + ed794d93-a245-4424-90dc-cce29512a814 + f373eaf6-7312-4f09-b0ef-701d8a2585ac + fc863feb-ec79-4663-8e3b-d502edbc30c4 + fe3e2012-a15b-4320-9d24-e069341c316c +--- + Extrude: GetExtrusionFaceInfo: [ExtrusionFaceInfo { cap: None, curve_id: Some(6529f575-c236-4143-b7e0-0da02684aef2), face_id: Some(56746b9a-9edb-4208-9247-08d20dea8d4a) }, ExtrusionFaceInfo { cap: Bottom, curve_id: None, face_id: Some(16487843-1bec-49f2-bb9b-e43c86e2269f) }, ExtrusionFaceInfo { cap: Top, curve_id: None, face_id: Some(3c46e66c-e339-4231-ad15-cc144f7bad52) }] +ADAM: Fillet API call starting +ADAM: Fillet API call done +ADAM: Defined KCL binding 'plumbus1' +ADAM: Extrude plane ID: a5634e28-2059-4bd0-8b3b-6f3bce18f376 + Extrude: post +--- +ADAM: sketch group 2eec986e-0f7f-44e6-9ace-b105d2267bdb has 2 children + f8529801-371c-43c9-a340-eccf429c2ebb (arc-b) + 57551761-5f1f-497b-9c55-ca9afc12aa41 () +The actual children of the sketch group are: + 04a888d1-dc0e-403d-9309-dfe59023193f + 0bb0beeb-e8f8-41a1-81bd-551152a2d91f + 0c9a33b2-f704-45f3-8f28-1f79c437eb4b + 10fd7345-bad7-48d9-a0c3-83b057c9a5ab + 29717780-ee90-4ff6-a3a0-c3201f62e9b7 + 2e8e62b0-85d3-4c4f-ba43-8aab54df3aba + 3c46e66c-e339-4231-ad15-cc144f7bad52 + 44f1f0f8-1857-428d-a7d3-0c9d84385f9d + 4598a980-b1f3-4bd1-bdf3-66f356bff321 + 4d2c8c60-7db5-42f5-9dff-2aade229a09c + 4da24bfa-4384-447f-8644-46bbed0e7d5d + 56746b9a-9edb-4208-9247-08d20dea8d4a + 6a7923e3-13a1-4689-aa4d-20ffbabe7b81 + 6eef60b3-7de3-49cb-abaa-e4c0c2623592 + 78fb3026-5ae5-425e-95b9-37e9aa5b7fd4 + 791741d9-4cd8-4f13-bec4-97780e934151 + 795ce0aa-1cef-42ae-a296-378bbcd0d0c5 + 812af572-94c8-4b91-8e87-718f92e4921f + 8378e037-3b90-4d93-a056-0c5c07723be3 + 84c5093f-1a93-4ea1-be0d-03bd1b071ad9 + 850cbb5f-500b-4f38-8653-c068ede2f609 + 923a9f5f-3b30-49a3-8fd0-92ed8e205de3 + 9ef44341-b2ac-40b6-9232-63c11a2db55d + a1aada1a-43db-4efc-95ce-90ac61cb1f33 + a5634e28-2059-4bd0-8b3b-6f3bce18f376 + abfa3d1f-a425-4b53-a83a-2f6b61f8e918 + b0f8ab71-2006-45eb-b0c1-7623197ef88b + bbd12dcb-b775-4dce-86ad-cb4cf08ea078 + be7c4237-8d26-4a53-8a2f-c0400c4cb9f2 + c7936576-71c7-4d3f-8da3-e4ce0a989fd9 + da09cbd3-0007-457e-825a-b53654f441c6 + e1307f2f-a845-44c7-ac40-3a99d9c4b40f + e76db8f4-8409-4117-8efb-d582b8e1157b + ed794d93-a245-4424-90dc-cce29512a814 + f7785d2a-0d90-433e-9be9-3895c5826c3f + f8529801-371c-43c9-a340-eccf429c2ebb + f896452c-f56e-4409-8baf-b852b275d8bd + fc863feb-ec79-4663-8e3b-d502edbc30c4 +--- + Extrude: GetExtrusionFaceInfo: [ExtrusionFaceInfo { cap: None, curve_id: Some(f8529801-371c-43c9-a340-eccf429c2ebb), face_id: Some(a1aada1a-43db-4efc-95ce-90ac61cb1f33) }, ExtrusionFaceInfo { cap: Bottom, curve_id: None, face_id: Some(3f7d3b2e-1cec-4ca0-ad06-68b72c4ae297) }, ExtrusionFaceInfo { cap: Top, curve_id: None, face_id: Some(84c5093f-1a93-4ea1-be0d-03bd1b071ad9) }] +ADAM: Defined KCL binding 'plumbus0' + Defined as [ExtrudePlane(ExtrudePlane { position: Position([0.0, 0.0, 0.0]), rotation: Rotation([0.0, 0.0, 0.0, 1.0]), face_id: a1aada1a-43db-4efc-95ce-90ac61cb1f33, name: "arc-b", geo_meta: GeoMeta { id: f8529801-371c-43c9-a340-eccf429c2ebb, metadata: Metadata { source_range: SourceRange([944, 970]) } } })] +ADAM: Wrote all memory from end of program as 7XrN3bX.json +test serial_test_pentagon_fillet_sugar ... ok + diff --git a/src/wasm-lib/scratch_bad b/src/wasm-lib/scratch_bad new file mode 100644 index 000000000..e072edb37 --- /dev/null +++ b/src/wasm-lib/scratch_bad @@ -0,0 +1,121 @@ + +running 1 test +ADAM: Wrote all memory from return statement as aZKZYPs.json + Extrude: post +--- +ADAM: sketch group 7c0be725-a31b-40b8-8b66-b023d3cb27ab has 3 children + ca363eb0-aab1-4b74-b916-b437cd1fea0f (a) + 845afbc9-5d7a-4558-80c7-8fbb10b49773 (b) + 3722e3b1-cf4c-43ff-a111-eea55d55d27f (c) +The actual children of the sketch group are: + 00db26e9-8dea-4002-9418-af0d6301972e + 0377700f-ed1d-4639-8c1d-824185c458a5 + 076fec0e-db1c-46b9-9e73-80233ec6aee1 + 1f0f5822-3b44-426f-833b-c32e6a6a3e07 + 2053a7e8-ac12-4d27-bae6-c4e86b863141 + 21477695-bd82-454c-8e5d-7dd7da77360c + 3722e3b1-cf4c-43ff-a111-eea55d55d27f + 4907fcb9-3559-4308-b2c8-fe29887078bd + 5fb01486-114b-406d-bb6f-334371c94029 + 68bbb147-09da-4339-8c95-1a2fd052c943 + 6d2025eb-6737-4d63-a2d5-576be59da344 + 6de9e9bf-a295-4254-89e9-31077218abe6 + 6efd2604-37e0-4c3c-8eb9-1ccfd980bdcc + 76f1465d-3422-4191-827f-01b6f52f28a3 + 78a1cc3b-106f-484e-9bd3-94e2196f4211 + 845afbc9-5d7a-4558-80c7-8fbb10b49773 + a7a4bbb7-615d-47bf-b653-26f3c5d13996 + a7f12a71-a4e3-48ce-ac25-ea4c75e464d0 + a880285e-be7b-445e-89ee-af5cd947b15c + ca363eb0-aab1-4b74-b916-b437cd1fea0f +--- + Extrude: GetExtrusionFaceInfo: [ExtrusionFaceInfo { cap: None, curve_id: Some(ca363eb0-aab1-4b74-b916-b437cd1fea0f), face_id: Some(1f0f5822-3b44-426f-833b-c32e6a6a3e07) }, ExtrusionFaceInfo { cap: None, curve_id: Some(845afbc9-5d7a-4558-80c7-8fbb10b49773), face_id: Some(5fb01486-114b-406d-bb6f-334371c94029) }, ExtrusionFaceInfo { cap: None, curve_id: Some(3722e3b1-cf4c-43ff-a111-eea55d55d27f), face_id: Some(00db26e9-8dea-4002-9418-af0d6301972e) }, ExtrusionFaceInfo { cap: Bottom, curve_id: None, face_id: Some(0377700f-ed1d-4639-8c1d-824185c458a5) }, ExtrusionFaceInfo { cap: Top, curve_id: None, face_id: Some(a880285e-be7b-445e-89ee-af5cd947b15c) }] +ADAM: Defined KCL binding 'p' +ADAM: Extrude plane ID: 1f0f5822-3b44-426f-833b-c32e6a6a3e07 +ADAM: Wrote all memory from return statement as gU3lRnz.json + Extrude: post +--- +ADAM: sketch group ab116323-912f-43a4-b554-bd678184daf7 has 2 children + 8d33d671-f62a-48e9-8a7b-3999dd490b8a (arc-a) + 064a3833-2078-42bd-995b-53ce76eaebbc () +The actual children of the sketch group are: + 00db26e9-8dea-4002-9418-af0d6301972e + 0377700f-ed1d-4639-8c1d-824185c458a5 + 16e483e8-4ff3-410d-9bd7-69146445d33b + 1f0f5822-3b44-426f-833b-c32e6a6a3e07 + 3119c97d-9402-465b-8498-63a3c63ddb77 + 3722e3b1-cf4c-43ff-a111-eea55d55d27f + 44897268-989e-4a8e-bf16-95ebc8cc8bcf + 4aa88212-2547-454a-b808-c5c4843984fa + 4b3348c4-7ca3-48ef-a72e-3cb5abb3e96c + 50308e7f-842b-4f42-92b5-84c021119b29 + 5e1d9d85-264d-4ced-89c3-8fb8814a6770 + 5ea4db78-de30-464f-9a72-88c6df8b3b91 + 5fb01486-114b-406d-bb6f-334371c94029 + 6d2025eb-6737-4d63-a2d5-576be59da344 + 76f1465d-3422-4191-827f-01b6f52f28a3 + 77dece61-a530-41d3-9d0f-b3581a149f31 + 7a2be40f-be2e-4ab7-bd45-cc29464a2ed4 + 845afbc9-5d7a-4558-80c7-8fbb10b49773 + 8d33d671-f62a-48e9-8a7b-3999dd490b8a + a7a4bbb7-615d-47bf-b653-26f3c5d13996 + a880285e-be7b-445e-89ee-af5cd947b15c + b58431e9-16e4-4670-8570-5dcfee8b2dc4 + ca363eb0-aab1-4b74-b916-b437cd1fea0f + cb79f8cf-6c71-4d5d-aee0-d4ea8d2a3773 + cc7dbe63-3209-4172-adea-2936bdbc6001 + f2561d8c-9812-4cc0-a31a-0897328e0d76 + f4e07911-0c0c-49da-af1a-144ebdca0baa +--- + Extrude: GetExtrusionFaceInfo: [ExtrusionFaceInfo { cap: None, curve_id: Some(8d33d671-f62a-48e9-8a7b-3999dd490b8a), face_id: Some(7a2be40f-be2e-4ab7-bd45-cc29464a2ed4) }, ExtrusionFaceInfo { cap: Bottom, curve_id: None, face_id: Some(363074f6-6288-4b30-a8f9-eb2ec8205421) }, ExtrusionFaceInfo { cap: Top, curve_id: None, face_id: Some(4aa88212-2547-454a-b808-c5c4843984fa) }] +ADAM: Fillet API call starting +ADAM: Fillet API call done +ADAM: Defined KCL binding 'plumbus1' +ADAM: Extrude plane ID: 5fb01486-114b-406d-bb6f-334371c94029 +ADAM: Wrote all memory from return statement as 27WzMO2.json + Extrude: post +--- +ADAM: sketch group 4bfbedd8-ea4d-4e7f-87b7-3314f0dc53d7 has 2 children + 3e3e9738-c085-4385-9829-a3f0ccba3728 (arc-b) + a450bfc5-4b91-4aeb-a911-b19951188994 () +The actual children of the sketch group are: + 00db26e9-8dea-4002-9418-af0d6301972e + 0377700f-ed1d-4639-8c1d-824185c458a5 + 0fc417c1-c389-47d9-8a80-7c5c7df6231f + 1f0f5822-3b44-426f-833b-c32e6a6a3e07 + 23e584a7-db4d-4c03-bfd8-00392c8aa5d4 + 3722e3b1-cf4c-43ff-a111-eea55d55d27f + 48baed44-58ba-4bb6-98ba-f7cf74c48630 + 4aa88212-2547-454a-b808-c5c4843984fa + 4b3348c4-7ca3-48ef-a72e-3cb5abb3e96c + 50308e7f-842b-4f42-92b5-84c021119b29 + 540063e9-1322-472f-aa59-644e882fa119 + 5e1d9d85-264d-4ced-89c3-8fb8814a6770 + 5fb01486-114b-406d-bb6f-334371c94029 + 6d2025eb-6737-4d63-a2d5-576be59da344 + 74d71d4f-86ef-484f-8dfc-d94a61e7c4b3 + 76f1465d-3422-4191-827f-01b6f52f28a3 + 7915460b-4ab3-489e-9295-135d460bc7f9 + 7a2be40f-be2e-4ab7-bd45-cc29464a2ed4 + 845afbc9-5d7a-4558-80c7-8fbb10b49773 + 8d608b9f-9654-4f24-916e-9ad6e8df4521 + 980ef1c6-f714-48cd-a8b0-f90aa0417978 + a7a4bbb7-615d-47bf-b653-26f3c5d13996 + a880285e-be7b-445e-89ee-af5cd947b15c + aead6db0-6ec2-474b-ae7d-103eeecf2e46 + b5519f73-1bee-4067-b81b-f75b25aec83a + c6770aed-a074-4a82-b6c3-348d650a7ab5 + ca363eb0-aab1-4b74-b916-b437cd1fea0f + cb79f8cf-6c71-4d5d-aee0-d4ea8d2a3773 + cc7dbe63-3209-4172-adea-2936bdbc6001 + f2561d8c-9812-4cc0-a31a-0897328e0d76 + f4e07911-0c0c-49da-af1a-144ebdca0baa +--- + Extrude: GetExtrusionFaceInfo: [] +ADAM: Defined KCL binding 'plumbus0' + Defined as [] +ADAM: Wrote all memory from end of program as DeP9fPn.json +test serial_test_pentagon_fillet_sugar ... ok + +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 94 filtered out; finished in 3.06s + diff --git a/src/wasm-lib/t6ROUGO.json b/src/wasm-lib/t6ROUGO.json new file mode 100644 index 000000000..d357e2b5a --- /dev/null +++ b/src/wasm-lib/t6ROUGO.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "76be30d8-5433-4339-b9c0-6086ad84544b", + "name": "a", + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e64f1823-35e1-4002-829a-cea247e0cddd", + "name": "b", + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f52a80eb-a07d-4c87-9f9f-a3073780fd81", + "name": "c", + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1d914bd9-4eea-408b-a4c8-288f52e73335", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "381b19da-b723-4062-a121-84be52b16bfd", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "689a0d76-ce62-447c-b5f3-dc6608ab9ff7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "4946fb29-4aaa-487b-87f3-1e6fdcd0ce0f", + "endCapId": "c4e8495f-8a1f-4c80-976f-e573dc8ae74b", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "8661be57-b393-4ceb-969b-e5d8c2f21c04", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "956e0e33-ae0b-4ffa-a786-ed6bed96fdc8", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "3be69801-19c0-4df0-877d-3105e2e14f59", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "1089a66d-3542-4340-b4bd-6d5ff34f18ad", + "value": "a", + "sketchGroupId": "24b0d9d3-12b0-4196-9029-4c1722802d9f", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "76be30d8-5433-4339-b9c0-6086ad84544b", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "27eda07a-add0-4dfd-bc63-ffdd9d8b5cc9", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "1089a66d-3542-4340-b4bd-6d5ff34f18ad", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/tests/executor/inputs/pentagon_fillet_sugar.kcl b/src/wasm-lib/tests/executor/inputs/pentagon_fillet_sugar.kcl index 623c60de2..9c118ba80 100644 --- a/src/wasm-lib/tests/executor/inputs/pentagon_fillet_sugar.kcl +++ b/src/wasm-lib/tests/executor/inputs/pentagon_fillet_sugar.kcl @@ -1,46 +1,57 @@ -fn make_circle = (face, tag, pos, radius) => { - const sg = startSketchOn(face, tag) - |> startProfileAt([pos[0] + radius, pos[1]], %) - |> arc({ - angle_end: 360, - angle_start: 0, - radius: radius - }, %, 'arc-' + tag) - |> close(%) - - return sg -} - -fn pentagon = (len) => { - const sg = startSketchOn('XY') +fn triangle = (len) => { + return startSketchOn('XY') |> startProfileAt([-len / 2, -len / 2], %) |> angledLine({ angle: 0, length: len }, %, 'a') |> angledLine({ - angle: segAng('a', %) + 180 - 108, + angle: segAng('a', %) + 120, length: len }, %, 'b') |> angledLine({ - angle: segAng('b', %) + 180 - 108, + angle: segAng('b', %) + 120, length: len }, %, 'c') - |> angledLine({ - angle: segAng('c', %) + 180 - 108, - length: len - }, %, 'd') - |> angledLine({ - angle: segAng('d', %) + 180 - 108, - length: len - }, %) - - return sg } -const p = pentagon(48) - |> extrude(30, %) +let triangleHeight = 200 +let lenPlumbus = 100 +let circlePos = [0, triangleHeight/2] +let radius = 80 +let circ = {angle_start: 0, angle_end: 360, radius: radius} -const plumbus0 = make_circle(p, 'a', [0, 0], 9) - |> extrude(18, %) +const p = triangle(500) + |> extrude(triangleHeight, %) + +fn circl = (tag) => { +return startSketchOn(p, tag) + |> startProfileAt([circlePos[0] + radius, circlePos[1]], %) + |> arc(circ, %, 'arc-' + tag) + |> close(%) +} + +const plumbus1 = + circl('a') + |> extrude(lenPlumbus, %) |> fillet({ - radius: 0.5, - tags: ['arc-a', getOppositeEdge('arc-a', %)] + radius: 5, + tags: ['arc-a'] }, %) + +const plumbus0 = +startSketchOn(p, 'b') + |> startProfileAt([circlePos[0] + radius, circlePos[1]], %) + |> arc(circ, %, 'arc-' + 'b') + |> close(%) + |> extrude(lenPlumbus, %) + // |> fillet({ + // radius: 5, + // tags: ['arc-b'] + // }, %) + +// const plumbus0 = +// circl('b') +// |> extrude(lenPlumbus, %) +// // |> fillet({ +// // radius: 5, +// // tags: ['arc-b'] +// // }, %) + diff --git a/src/wasm-lib/tests/executor/outputs/pentagon_fillet_sugar.png b/src/wasm-lib/tests/executor/outputs/pentagon_fillet_sugar.png index 297821f17..074d2fb9e 100644 Binary files a/src/wasm-lib/tests/executor/outputs/pentagon_fillet_sugar.png and b/src/wasm-lib/tests/executor/outputs/pentagon_fillet_sugar.png differ diff --git a/src/wasm-lib/txjtJVV.json b/src/wasm-lib/txjtJVV.json new file mode 100644 index 000000000..72dd00647 --- /dev/null +++ b/src/wasm-lib/txjtJVV.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "18c98e66-fdcd-4b0f-9d32-6e103537c94b", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "ff28b371-b6e7-4b49-9fd0-1eb09c3db671", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "b01c9b15-cfc8-4fd6-862b-6ea02f751fe3", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "e6535f04-7a56-418e-b41c-07cc102dddf5", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "54c582c1-0d36-445c-83d7-238ef2fd9d06", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "4bcb6113-5a4b-4c32-984f-8dc12eb02f4e", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "54c582c1-0d36-445c-83d7-238ef2fd9d06", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/uVST5eY.json b/src/wasm-lib/uVST5eY.json new file mode 100644 index 000000000..523fa2f01 --- /dev/null +++ b/src/wasm-lib/uVST5eY.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ad6266c1-1b9e-46ea-82d7-2460ec427bd3", + "name": "a", + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ae8b8199-fde0-4185-b3e5-40fd67b0a9f6", + "name": "b", + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "525a8614-1d3e-4a4c-a498-4f9e41861e60", + "name": "c", + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "fe8fe422-efc8-44cf-b7d1-ac7001c8f0ee", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "54c40e3b-72cd-4ce1-ae66-d8a9ac7af37d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ef967909-83a8-476b-a00e-90b3453ac949", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "5ac7c534-d331-4865-b21d-6c131e5cbed8", + "endCapId": "33888a1d-ce60-422a-b948-60c40323b5dc", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "a4668dc4-8d32-4295-9568-982e1a27748b", + "name": "arc-a", + "id": "29202001-2750-4a41-8d59-cca41f9b0a66", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "29202001-2750-4a41-8d59-cca41f9b0a66", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "99e286ad-dcb5-4464-9b52-69195ea3b59b", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "66db131a-48cc-4ceb-a98c-af6a0bc263d7", + "endCapId": "12e74ce7-cb1a-474f-9af2-68d9e1155f19", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "6e8467da-b0e8-495b-934d-7779dc894cdd", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "ba30993e-8c28-4acf-bd7d-67e952c4fb5b", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "54f2e1c8-11b0-4119-a036-a26584b93f2f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "34ca17bd-f002-498a-a3fd-48a883ae3d34", + "value": "b", + "sketchGroupId": "40a483b5-4371-40f4-a251-7cbf4ed6da11", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "ae8b8199-fde0-4185-b3e5-40fd67b0a9f6", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "040d07f5-dc51-4a15-80b5-d6dd7f1348c9", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "34ca17bd-f002-498a-a3fd-48a883ae3d34", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/vECgRe1.json b/src/wasm-lib/vECgRe1.json new file mode 100644 index 000000000..b0cfed59f --- /dev/null +++ b/src/wasm-lib/vECgRe1.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "960e1f65-772e-4cce-94fd-353c788ffced", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "e5c679b9-7375-4ed2-858c-d672102434e6", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "42b76f8d-7945-4d7a-9079-8f1486610506", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ad778377-350c-4ca4-a825-a15f59c2457e", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "b9186f3a-7460-442b-9489-ad073501febe", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "3d65b6c5-a9d2-4912-82a7-fa6a71585ef1", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "b9186f3a-7460-442b-9489-ad073501febe", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/vQ0bTr4.json b/src/wasm-lib/vQ0bTr4.json new file mode 100644 index 000000000..a13dcba29 --- /dev/null +++ b/src/wasm-lib/vQ0bTr4.json @@ -0,0 +1,1110 @@ +{ + "root": { + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "8620785e-d7c8-4a56-b1c3-d7fcc548b3f5", + "name": "a", + "id": "79f2be94-5c00-4a25-9fa2-b0bd148072f0", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "1041bf84-13ac-408a-980b-804079245424", + "name": "b", + "id": "a19865aa-8cf1-487b-a2d2-8861c4054ce4", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3a5fe23d-ed30-4cdd-8e1b-2c164d8e9d9e", + "name": "c", + "id": "ff20a1f3-3535-482b-9fdc-42a01e7e009a", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "79f2be94-5c00-4a25-9fa2-b0bd148072f0", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a19865aa-8cf1-487b-a2d2-8861c4054ce4", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "ff20a1f3-3535-482b-9fdc-42a01e7e009a", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "3af801f5-3210-4b5f-9de6-a78396e9a356", + "endCapId": "24be9158-6197-43f5-a044-02f37efc39f3", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "12c8ec20-cb89-4533-a568-2ed37341c99b", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "8f152667-eca7-412a-931b-f3c6fdfabab2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "10608604-1727-4b57-982a-6bf0cb3c9e40", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "f875ea71-1fb5-4d36-9f5f-ed4f4f34bab1", + "value": "a", + "sketchGroupId": "fcc9bc62-03fa-4d51-aa8b-2be5e83440f7", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "8620785e-d7c8-4a56-b1c3-d7fcc548b3f5", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "fa5918ab-4fb0-4caf-bad7-eb1263c173b4", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "f875ea71-1fb5-4d36-9f5f-ed4f4f34bab1", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/vZPIuIb.json b/src/wasm-lib/vZPIuIb.json new file mode 100644 index 000000000..fbb5355b7 --- /dev/null +++ b/src/wasm-lib/vZPIuIb.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ec5b871b-046e-4029-8f2b-3d423704fcd7", + "name": "a", + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "36a88a8c-06e3-4d5d-af03-42f3675198c4", + "name": "b", + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e0a07e07-6dd1-47c6-ba1e-ac91439d64af", + "name": "c", + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f8285c0f-6c29-44d2-a981-136f7b5a8767", + "endCapId": "cbb2412b-19ef-4dc2-9a04-112cb9af6392", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "40a4d8cb-2be6-4dca-8a18-6e39d8271aeb", + "name": "arc-a", + "id": "55ac46e9-3e03-41cf-be21-b2334a512776", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "55ac46e9-3e03-41cf-be21-b2334a512776", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6586ea7b-fb91-465d-9bc9-3edbaeb3171e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e27ff354-9107-4fa9-9a63-9d30763ec9b9", + "endCapId": "f6a948e8-8db6-4410-b38a-03850f5798be", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "fdb40361-f80a-4b09-aa45-d20aeeb765cd", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "a5ed6b12-7f47-4ed5-a099-e9ec66f8a5f0", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "26c5cf0e-41db-44c7-b921-210057a29a75", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "0631c46b-6761-4ab9-bb44-c681c710dde9", + "value": "b", + "sketchGroupId": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "36a88a8c-06e3-4d5d-af03-42f3675198c4", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e80d146a-91bf-46ca-bbf1-cbc7853031a0", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "0631c46b-6761-4ab9-bb44-c681c710dde9", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/vcvAWJW.json b/src/wasm-lib/vcvAWJW.json new file mode 100644 index 000000000..5ed05898d --- /dev/null +++ b/src/wasm-lib/vcvAWJW.json @@ -0,0 +1,1180 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "ec5b871b-046e-4029-8f2b-3d423704fcd7", + "name": "a", + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "36a88a8c-06e3-4d5d-af03-42f3675198c4", + "name": "b", + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e0a07e07-6dd1-47c6-ba1e-ac91439d64af", + "name": "c", + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "bcd1fe9f-63d3-469d-8460-9344dacb67f3", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "eee9e475-dfc3-44dd-9bf6-cf40b2ea18b8", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "67da5ec0-9774-43e8-bd8b-00b7e2814dd7", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "f8285c0f-6c29-44d2-a981-136f7b5a8767", + "endCapId": "cbb2412b-19ef-4dc2-9a04-112cb9af6392", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "6bd99f5d-5dd9-47ca-adee-b3df9e11cb52", + "name": "arc-b", + "id": "a5ed6b12-7f47-4ed5-a099-e9ec66f8a5f0", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "a5ed6b12-7f47-4ed5-a099-e9ec66f8a5f0", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "26c5cf0e-41db-44c7-b921-210057a29a75", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "5f8bdf8d-49c4-4b2b-96ef-a27ee2a6e4a0", + "endCapId": "ccac3899-51a7-4de8-8d40-4b67e8517002", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "1dd5cde1-3429-4f9b-a268-825b5193c192", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "40a4d8cb-2be6-4dca-8a18-6e39d8271aeb", + "name": "arc-a", + "id": "55ac46e9-3e03-41cf-be21-b2334a512776", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "55ac46e9-3e03-41cf-be21-b2334a512776", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6586ea7b-fb91-465d-9bc9-3edbaeb3171e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e27ff354-9107-4fa9-9a63-9d30763ec9b9", + "endCapId": "f6a948e8-8db6-4410-b38a-03850f5798be", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/wBzOcFX.json b/src/wasm-lib/wBzOcFX.json new file mode 100644 index 000000000..517e6f213 --- /dev/null +++ b/src/wasm-lib/wBzOcFX.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "4c35ee4f-1c22-4ab5-9b68-f49f9967e207", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "f8da1b98-77b1-4765-a093-3714688be259", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "9cf2152f-fd53-4bd8-a984-5262bc802993", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "6eb3b4ea-02b4-4e79-a052-321432993657", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "2a95eb03-16b8-49d7-955c-b5288445fd25", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "22b30e82-18fb-46d3-9809-7dd73b245bf9", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "2a95eb03-16b8-49d7-955c-b5288445fd25", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/whJ6QFE.json b/src/wasm-lib/whJ6QFE.json new file mode 100644 index 000000000..5610565c1 --- /dev/null +++ b/src/wasm-lib/whJ6QFE.json @@ -0,0 +1,1185 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 721, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 721, + "body": [ + { + "type": "VariableDeclaration", + "type": "VariableDeclaration", + "start": 571, + "end": 708, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 575, + "end": 708, + "id": { + "type": "Identifier", + "start": 575, + "end": 576, + "name": "x" + }, + "init": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 579, + "end": 708, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 579, + "end": 600, + "callee": { + "type": "Identifier", + "start": 579, + "end": 592, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 593, + "end": 594, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 596, + "end": 599, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 606, + "end": 662, + "callee": { + "type": "Identifier", + "start": 606, + "end": 620, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 621, + "end": 658, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 622, + "end": 643, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 622, + "end": 634, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 622, + "end": 631, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 632, + "end": 633, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 637, + "end": 643, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 645, + "end": 657, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 645, + "end": 654, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 655, + "end": 656, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 660, + "end": 661 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 668, + "end": 694, + "callee": { + "type": "Identifier", + "start": 668, + "end": 671, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 672, + "end": 676, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 678, + "end": 679 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 681, + "end": 693, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 681, + "end": 687, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 690, + "end": 693, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 700, + "end": 708, + "callee": { + "type": "Identifier", + "start": 700, + "end": 705, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 706, + "end": 707 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "kind": "let" + }, + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 711, + "end": 719, + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 718, + "end": 719, + "name": "x" + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 721 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "74d9bf69-036c-4793-b346-6100f2ae11ee", + "name": "a", + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "85730386-c1d8-48ac-ac7b-f38ddd8c5975", + "name": "b", + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "d54b7cba-0467-47a6-8a23-a0c39a0647dc", + "name": "c", + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "1764fda8-3d3a-4379-a2d7-8534d60120b8", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "baa67185-fa57-4305-8693-1280f7b092b2", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "482af3f7-c296-4f40-b7ae-3b56e0f2d631", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "0c336890-7751-42a7-a1a6-8b9b59cda307", + "endCapId": "13d4f026-7734-4d7e-ab77-84ca43b0c483", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus0": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "98812262-fc34-438c-a651-68134a0d8799", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "0852fe24-e8ba-40c5-aacc-6f9144832a76", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "afcd2cdf-8d34-40df-b8c6-c9ca436a9903", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "e3107ff3-d5cc-4bdc-bd74-e6a7deba3c25", + "name": "arc-a", + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "92666aa0-8931-4ae4-819d-ba1eacffd8c0", + "sourceRange": [ + 668, + 694 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7c6e7935-9b6b-49b0-8b75-fd1e0b42765e", + "sourceRange": [ + 700, + 708 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "6af1a178-13cd-4cbb-a387-353ebd2e940a", + "endCapId": "5a276f5d-6f3c-4f0d-a3e2-bcea0851960a", + "__meta": [ + { + "sourceRange": [ + 606, + 662 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": null +} \ No newline at end of file diff --git a/src/wasm-lib/wz7t630.json b/src/wasm-lib/wz7t630.json new file mode 100644 index 000000000..a9e74d2ca --- /dev/null +++ b/src/wasm-lib/wz7t630.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "0fd1dec6-c8fc-4ebf-9ffa-c4649b8c0e5b", + "name": "a", + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3154046e-49b1-4373-aa28-a63ffff42c53", + "name": "b", + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "f4e8fe98-8348-4ca6-bdf0-a376e4f9ad47", + "name": "c", + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2519e4e2-9cb1-427d-922f-d2255cb3349b", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0dbe5e26-033f-4ba7-89d1-7c5b3e914cb1", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "22e3f137-784b-49ac-b636-8c9b3c795af3", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "2cfb30cb-aee9-489e-ad70-c48fec1417b7", + "endCapId": "1cea57e1-e7d6-4fd9-9bea-e9a4e840203e", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "2b9b68d7-7279-4734-8275-931f5ec54805", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "949cf00b-1fe6-4fd2-8261-322640bd41da", + "name": "arc-a", + "id": "800d8975-bb2a-49ac-a71b-971b88a5b204", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "800d8975-bb2a-49ac-a71b-971b88a5b204", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "655b3cdb-fb80-4fb3-977a-979098fd3b4f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "89662d9d-8897-4062-a80d-f6e7dac71adc", + "endCapId": "bc9b5060-fb58-439c-b484-2549c9c8d8b4", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "ffe500fb-80e0-400b-aae4-64db2b2926e0", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "20f32bb5-55f7-45e5-b091-d892edf5f8cb", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1901692f-f1fe-43f7-8875-758eefa676c1", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "d2e948e4-8deb-47b6-b129-22e10206a959", + "value": "b", + "sketchGroupId": "2b9b68d7-7279-4734-8275-931f5ec54805", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "3154046e-49b1-4373-aa28-a63ffff42c53", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "96bff519-6988-485c-bbea-4fa96e211441", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "d2e948e4-8deb-47b6-b129-22e10206a959", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/yFIqQiX.json b/src/wasm-lib/yFIqQiX.json new file mode 100644 index 000000000..1c2242b74 --- /dev/null +++ b/src/wasm-lib/yFIqQiX.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "675d0ae0-de6d-4999-923e-5a9750f7092c", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "6296932b-748f-4fe7-bddf-71aea7522a1f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "ceb9bc26-8ce0-487c-9d06-522a7093c62f", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "c2835549-c0a8-40e8-842c-1acdf33775c2", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "f7f982ab-c78d-4d93-b67f-da8371b6ca1d", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "3f5cc327-3201-4694-9072-7de75edffd8d", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "f7f982ab-c78d-4d93-b67f-da8371b6ca1d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/yQoTGF5.json b/src/wasm-lib/yQoTGF5.json new file mode 100644 index 000000000..96d0c4f9f --- /dev/null +++ b/src/wasm-lib/yQoTGF5.json @@ -0,0 +1,716 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "len": { + "type": "UserVal", + "type": "UserVal", + "value": 500, + "__meta": [ + { + "sourceRange": [ + 511, + 514 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "3c1c1695-9661-402f-a7d6-3b06849f9eb9", + "value": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "b99366da-efe0-4812-b503-10af34df0c2f", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "4a90731e-d7db-4834-9457-ec54abefd66d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "d5803e62-b5ea-4ce1-98e0-1c53d4a90d61", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "on": { + "type": "plane", + "id": "7a371051-0f5a-4617-96a8-b1cdbda3a71e", + "value": "XY", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "__meta": [] + }, + "start": { + "from": [ + -250.0, + -250.0 + ], + "to": [ + -250.0, + -250.0 + ], + "name": "", + "__geoMeta": { + "id": "93427537-23b2-45f2-bd60-37a24b25ea84", + "sourceRange": [ + 59, + 98 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "7a371051-0f5a-4617-96a8-b1cdbda3a71e", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/yYR1Pzw.json b/src/wasm-lib/yYR1Pzw.json new file mode 100644 index 000000000..56ae3d23d --- /dev/null +++ b/src/wasm-lib/yYR1Pzw.json @@ -0,0 +1,1215 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7a60b404-772f-4e48-94b5-dfff2f9f3fe3", + "name": "a", + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "2da95170-f962-4eaf-85b8-cb8b355c419a", + "name": "b", + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "7442bd43-3f11-4502-bcd1-bb442d9cc0d8", + "name": "c", + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "3a4c83ea-91a0-4229-8d14-92ebedbabf4a", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "a0197f7f-626e-4e9a-a115-aca7f286745d", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "55897ece-9ada-4f7b-bf45-62c2a5062248", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "497388b4-03ad-436a-be49-680dccdbd81b", + "endCapId": "b11ba6f3-5a68-4797-bef8-e91461cae3de", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "968a10a7-5dfd-4bc3-981a-5f5cc5b6236c", + "name": "arc-a", + "id": "9929b3b6-e9ec-441a-af1f-95ffdfdc48e2", + "sourceRange": [ + 667, + 693 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "9929b3b6-e9ec-441a-af1f-95ffdfdc48e2", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "1c76d600-e9ac-4eba-8716-5d3773adbd6d", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "e4df5daf-164f-4d3e-a08b-1abee084f40f", + "endCapId": "af96166d-cd31-4e02-962b-9dbc20690751", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 1148, + 1151 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "e806d179-f314-4fda-9a01-4e0f3484db56", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "d2d964cd-d4cc-49bd-a461-8156a32ca3db", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "20dd28a6-1027-4a07-8c2f-4beb2a046c65", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "5b4c9769-5dc2-4f93-9b3c-30a560db37af", + "value": "b", + "sketchGroupId": "de8ee0fc-d3b6-4ffc-8423-64c59e05b261", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "2da95170-f962-4eaf-85b8-cb8b355c419a", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "2a877fee-a888-4a16-95e2-1f0bbf6c8e7b", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "5b4c9769-5dc2-4f93-9b3c-30a560db37af", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/yes_fillet.json b/src/wasm-lib/yes_fillet.json new file mode 100644 index 000000000..878723606 --- /dev/null +++ b/src/wasm-lib/yes_fillet.json @@ -0,0 +1,1110 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "daf4845e-3f6d-436a-84a5-873e200858e9", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "b5669359-88e3-4aac-a9ec-f84d0bf4372c", + "name": "a", + "id": "508155c6-2c82-4f8f-8586-6a2aaa5e668c", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "bcae2fee-21f2-434b-922d-615f247cb6ca", + "name": "b", + "id": "565695a6-b471-4f92-8918-8ee7c90a6978", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "c2bd900d-564e-47d0-9f17-d7d4787557aa", + "name": "c", + "id": "52652e26-1a84-4d7b-a886-78ee804396bd", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "508155c6-2c82-4f8f-8586-6a2aaa5e668c", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "565695a6-b471-4f92-8918-8ee7c90a6978", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "52652e26-1a84-4d7b-a886-78ee804396bd", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "72f0d5d8-59c3-4137-abdc-95a1afd027f7", + "endCapId": "e510af33-fbf9-4447-ac6a-d9493367f1f6", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "a", + "__meta": [ + { + "sourceRange": [ + 737, + 740 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "d5d53e97-0c2d-4bfe-b22a-06f9f64662e4", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "7f2e4330-766b-4756-87fe-599c0d1c7ca4", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "e8b2d6ea-f834-4267-ae4b-e65baad19fab", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "404be519-c9d7-43b3-9cb6-d06e1326743a", + "value": "a", + "sketchGroupId": "daf4845e-3f6d-436a-84a5-873e200858e9", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "b5669359-88e3-4aac-a9ec-f84d0bf4372c", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "6d3ec850-e542-4eef-b4de-ca7188a8dcce", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "404be519-c9d7-43b3-9cb6-d06e1326743a", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file diff --git a/src/wasm-lib/yqwtGsh.json b/src/wasm-lib/yqwtGsh.json new file mode 100644 index 000000000..fab6106e5 --- /dev/null +++ b/src/wasm-lib/yqwtGsh.json @@ -0,0 +1,1193 @@ +{ + "root": { + "HALF_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 180, + "__meta": [] + }, + "QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 90, + "__meta": [] + }, + "THREE_QUARTER_TURN": { + "type": "UserVal", + "type": "UserVal", + "value": 270, + "__meta": [] + }, + "ZERO": { + "type": "UserVal", + "type": "UserVal", + "value": 0, + "__meta": [] + }, + "circ": { + "type": "UserVal", + "type": "UserVal", + "value": { + "angle_start": 0, + "angle_end": 360, + "radius": 80 + }, + "__meta": [ + { + "sourceRange": [ + 442, + 490 + ] + } + ] + }, + "circl": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 560, + "end": 709, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 561, + "end": 564, + "name": "tag" + }, + "optional": false + } + ], + "body": { + "start": 569, + "end": 709, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 571, + "end": 707, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 578, + "end": 707, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 578, + "end": 599, + "callee": { + "type": "Identifier", + "start": 578, + "end": 591, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 592, + "end": 593, + "name": "p" + }, + { + "type": "Identifier", + "type": "Identifier", + "start": 595, + "end": 598, + "name": "tag" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 605, + "end": 661, + "callee": { + "type": "Identifier", + "start": 605, + "end": 619, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 620, + "end": 657, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 621, + "end": 642, + "operator": "+", + "left": { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 621, + "end": 633, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 621, + "end": 630, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 631, + "end": 632, + "value": 0, + "raw": "0" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 636, + "end": 642, + "name": "radius" + } + }, + { + "type": "MemberExpression", + "type": "MemberExpression", + "start": 644, + "end": 656, + "object": { + "type": "Identifier", + "type": "Identifier", + "start": 644, + "end": 653, + "name": "circlePos" + }, + "property": { + "type": "Literal", + "type": "Literal", + "start": 654, + "end": 655, + "value": 1, + "raw": "1" + }, + "computed": false + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 659, + "end": 660 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 667, + "end": 693, + "callee": { + "type": "Identifier", + "start": 667, + "end": 670, + "name": "arc" + }, + "arguments": [ + { + "type": "Identifier", + "type": "Identifier", + "start": 671, + "end": 675, + "name": "circ" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 677, + "end": 678 + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 680, + "end": 692, + "operator": "+", + "left": { + "type": "Literal", + "type": "Literal", + "start": 680, + "end": 686, + "value": "arc-", + "raw": "'arc-'" + }, + "right": { + "type": "Identifier", + "type": "Identifier", + "start": 689, + "end": 692, + "name": "tag" + } + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 699, + "end": 707, + "callee": { + "type": "Identifier", + "start": 699, + "end": 704, + "name": "close" + }, + "arguments": [ + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 705, + "end": 706 + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 560, + 709 + ] + } + ] + }, + "circlePos": { + "type": "UserVal", + "type": "UserVal", + "value": [ + 0, + 100.0 + ], + "__meta": [ + { + "sourceRange": [ + 393, + 414 + ] + } + ] + }, + "lenPlumbus": { + "type": "UserVal", + "type": "UserVal", + "value": 100, + "__meta": [ + { + "sourceRange": [ + 373, + 376 + ] + } + ] + }, + "p": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [ + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "3b5d4967-149a-4078-a3f9-05f4229dc2ba", + "name": "a", + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "889a5175-71f3-4720-a44d-58fad43d08e6", + "name": "b", + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + }, + { + "type": "extrudePlane", + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "faceId": "9e35f842-b31f-4826-99d3-b6e2d4a8b2a3", + "name": "c", + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + ], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + -250.0, + -250.0 + ], + "to": [ + 250.0, + -250.0 + ], + "name": "a", + "__geoMeta": { + "id": "2b827fa6-d85c-4afd-bb06-28eba24ebbd9", + "sourceRange": [ + 104, + 149 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 250.0, + -250.0 + ], + "to": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "name": "b", + "__geoMeta": { + "id": "0b1e413e-2649-474b-84d2-583c034a4553", + "sourceRange": [ + 155, + 238 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 8.526512829121202e-14, + 183.01270189221935 + ], + "to": [ + -250.00000000000014, + -249.99999999999983 + ], + "name": "c", + "__geoMeta": { + "id": "21957bb5-e2a2-48fb-a6ac-7d3e424d2d0f", + "sourceRange": [ + 244, + 327 + ] + } + } + ], + "height": 200.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": "41cc6138-f366-42df-b2bf-17ca86dc6675", + "endCapId": "2a99ff0a-445d-4f2b-874c-2d95b7c81e5d", + "__meta": [ + { + "sourceRange": [ + 59, + 98 + ] + } + ] + }, + "plumbus1": { + "type": "ExtrudeGroup", + "type": "ExtrudeGroup", + "id": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "value": [], + "sketchGroupValues": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-a", + "__geoMeta": { + "id": "aefea688-e084-4db2-84f1-6e4a979d123d", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "7f6f687f-4959-4417-b5f2-f3167a5a448f", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "height": 100.0, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "startCapId": null, + "endCapId": null, + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + }, + "radius": { + "type": "UserVal", + "type": "UserVal", + "value": 80, + "__meta": [ + { + "sourceRange": [ + 428, + 430 + ] + } + ] + }, + "tag": { + "type": "UserVal", + "type": "UserVal", + "value": "b", + "__meta": [ + { + "sourceRange": [ + 863, + 866 + ] + } + ] + }, + "triangle": { + "type": "Function", + "expression": { + "type": "FunctionExpression", + "start": 14, + "end": 329, + "params": [ + { + "type": "Parameter", + "identifier": { + "type": "Identifier", + "start": 15, + "end": 18, + "name": "len" + }, + "optional": false + } + ], + "body": { + "start": 23, + "end": 329, + "body": [ + { + "type": "ReturnStatement", + "type": "ReturnStatement", + "start": 27, + "end": 327, + "argument": { + "type": "PipeExpression", + "type": "PipeExpression", + "start": 34, + "end": 327, + "body": [ + { + "type": "CallExpression", + "type": "CallExpression", + "start": 34, + "end": 53, + "callee": { + "type": "Identifier", + "start": 34, + "end": 47, + "name": "startSketchOn" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 48, + "end": 52, + "value": "XY", + "raw": "'XY'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 59, + "end": 98, + "callee": { + "type": "Identifier", + "start": 59, + "end": 73, + "name": "startProfileAt" + }, + "arguments": [ + { + "type": "ArrayExpression", + "type": "ArrayExpression", + "start": 74, + "end": 94, + "elements": [ + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 75, + "end": 83, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 75, + "end": 79, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 76, + "end": 79, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 82, + "end": 83, + "value": 2, + "raw": "2" + } + }, + { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 85, + "end": 93, + "operator": "/", + "left": { + "type": "UnaryExpression", + "type": "UnaryExpression", + "start": 85, + "end": 89, + "operator": "-", + "argument": { + "type": "Identifier", + "type": "Identifier", + "start": 86, + "end": 89, + "name": "len" + } + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 92, + "end": 93, + "value": 2, + "raw": "2" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 96, + "end": 97 + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 104, + "end": 149, + "callee": { + "type": "Identifier", + "start": 104, + "end": 114, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 115, + "end": 140, + "properties": [ + { + "type": "ObjectProperty", + "start": 117, + "end": 125, + "key": { + "type": "Identifier", + "start": 117, + "end": 122, + "name": "angle" + }, + "value": { + "type": "Literal", + "type": "Literal", + "start": 124, + "end": 125, + "value": 0, + "raw": "0" + } + }, + { + "type": "ObjectProperty", + "start": 127, + "end": 138, + "key": { + "type": "Identifier", + "start": 127, + "end": 133, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 135, + "end": 138, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 142, + "end": 143 + }, + { + "type": "Literal", + "type": "Literal", + "start": 145, + "end": 148, + "value": "a", + "raw": "'a'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 155, + "end": 238, + "callee": { + "type": "Identifier", + "start": 155, + "end": 165, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 166, + "end": 229, + "properties": [ + { + "type": "ObjectProperty", + "start": 175, + "end": 202, + "key": { + "type": "Identifier", + "start": 175, + "end": 180, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 182, + "end": 202, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 182, + "end": 196, + "callee": { + "type": "Identifier", + "start": 182, + "end": 188, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 189, + "end": 192, + "value": "a", + "raw": "'a'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 194, + "end": 195 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 199, + "end": 202, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 211, + "end": 222, + "key": { + "type": "Identifier", + "start": 211, + "end": 217, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 219, + "end": 222, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 231, + "end": 232 + }, + { + "type": "Literal", + "type": "Literal", + "start": 234, + "end": 237, + "value": "b", + "raw": "'b'" + } + ], + "optional": false + }, + { + "type": "CallExpression", + "type": "CallExpression", + "start": 244, + "end": 327, + "callee": { + "type": "Identifier", + "start": 244, + "end": 254, + "name": "angledLine" + }, + "arguments": [ + { + "type": "ObjectExpression", + "type": "ObjectExpression", + "start": 255, + "end": 318, + "properties": [ + { + "type": "ObjectProperty", + "start": 264, + "end": 291, + "key": { + "type": "Identifier", + "start": 264, + "end": 269, + "name": "angle" + }, + "value": { + "type": "BinaryExpression", + "type": "BinaryExpression", + "start": 271, + "end": 291, + "operator": "+", + "left": { + "type": "CallExpression", + "type": "CallExpression", + "start": 271, + "end": 285, + "callee": { + "type": "Identifier", + "start": 271, + "end": 277, + "name": "segAng" + }, + "arguments": [ + { + "type": "Literal", + "type": "Literal", + "start": 278, + "end": 281, + "value": "b", + "raw": "'b'" + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 283, + "end": 284 + } + ], + "optional": false + }, + "right": { + "type": "Literal", + "type": "Literal", + "start": 288, + "end": 291, + "value": 120, + "raw": "120" + } + } + }, + { + "type": "ObjectProperty", + "start": 300, + "end": 311, + "key": { + "type": "Identifier", + "start": 300, + "end": 306, + "name": "length" + }, + "value": { + "type": "Identifier", + "type": "Identifier", + "start": 308, + "end": 311, + "name": "len" + } + } + ] + }, + { + "type": "PipeSubstitution", + "type": "PipeSubstitution", + "start": 320, + "end": 321 + }, + { + "type": "Literal", + "type": "Literal", + "start": 323, + "end": 326, + "value": "c", + "raw": "'c'" + } + ], + "optional": false + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + } + ], + "nonCodeMeta": { + "nonCodeNodes": {}, + "start": [] + } + } + }, + "__meta": [ + { + "sourceRange": [ + 14, + 329 + ] + } + ] + }, + "triangleHeight": { + "type": "UserVal", + "type": "UserVal", + "value": 200, + "__meta": [ + { + "sourceRange": [ + 352, + 355 + ] + } + ] + } + }, + "return": { + "type": "SketchGroup", + "type": "SketchGroup", + "id": "80d4e9d3-f369-4aca-b5e8-bc9b1a16bcc6", + "value": [ + { + "type": "ToPoint", + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 99.99999999999999 + ], + "name": "arc-b", + "__geoMeta": { + "id": "8f2a948e-009e-4ab0-9f32-9907e8439908", + "sourceRange": [ + 667, + 693 + ] + } + }, + { + "type": "ToPoint", + "from": [ + 80.0, + 99.99999999999999 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "72c64e9a-7982-4548-a2f9-b0624a8c914e", + "sourceRange": [ + 699, + 707 + ] + } + } + ], + "on": { + "type": "face", + "id": "afc62c56-0052-470c-80a4-3074939fcc49", + "value": "b", + "sketchGroupId": "5b273d26-8087-47d6-8e5d-fef52388bce5", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "faceId": "889a5175-71f3-4720-a44d-58fad43d08e6", + "__meta": [ + { + "sourceRange": [ + 578, + 599 + ] + } + ] + }, + "start": { + "from": [ + 80.0, + 100.0 + ], + "to": [ + 80.0, + 100.0 + ], + "name": "", + "__geoMeta": { + "id": "8f4e0c38-80e2-4314-9585-f9fc11d0bebf", + "sourceRange": [ + 605, + 661 + ] + } + }, + "position": [ + 0.0, + 0.0, + 0.0 + ], + "rotation": [ + 0.0, + 0.0, + 0.0, + 1.0 + ], + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0 + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0 + }, + "zAxis": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "entityId": "afc62c56-0052-470c-80a4-3074939fcc49", + "__meta": [ + { + "sourceRange": [ + 605, + 661 + ] + } + ] + } +} \ No newline at end of file