UNPKG

awv3

Version:
1,596 lines 1.26 MB
{ "type": "Program", "start": 0, "end": 12133, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 308, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 40, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 40 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "local": { "type": "Identifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "name": "Sketch" } } ], "importKind": "value", "source": { "type": "Literal", "start": 19, "end": 39, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 39 } }, "value": "../sketcher/sketch", "rawValue": "../sketcher/sketch", "raw": "'../sketcher/sketch'" } }, { "type": "ImportDeclaration", "start": 42, "end": 90, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 48 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 49, "end": 59, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "local": { "type": "Identifier", "start": 49, "end": 59, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "name": "Constraint" } } ], "importKind": "value", "source": { "type": "Literal", "start": 65, "end": 89, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 47 } }, "value": "../sketcher/constraint", "rawValue": "../sketcher/constraint", "raw": "'../sketcher/constraint'" } }, { "type": "ImportDeclaration", "start": 92, "end": 149, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 57 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 100, "end": 105, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "imported": { "type": "Identifier", "start": 100, "end": 105, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "name": "Point" }, "local": { "type": "Identifier", "start": 100, "end": 105, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "name": "Point" } }, { "type": "ImportSpecifier", "start": 107, "end": 111, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "imported": { "type": "Identifier", "start": 107, "end": 111, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "name": "Line" }, "local": { "type": "Identifier", "start": 107, "end": 111, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "name": "Line" } }, { "type": "ImportSpecifier", "start": 113, "end": 116, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 24 } }, "imported": { "type": "Identifier", "start": 113, "end": 116, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 24 } }, "name": "Arc" }, "local": { "type": "Identifier", "start": 113, "end": 116, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 24 } }, "name": "Arc" } } ], "importKind": "value", "source": { "type": "Literal", "start": 123, "end": 148, "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 56 } }, "value": "../sketcher/geomobjects", "rawValue": "../sketcher/geomobjects", "raw": "'../sketcher/geomobjects'" } }, { "type": "ImportDeclaration", "start": 151, "end": 241, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 90 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 159, "end": 175, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "imported": { "type": "Identifier", "start": 159, "end": 175, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "name": "createGeomObject" }, "local": { "type": "Identifier", "start": 159, "end": 175, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "name": "createGeomObject" } }, { "type": "ImportSpecifier", "start": 177, "end": 194, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "imported": { "type": "Identifier", "start": 177, "end": 194, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "name": "drawArcBy_S_E_CPh" }, "local": { "type": "Identifier", "start": 177, "end": 194, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "name": "drawArcBy_S_E_CPh" } }, { "type": "ImportSpecifier", "start": 196, "end": 210, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "imported": { "type": "Identifier", "start": 196, "end": 210, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "name": "intersectLines" }, "local": { "type": "Identifier", "start": 196, "end": 210, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "name": "intersectLines" } } ], "importKind": "value", "source": { "type": "Literal", "start": 217, "end": 240, "loc": { "start": { "line": 4, "column": 66 }, "end": { "line": 4, "column": 89 } }, "value": "../sketcher/geomutils", "rawValue": "../sketcher/geomutils", "raw": "'../sketcher/geomutils'" } }, { "type": "ImportDeclaration", "start": 243, "end": 291, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 48 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 250, "end": 260, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "local": { "type": "Identifier", "start": 250, "end": 260, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "name": "Statements" } } ], "importKind": "value", "source": { "type": "Literal", "start": 266, "end": 290, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 47 } }, "value": "../sketcher/statements", "rawValue": "../sketcher/statements", "raw": "'../sketcher/statements'" } }, { "type": "ImportDeclaration", "start": 293, "end": 319, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 300, "end": 305, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 12 } }, "local": { "type": "Identifier", "start": 300, "end": 305, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 311, "end": 318, "loc": { "start": { "line": 6, "column": 18 }, "end": { "line": 6, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ExportDefaultDeclaration", "start": 323, "end": 12131, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 307, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 338, "end": 12131, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 307, "column": 1 } }, "id": { "type": "Identifier", "start": 344, "end": 359, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 36 } }, "name": "FilletProcessor" }, "superClass": null, "body": { "type": "ClassBody", "start": 360, "end": 12131, "loc": { "start": { "line": 8, "column": 37 }, "end": { "line": 307, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 367, "end": 550, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 15, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 367, "end": 378, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 378, "end": 550, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 15, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 379, "end": 387, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 24 } }, "name": "sketcher" }, { "type": "Identifier", "start": 389, "end": 395, "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 32 } }, "name": "sketch" } ], "body": { "type": "BlockStatement", "start": 397, "end": 550, "loc": { "start": { "line": 9, "column": 34 }, "end": { "line": 15, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 408, "end": 433, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 408, "end": 432, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 408, "end": 421, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 21 } }, "object": { "type": "ThisExpression", "start": 408, "end": 412, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 413, "end": 421, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 21 } }, "name": "sketcher" }, "computed": false }, "right": { "type": "Identifier", "start": 424, "end": 432, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 32 } }, "name": "sketcher" } } }, { "type": "ExpressionStatement", "start": 443, "end": 464, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 443, "end": 463, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 443, "end": 454, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 19 } }, "object": { "type": "ThisExpression", "start": 443, "end": 447, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 448, "end": 454, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 19 } }, "name": "sketch" }, "computed": false }, "right": { "type": "Identifier", "start": 457, "end": 463, "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 28 } }, "name": "sketch" } } }, { "type": "ExpressionStatement", "start": 476, "end": 504, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 476, "end": 503, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 476, "end": 496, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 28 } }, "object": { "type": "ThisExpression", "start": 476, "end": 480, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 481, "end": 496, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 28 } }, "name": "linearTolerance" }, "computed": false }, "right": { "type": "Literal", "start": 499, "end": 503, "loc": { "start": { "line": 13, "column": 31 }, "end": { "line": 13, "column": 35 } }, "value": 0.001, "rawValue": 0.001, "raw": "1e-3" } } }, { "type": "ExpressionStatement", "start": 514, "end": 543, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 514, "end": 542, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 514, "end": 535, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 29 } }, "object": { "type": "ThisExpression", "start": 514, "end": 518, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 12 } } }, "property": { "type": "Identifier", "start": 519, "end": 535, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 29 } }, "name": "angularTolerance" }, "computed": false }, "right": { "type": "Literal", "start": 538, "end": 542, "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 36 } }, "value": 0.001, "rawValue": 0.001, "raw": "1e-3" } } } ] } } }, { "type": "MethodDefinition", "start": 558, "end": 1042, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 29, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 558, "end": 570, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 16 } }, "name": "FindPointsAt" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 570, "end": 1042, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 29, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 571, "end": 574, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 20 } }, "name": "pos" }, { "type": "Identifier", "start": 576, "end": 579, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 25 } }, "name": "tol" } ], "body": { "type": "BlockStatement", "start": 581, "end": 1042, "loc": { "start": { "line": 17, "column": 27 }, "end": { "line": 29, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 592, "end": 730, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 21, "column": 10 } }, "declarations": [ { "type": "VariableDeclarator", "start": 596, "end": 729, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 21, "column": 9 } }, "id": { "type": "Identifier", "start": 596, "end": 607, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 23 } }, "name": "equalPoints" }, "init": { "type": "FunctionExpression", "start": 610, "end": 729, "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 21, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 620, "end": 621, "loc": { "start": { "line": 18, "column": 36 }, "end": { "line": 18, "column": 37 } }, "name": "a" }, { "type": "Identifier", "start": 623, "end": 624, "loc": { "start": { "line": 18, "column": 39 }, "end": { "line": 18, "column": 40 } }, "name": "b" } ], "body": { "type": "BlockStatement", "start": 626, "end": 729, "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 21, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 641, "end": 718, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 20, "column": 36 } }, "test": { "type": "Identifier", "start": 645, "end": 648, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 19 } }, "name": "tol" }, "consequent": { "type": "ReturnStatement", "start": 650, "end": 680, "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 51 } }, "argument": { "type": "BinaryExpression", "start": 657, "end": 679, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 50 } }, "left": { "type": "CallExpression", "start": 657, "end": 672, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 43 } }, "callee": { "type": "MemberExpression", "start": 657, "end": 669, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 40 } }, "object": { "type": "Identifier", "start": 657, "end": 658, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 29 } }, "name": "a" }, "property": { "type": "Identifier", "start": 659, "end": 669, "loc": { "start": { "line": 19, "column": 30 }, "end": { "line": 19, "column": 40 } }, "name": "distanceTo" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 670, "end": 671, "loc": { "start": { "line": 19, "column": 41 }, "end": { "line": 19, "column": 42 } }, "name": "b" } ] }, "operator": "<=", "right": { "type": "Identifier", "start": 676, "end": 679, "loc": { "start": { "line": 19, "column": 47 }, "end": { "line": 19, "column": 50 } }, "name": "tol" } } }, "alternate": { "type": "ReturnStatement", "start": 699, "end": 718, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 20, "column": 36 } }, "argument": { "type": "CallExpression", "start": 706, "end": 717, "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 706, "end": 714, "loc": { "start": { "line": 20, "column": 24 }, "end": { "line": 20, "column": 32 } }, "object": { "type": "Ide