awv3
Version:
AWV client CAD framework
1,596 lines • 1.26 MB
JSON
{
"type": "Program",
"start": 0,
"end": 11826,
"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": 41,
"end": 89,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 48,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 48,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"name": "Constraint"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 64,
"end": 88,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 47
}
},
"value": "../sketcher/constraint",
"rawValue": "../sketcher/constraint",
"raw": "'../sketcher/constraint'"
}
},
{
"type": "ImportDeclaration",
"start": 90,
"end": 147,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 57
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 98,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 98,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Point"
},
"local": {
"type": "Identifier",
"start": 98,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Point"
}
},
{
"type": "ImportSpecifier",
"start": 105,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 105,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
}
},
"name": "Line"
},
"local": {
"type": "Identifier",
"start": 105,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
}
},
"name": "Line"
}
},
{
"type": "ImportSpecifier",
"start": 111,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 111,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 24
}
},
"name": "Arc"
},
"local": {
"type": "Identifier",
"start": 111,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 24
}
},
"name": "Arc"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 121,
"end": 146,
"loc": {
"start": {
"line": 3,
"column": 31
},
"end": {
"line": 3,
"column": 56
}
},
"value": "../sketcher/geomobjects",
"rawValue": "../sketcher/geomobjects",
"raw": "'../sketcher/geomobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 148,
"end": 238,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 90
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 156,
"end": 172,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 156,
"end": 172,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
},
"name": "createGeomObject"
},
"local": {
"type": "Identifier",
"start": 156,
"end": 172,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
},
"name": "createGeomObject"
}
},
{
"type": "ImportSpecifier",
"start": 174,
"end": 191,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 43
}
},
"imported": {
"type": "Identifier",
"start": 174,
"end": 191,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 43
}
},
"name": "drawArcBy_S_E_CPh"
},
"local": {
"type": "Identifier",
"start": 174,
"end": 191,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 43
}
},
"name": "drawArcBy_S_E_CPh"
}
},
{
"type": "ImportSpecifier",
"start": 193,
"end": 207,
"loc": {
"start": {
"line": 4,
"column": 45
},
"end": {
"line": 4,
"column": 59
}
},
"imported": {
"type": "Identifier",
"start": 193,
"end": 207,
"loc": {
"start": {
"line": 4,
"column": 45
},
"end": {
"line": 4,
"column": 59
}
},
"name": "intersectLines"
},
"local": {
"type": "Identifier",
"start": 193,
"end": 207,
"loc": {
"start": {
"line": 4,
"column": 45
},
"end": {
"line": 4,
"column": 59
}
},
"name": "intersectLines"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 214,
"end": 237,
"loc": {
"start": {
"line": 4,
"column": 66
},
"end": {
"line": 4,
"column": 89
}
},
"value": "../sketcher/geomutils",
"rawValue": "../sketcher/geomutils",
"raw": "'../sketcher/geomutils'"
}
},
{
"type": "ImportDeclaration",
"start": 239,
"end": 287,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 246,
"end": 256,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 246,
"end": 256,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 17
}
},
"name": "Statements"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 262,
"end": 286,
"loc": {
"start": {
"line": 5,
"column": 23
},
"end": {
"line": 5,
"column": 47
}
},
"value": "../sketcher/statements",
"rawValue": "../sketcher/statements",
"raw": "'../sketcher/statements'"
}
},
{
"type": "ImportDeclaration",
"start": 288,
"end": 314,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 295,
"end": 300,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 295,
"end": 300,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 306,
"end": 313,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 316,
"end": 11825,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 307,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 331,
"end": 11825,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 307,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 337,
"end": 352,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 36
}
},
"name": "FilletProcessor"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 353,
"end": 11825,
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 307,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 359,
"end": 536,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 15,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 359,
"end": 370,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 370,
"end": 536,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 15,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 371,
"end": 379,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 24
}
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 381,
"end": 387,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 32
}
},
"name": "sketch"
}
],
"body": {
"type": "BlockStatement",
"start": 389,
"end": 536,
"loc": {
"start": {
"line": 9,
"column": 34
},
"end": {
"line": 15,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 399,
"end": 424,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 399,
"end": 423,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 399,
"end": 412,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 21
}
},
"object": {
"type": "ThisExpression",
"start": 399,
"end": 403,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 404,
"end": 412,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 21
}
},
"name": "sketcher"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 415,
"end": 423,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 32
}
},
"name": "sketcher"
}
}
},
{
"type": "ExpressionStatement",
"start": 433,
"end": 454,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 433,
"end": 453,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 433,
"end": 444,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 433,
"end": 437,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 438,
"end": 444,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 19
}
},
"name": "sketch"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 447,
"end": 453,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 28
}
},
"name": "sketch"
}
}
},
{
"type": "ExpressionStatement",
"start": 464,
"end": 492,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 464,
"end": 491,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 464,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 28
}
},
"object": {
"type": "ThisExpression",
"start": 464,
"end": 468,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 469,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 28
}
},
"name": "linearTolerance"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 487,
"end": 491,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 13,
"column": 35
}
},
"value": 0.001,
"rawValue": 0.001,
"raw": "1e-3"
}
}
},
{
"type": "ExpressionStatement",
"start": 501,
"end": 530,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 501,
"end": 529,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 501,
"end": 522,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 501,
"end": 505,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 506,
"end": 522,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 29
}
},
"name": "angularTolerance"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 525,
"end": 529,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 36
}
},
"value": 0.001,
"rawValue": 0.001,
"raw": "1e-3"
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 542,
"end": 1014,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 29,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 542,
"end": 554,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 16
}
},
"name": "FindPointsAt"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 554,
"end": 1014,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 29,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 555,
"end": 558,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"column": 20
}
},
"name": "pos"
},
{
"type": "Identifier",
"start": 560,
"end": 563,
"loc": {
"start": {
"line": 17,
"column": 22
},
"end": {
"line": 17,
"column": 25
}
},
"name": "tol"
}
],
"body": {
"type": "BlockStatement",
"start": 565,
"end": 1014,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 29,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 575,
"end": 710,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 21,
"column": 10
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 579,
"end": 709,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 21,
"column": 9
}
},
"id": {
"type": "Identifier",
"start": 579,
"end": 590,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 23
}
},
"name": "equalPoints"
},
"init": {
"type": "FunctionExpression",
"start": 593,
"end": 709,
"loc": {
"start": {
"line": 18,
"column": 26
},
"end": {
"line": 21,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 603,
"end": 604,
"loc": {
"start": {
"line": 18,
"column": 36
},
"end": {
"line": 18,
"column": 37
}
},
"name": "a"
},
{
"type": "Identifier",
"start": 606,
"end": 607,
"loc": {
"start": {
"line": 18,
"column": 39
},
"end": {
"line": 18,
"column": 40
}
},
"name": "b"
}
],
"body": {
"type": "BlockStatement",
"start": 609,
"end": 709,
"loc": {
"start": {
"line": 18,
"column": 42
},
"end": {
"line": 21,
"column": 9
}
},
"body": [
{
"type": "IfStatement",
"start": 623,
"end": 699,
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 20,
"column": 36
}
},
"test": {
"type": "Identifier",
"start": 627,
"end": 630,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 19
}
},
"name": "tol"
},
"consequent": {
"type": "ReturnStatement",
"start": 632,
"end": 662,
"loc": {
"start": {
"line": 19,
"column": 21
},
"end": {
"line": 19,
"column": 51
}
},
"argument": {
"type": "BinaryExpression",
"start": 639,
"end": 661,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 50
}
},
"left": {
"type": "CallExpression",
"start": 639,
"end": 654,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 43
}
},
"callee": {
"type": "MemberExpression",
"start": 639,
"end": 651,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 40
}
},
"object": {
"type": "Identifier",
"start": 639,
"end": 640,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 29
}
},
"name": "a"
},
"property": {
"type": "Identifier",
"start": 641,
"end": 651,
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 40
}
},
"name": "distanceTo"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 652,
"end": 653,
"loc": {
"start": {
"line": 19,
"column": 41
},
"end": {
"line": 19,
"column": 42
}
},
"name": "b"
}
]
},
"operator": "<=",
"right": {
"type": "Identifier",
"start": 658,
"end": 661,
"loc": {
"start": {
"line": 19,
"column": 47
},
"end": {
"line": 19,
"column": 50
}
},
"name": "tol"
}
}
},
"alternate": {
"type": "ReturnStatement",
"start": 680,
"end": 699,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 36
}
},
"argument": {
"type": "CallExpression",
"start": 687,
"end": 698,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 35
}
},
"callee": {
"type": "MemberExpression",
"start": 687,
"end": 695,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 32
}
},
"object": {
"type": "Identi