UNPKG

awv3

Version:
1,557 lines (1,556 loc) 584 kB
{ "type": "Program", "start": 0, "end": 6578, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 173, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 50, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 50 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "imported": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" }, "local": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" } } ], "importKind": "value", "source": { "type": "Literal", "start": 29, "end": 49, "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 49 } }, "value": "sketcher/ccobjects", "rawValue": "sketcher/ccobjects", "raw": "'sketcher/ccobjects'" } }, { "type": "ImportDeclaration", "start": 51, "end": 92, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 41 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 58, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 15 } }, "local": { "type": "Identifier", "start": 58, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 15 } }, "name": "Sketcher" } } ], "importKind": "value", "source": { "type": "Literal", "start": 72, "end": 91, "loc": { "start": { "line": 2, "column": 21 }, "end": { "line": 2, "column": 40 } }, "value": "sketcher/sketcher", "rawValue": "sketcher/sketcher", "raw": "'sketcher/sketcher'" } }, { "type": "ImportDeclaration", "start": 93, "end": 136, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 43 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 101, "end": 108, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 15 } }, "imported": { "type": "Identifier", "start": 101, "end": 108, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 15 } }, "name": "Interop" }, "local": { "type": "Identifier", "start": 101, "end": 108, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 15 } }, "name": "Interop" } } ], "importKind": "value", "source": { "type": "Literal", "start": 115, "end": 135, "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 42 } }, "value": "sketcher/cchelpers", "rawValue": "sketcher/cchelpers", "raw": "'sketcher/cchelpers'" } }, { "type": "ImportDeclaration", "start": 137, "end": 166, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 29 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 144, "end": 148, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }, "local": { "type": "Identifier", "start": 144, "end": 148, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }, "name": "View" } } ], "importKind": "value", "source": { "type": "Literal", "start": 154, "end": 165, "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 28 } }, "value": "core/view", "rawValue": "core/view", "raw": "'core/view'" } }, { "type": "ImportDeclaration", "start": 167, "end": 193, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 174, "end": 179, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "local": { "type": "Identifier", "start": 174, "end": 179, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 185, "end": 192, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" }, "trailingComments": [ { "type": "Block", "value": "\n * Constraint - a Javascript representation of LGS 2D constraint\n * optional attributes: expression: string, value: number, fixed: boolean\n ", "start": 195, "end": 340, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 10, "column": 3 } }, "range": [ 195, 340 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 341, "end": 4504, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 126, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 356, "end": 4504, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 126, "column": 1 } }, "id": { "type": "Identifier", "start": 362, "end": 372, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 31 } }, "name": "Constraint", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 381, "end": 395, "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 54 } }, "name": "ClassCadObject" }, "body": { "type": "ClassBody", "start": 396, "end": 4504, "loc": { "start": { "line": 11, "column": 55 }, "end": { "line": 126, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 402, "end": 1151, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 30, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 402, "end": 413, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 413, "end": 1151, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 30, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 414, "end": 419, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 21 } }, "name": "types" }, { "type": "Identifier", "start": 421, "end": 425, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 27 } }, "name": "args" }, { "type": "Identifier", "start": 427, "end": 437, "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 39 } }, "name": "attributes" } ], "body": { "type": "BlockStatement", "start": 439, "end": 1151, "loc": { "start": { "line": 12, "column": 41 }, "end": { "line": 30, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 449, "end": 457, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "expression": { "type": "CallExpression", "start": 449, "end": 456, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 15 } }, "callee": { "type": "Super", "start": 449, "end": 454, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 466, "end": 526, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 68 } }, "expression": { "type": "CallExpression", "start": 466, "end": 525, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 466, "end": 503, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 45 } }, "object": { "type": "MemberExpression", "start": 466, "end": 498, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 40 } }, "object": { "type": "Identifier", "start": 466, "end": 474, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 16 } }, "name": "Sketcher" }, "property": { "type": "Identifier", "start": 475, "end": 498, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 40 } }, "name": "mixinPixelSizedGeometry" }, "computed": false }, "property": { "type": "Identifier", "start": 499, "end": 503, "loc": { "start": { "line": 14, "column": 41 }, "end": { "line": 14, "column": 45 } }, "name": "call" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 504, "end": 508, "loc": { "start": { "line": 14, "column": 46 }, "end": { "line": 14, "column": 50 } } }, { "type": "MemberExpression", "start": 510, "end": 524, "loc": { "start": { "line": 14, "column": 52 }, "end": { "line": 14, "column": 66 } }, "object": { "type": "ThisExpression", "start": 510, "end": 514, "loc": { "start": { "line": 14, "column": 52 }, "end": { "line": 14, "column": 56 } } }, "property": { "type": "Identifier", "start": 515, "end": 524, "loc": { "start": { "line": 14, "column": 57 }, "end": { "line": 14, "column": 66 } }, "name": "thickness" }, "computed": false } ] } }, { "type": "ExpressionStatement", "start": 536, "end": 553, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 536, "end": 552, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 536, "end": 547, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 19 } }, "object": { "type": "ThisExpression", "start": 536, "end": 540, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 541, "end": 547, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 } }, "name": "points" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 550, "end": 552, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 24 } }, "elements": [] } }, "trailingComments": [ { "type": "CommentLine", "value": " constraint.points is assumed to be an empty array throughout a sketcher", "start": 554, "end": 628, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 100 } }, "range": [ 554, 628 ] } ] }, { "type": "ExpressionStatement", "start": 637, "end": 657, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 637, "end": 656, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 27 } }, "operator": "=", "left": { "type": "Identifier", "start": 637, "end": 642, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 13 } }, "name": "types", "leadingComments": null }, "right": { "type": "LogicalExpression", "start": 645, "end": 656, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 27 } }, "left": { "type": "Identifier", "start": 645, "end": 650, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 21 } }, "name": "types" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 654, "end": 656, "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 27 } }, "elements": [] } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " constraint.points is assumed to be an empty array throughout a sketcher", "start": 554, "end": 628, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 100 } }, "range": [ 554, 628 ] } ] }, { "type": "ExpressionStatement", "start": 666, "end": 691, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 666, "end": 690, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 666, "end": 679, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } }, "object": { "type": "ThisExpression", "start": 666, "end": 670, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "start": 671, "end": 679, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 21 } }, "name": "typename" }, "computed": false }, "right": { "type": "MemberExpression", "start": 682, "end": 690, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 32 } }, "object": { "type": "Identifier", "start": 682, "end": 687, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 29 } }, "name": "types" }, "property": { "type": "Literal", "start": 688, "end": 689, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 31 } }, "value": 0, "rawValue": 0, "raw": "0" }, "computed": true } } }, { "type": "ExpressionStatement", "start": 700, "end": 721, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 700, "end": 720, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 700, "end": 709, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 17 } }, "object": { "type": "ThisExpression", "start": 700, "end": 704, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "start": 705, "end": 709, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 17 } }, "name": "type" }, "computed": false }, "right": { "type": "MemberExpression", "start": 712, "end": 720, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 28 } }, "object": { "type": "Identifier", "start": 712, "end": 717, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 25 } }, "name": "types" }, "property": { "type": "Literal", "start": 718, "end": 719, "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 27 } }, "value": 1, "rawValue": 1, "raw": "1" }, "computed": true } } }, { "type": "ExpressionStatement", "start": 730, "end": 753, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 730, "end": 752, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 730, "end": 739, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 17 } }, "object": { "type": "ThisExpression", "start": 730, "end": 734, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } } }, "property": { "type": "Identifier", "start": 735, "end": 739, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 } }, "name": "args" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 742, "end": 752, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 30 } }, "left": { "type": "Identifier", "start": 742, "end": 746, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 24 } }, "name": "args" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 750, "end": 752, "loc": { "start": { "line": 20, "column": 28 }, "end": { "line": 20, "column": 30 } }, "elements": [] } } } }, { "type": "ExpressionStatement", "start": 762, "end": 792, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 762, "end": 791, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 37 } }, "operator": "=", "left": { "type": "Identifier", "start": 762, "end": 772, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 18 } }, "name": "attributes" }, "right": { "type": "LogicalExpression", "start": 775, "end": 791, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 37 } }, "left": { "type": "Identifier", "start": 775, "end": 785, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 31 } }, "name": "attributes" }, "operator": "||", "right": { "type": "ObjectExpression", "start": 789, "end": 791, "loc": { "start": { "line": 21, "column": 35 }, "end": { "line": 21, "column": 37 } }, "properties": [] } } } }, { "type": "ExpressionStatement", "start": 801, "end": 841, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 48 } }, "expression": { "type": "AssignmentExpression", "start": 801, "end": 840, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 47 }