UNPKG

awv3

Version:
1,530 lines (1,529 loc) 1.15 MB
{ "type": "Program", "start": 0, "end": 10666, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 268, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 37, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } }, "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": 36, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 36 } }, "value": "sketcher/sketch", "rawValue": "sketcher/sketch", "raw": "'sketcher/sketch'" } }, { "type": "ImportDeclaration", "start": 38, "end": 83, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 45, "end": 55, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "local": { "type": "Identifier", "start": 45, "end": 55, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "name": "Constraint" } } ], "importKind": "value", "source": { "type": "Literal", "start": 61, "end": 82, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 44 } }, "value": "sketcher/constraint", "rawValue": "sketcher/constraint", "raw": "'sketcher/constraint'" } }, { "type": "ImportDeclaration", "start": 84, "end": 133, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 49 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 92, "end": 97, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "imported": { "type": "Identifier", "start": 92, "end": 97, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "name": "Point" }, "local": { "type": "Identifier", "start": 92, "end": 97, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 13 } }, "name": "Point" } }, { "type": "ImportSpecifier", "start": 99, "end": 103, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "imported": { "type": "Identifier", "start": 99, "end": 103, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "name": "Line" }, "local": { "type": "Identifier", "start": 99, "end": 103, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 19 } }, "name": "Line" } } ], "importKind": "value", "source": { "type": "Literal", "start": 110, "end": 132, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 48 } }, "value": "sketcher/geomobjects", "rawValue": "sketcher/geomobjects", "raw": "'sketcher/geomobjects'" } }, { "type": "ImportDeclaration", "start": 134, "end": 221, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 87 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 142, "end": 158, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "imported": { "type": "Identifier", "start": 142, "end": 158, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "name": "createGeomObject" }, "local": { "type": "Identifier", "start": 142, "end": 158, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 24 } }, "name": "createGeomObject" } }, { "type": "ImportSpecifier", "start": 160, "end": 177, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "imported": { "type": "Identifier", "start": 160, "end": 177, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "name": "drawArcBy_S_E_CPh" }, "local": { "type": "Identifier", "start": 160, "end": 177, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 43 } }, "name": "drawArcBy_S_E_CPh" } }, { "type": "ImportSpecifier", "start": 179, "end": 193, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "imported": { "type": "Identifier", "start": 179, "end": 193, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "name": "intersectLines" }, "local": { "type": "Identifier", "start": 179, "end": 193, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 59 } }, "name": "intersectLines" } } ], "importKind": "value", "source": { "type": "Literal", "start": 200, "end": 220, "loc": { "start": { "line": 4, "column": 66 }, "end": { "line": 4, "column": 86 } }, "value": "sketcher/geomutils", "rawValue": "sketcher/geomutils", "raw": "'sketcher/geomutils'" } }, { "type": "ImportDeclaration", "start": 222, "end": 248, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 229, "end": 234, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "local": { "type": "Identifier", "start": 229, "end": 234, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 240, "end": 247, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ExportDefaultDeclaration", "start": 250, "end": 10665, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 267, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 265, "end": 10665, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 267, "column": 1 } }, "id": { "type": "Identifier", "start": 271, "end": 286, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 36 } }, "name": "FilletProcessor" }, "superClass": null, "body": { "type": "ClassBody", "start": 287, "end": 10665, "loc": { "start": { "line": 7, "column": 37 }, "end": { "line": 267, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 293, "end": 470, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 14, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 293, "end": 304, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 304, "end": 470, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 14, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 305, "end": 313, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 24 } }, "name": "sketcher" }, { "type": "Identifier", "start": 315, "end": 321, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 32 } }, "name": "sketch" } ], "body": { "type": "BlockStatement", "start": 323, "end": 470, "loc": { "start": { "line": 8, "column": 34 }, "end": { "line": 14, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 333, "end": 358, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 333, "end": 357, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 333, "end": 346, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 21 } }, "object": { "type": "ThisExpression", "start": 333, "end": 337, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 338, "end": 346, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 21 } }, "name": "sketcher" }, "computed": false }, "right": { "type": "Identifier", "start": 349, "end": 357, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 32 } }, "name": "sketcher" } } }, { "type": "ExpressionStatement", "start": 367, "end": 388, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 367, "end": 387, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 367, "end": 378, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 19 } }, "object": { "type": "ThisExpression", "start": 367, "end": 371, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 372, "end": 378, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 19 } }, "name": "sketch" }, "computed": false }, "right": { "type": "Identifier", "start": 381, "end": 387, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 28 } }, "name": "sketch" } } }, { "type": "ExpressionStatement", "start": 398, "end": 426, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 398, "end": 425, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 35 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 398, "end": 418, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 28 } }, "object": { "type": "ThisExpression", "start": 398, "end": 402, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 403, "end": 418, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 28 } }, "name": "linearTolerance" }, "computed": false }, "right": { "type": "Literal", "start": 421, "end": 425, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 35 } }, "value": 0.001, "rawValue": 0.001, "raw": "1e-3" } } }, { "type": "ExpressionStatement", "start": 435, "end": 464, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 435, "end": 463, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 435, "end": 456, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 29 } }, "object": { "type": "ThisExpression", "start": 435, "end": 439, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 440, "end": 456, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 29 } }, "name": "angularTolerance" }, "computed": false }, "right": { "type": "Literal", "start": 459, "end": 463, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 36 } }, "value": 0.001, "rawValue": 0.001, "raw": "1e-3" } } } ] } } }, { "type": "MethodDefinition", "start": 476, "end": 948, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 28, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 476, "end": 488, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 16 } }, "name": "FindPointsAt" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 488, "end": 948, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 28, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 489, "end": 492, "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 20 } }, "name": "pos" }, { "type": "Identifier", "start": 494, "end": 497, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 25 } }, "name": "tol" } ], "body": { "type": "BlockStatement", "start": 499, "end": 948, "loc": { "start": { "line": 16, "column": 27 }, "end": { "line": 28, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 509, "end": 644, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 20, "column": 10 } }, "declarations": [ { "type": "VariableDeclarator", "start": 513, "end": 643, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 20, "column": 9 } }, "id": { "type": "Identifier", "start": 513, "end": 524, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 23 } }, "name": "equalPoints" }, "init": { "type": "FunctionExpression", "start": 527, "end": 643, "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 20, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 537, "end": 538, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 37 } }, "name": "a" }, { "type": "Identifier", "start": 540, "end": 541, "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 40 } }, "name": "b" } ], "body": { "type": "BlockStatement", "start": 543, "end": 643, "loc": { "start": { "line": 17, "column": 42 }, "end": { "line": 20, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 557, "end": 633, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 19, "column": 36 } }, "test": { "type": "Identifier", "start": 561, "end": 564, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 19 } }, "name": "tol" }, "consequent": { "type": "ReturnStatement", "start": 566, "end": 596, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 51 } }, "argument": { "type": "BinaryExpression", "start": 573, "end": 595, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 50 } }, "left": { "type": "CallExpression", "start": 573, "end": 588, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 43 } }, "callee": { "type": "MemberExpression", "start": 573, "end": 585, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 40 } }, "object": { "type": "Identifier", "start": 573, "end": 574, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 29 } }, "name": "a" }, "property": { "type": "Identifier", "start": 575, "end": 585, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 40 } }, "name": "distanceTo" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 586, "end": 587, "loc": { "start": { "line": 18, "column": 41 }, "end": { "line": 18, "column": 42 } }, "name": "b" } ] }, "operator": "<=", "right": { "type": "Identifier", "start": 592, "end": 595, "loc": { "start": { "line": 18, "column": 47 }, "end": { "line": 18, "column": 50 } }, "name": "tol" } } }, "alternate": { "type": "ReturnStatement", "start": 614, "end": 633, "loc": { "start": { "line": 19, "column": 17 }, "end": { "line": 19, "column": 36 } }, "argument": { "type": "CallExpression", "start": 621, "end": 632, "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 621, "end": 629, "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 32 } }, "object": { "type": "Identifier", "start": 621, "end": 622, "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 25 } }, "name": "a" }, "property": { "type": "Identifier", "start": 623, "end": 629, "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 32 } }, "name": "equals" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 630, "end": 631, "loc": { "start": { "line": 19, "column": 33 }, "end": { "line": 19, "column": 34 } },