awv3
Version:
⚡ AWV3 embedded CAD
1,496 lines (1,495 loc) • 914 kB
JSON
{
"type": "File",
"start": 0,
"end": 4896,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 136,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 4896,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 136,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 48,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 48
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
},
"identifierName": "addCommand"
},
"name": "addCommand"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
},
"identifierName": "addCommand"
},
"name": "addCommand"
}
}
],
"source": {
"type": "StringLiteral",
"start": 25,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 47
}
},
"extra": {
"rawValue": "../command/highlevel",
"raw": "'../command/highlevel'"
},
"value": "../command/highlevel"
}
},
{
"type": "ImportDeclaration",
"start": 49,
"end": 82,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 56,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 56,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
},
"identifierName": "Constraint"
},
"name": "Constraint"
}
}
],
"source": {
"type": "StringLiteral",
"start": 72,
"end": 81,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 32
}
},
"extra": {
"rawValue": "./index",
"raw": "'./index'"
},
"value": "./index"
}
},
{
"type": "ImportDeclaration",
"start": 83,
"end": 144,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 61
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 91,
"end": 100,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 91,
"end": 100,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 17
},
"identifierName": "incidence"
},
"name": "incidence"
},
"local": {
"type": "Identifier",
"start": 91,
"end": 100,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 17
},
"identifierName": "incidence"
},
"name": "incidence"
}
},
{
"type": "ImportSpecifier",
"start": 102,
"end": 115,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 32
}
},
"imported": {
"type": "Identifier",
"start": 102,
"end": 115,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 32
},
"identifierName": "horizontality"
},
"name": "horizontality"
},
"local": {
"type": "Identifier",
"start": 102,
"end": 115,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 32
},
"identifierName": "horizontality"
},
"name": "horizontality"
}
},
{
"type": "ImportSpecifier",
"start": 117,
"end": 128,
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 45
}
},
"imported": {
"type": "Identifier",
"start": 117,
"end": 128,
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 45
},
"identifierName": "verticality"
},
"name": "verticality"
},
"local": {
"type": "Identifier",
"start": 117,
"end": 128,
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 45
},
"identifierName": "verticality"
},
"name": "verticality"
}
}
],
"source": {
"type": "StringLiteral",
"start": 135,
"end": 143,
"loc": {
"start": {
"line": 3,
"column": 52
},
"end": {
"line": 3,
"column": 60
}
},
"extra": {
"rawValue": "./type",
"raw": "'./type'"
},
"value": "./type"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 146,
"end": 3319,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 79,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 161,
"end": 3319,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 79,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 167,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 36
},
"identifierName": "ConstraintAdder"
},
"name": "ConstraintAdder"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 183,
"end": 3319,
"loc": {
"start": {
"line": 5,
"column": 37
},
"end": {
"line": 79,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 189,
"end": 787,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 189,
"end": 200,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 201,
"end": 207,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 22
},
"identifierName": "sketch"
},
"name": "sketch"
}
],
"body": {
"type": "BlockStatement",
"start": 209,
"end": 787,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 276,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 276,
"end": 296,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 276,
"end": 287,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 276,
"end": 280,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 281,
"end": 287,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 19
},
"identifierName": "sketch"
},
"name": "sketch"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "Identifier",
"start": 290,
"end": 296,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 28
},
"identifierName": "sketch"
},
"name": "sketch"
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " the sketch we are going to add constraints to",
"start": 219,
"end": 267,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 56
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " the list of constraint geomParams which really should be added",
"start": 306,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 73
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 380,
"end": 402,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 380,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 380,
"end": 396,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 380,
"end": 384,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 385,
"end": 396,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 24
},
"identifierName": "constraints"
},
"name": "constraints"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "ArrayExpression",
"start": 399,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 29
}
},
"elements": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " the list of constraint geomParams which really should be added",
"start": 306,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 73
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " dsu structures for incident and inc-tangent point groups",
"start": 412,
"end": 471,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 67
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 480,
"end": 510,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 38
}
},
"expression": {
"type": "AssignmentExpression",
"start": 480,
"end": 509,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 37
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 480,
"end": 497,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 480,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 485,
"end": 497,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 25
},
"identifierName": "incidenceDsu"
},
"name": "incidenceDsu"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 500,
"end": 509,
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 37
}
},
"callee": {
"type": "Identifier",
"start": 504,
"end": 507,
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 35
},
"identifierName": "DSU"
},
"name": "DSU"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " dsu structures for incident and inc-tangent point groups",
"start": 412,
"end": 471,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 67
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": "this.tangencyDsu = new DSU(); // TODO!",
"start": 519,
"end": 562,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 51
}
}
},
{
"type": "CommentLine",
"value": " sets of horizontal and vertical lines",
"start": 571,
"end": 611,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 48
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 620,
"end": 651,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 620,
"end": 650,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 620,
"end": 638,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 620,
"end": 624,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 625,
"end": 638,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 26
},
"identifierName": "horizontalSet"
},
"name": "horizontalSet"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 641,
"end": 650,
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 38
}
},
"callee": {
"type": "Identifier",
"start": 645,
"end": 648,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 36
},
"identifierName": "Set"
},
"name": "Set"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": "this.tangencyDsu = new DSU(); // TODO!",
"start": 519,
"end": 562,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 51
}
}
},
{
"type": "CommentLine",
"value": " sets of horizontal and vertical lines",
"start": 571,
"end": 611,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 48
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 660,
"end": 689,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 660,
"end": 688,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 660,
"end": 676,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 660,
"end": 664,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 665,
"end": 676,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 24
},
"identifierName": "verticalSet"
},
"name": "verticalSet"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 679,
"end": 688,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 17,
"column": 36
}
},
"callee": {
"type": "Identifier",
"start": 683,
"end": 686,
"loc": {
"start": {
"line": 17,
"column": 31
},
"end": {
"line": 17,
"column": 34
},
"identifierName": "Set"
},
"name": "Set"
},
"arguments": []
}
},
"trailingComments": [
{
"type": "CommentLine",
"value": " preprocess all objects and constraints currently on sketch",
"start": 699,
"end": 760,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 69
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 769,
"end": 781,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 20
}
},
"expression": {
"type": "CallExpression",
"start": 769,
"end": 780,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 19
}
},
"callee": {
"type": "MemberExpression",
"start": 769,
"end": 778,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 769,
"end": 773,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 774,
"end": 778,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 20,
"column": 17
},
"identifierName": "init"
},
"name": "init"
},
"computed": false,
"leadingComments": null
},
"arguments": [],
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " preprocess all objects and constraints currently on sketch",
"start": 699,
"end": 760,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 69
}
}
}
]
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 793,
"end": 1278,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 32,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 793,
"end": 797,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 8
},
"identifierName": "init"
},
"name": "init"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 800,
"end": 1278,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 32,
"column": 5
}
},
"body": [
{
"type": "ForOfStatement",
"start": 863,
"end": 1272,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 31,
"column": 9
}
},
"left": {
"type": "VariableDeclaration",
"start": 868,
"end": 878,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 23
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 872,
"end": 878,
"loc": {
"start": {
"line": 25,
"column": 17
},
"end": {
"line": 25,
"column": 23
}
},
"id": {
"type": "Identifier",
"start": 872,
"end": 878,
"loc": {
"start": {
"line": 25,
"column": 17
},
"end": {
"line": 25,
"column": 23
},
"identifierName": "object"
},
"name": "object",
"leadingComments": null
},
"init": null,
"leadingComments": null
}
],
"kind": "let",
"leadingComments": null
},
"right": {
"type": "MemberExpression",
"start": 882,
"end": 902,
"loc": {
"start": {
"line": 25,
"column": 27
},
"end": {
"line": 25,
"column": 47
}
},
"object": {
"type": "MemberExpression",
"start": 882,
"end": 893,
"loc": {
"start": {
"line": 25,
"column": 27
},
"end": {
"line": 25,
"column": 38
}
},
"object": {
"type": "ThisExpression",
"start": 882,
"end": 886,
"loc": {
"start": {
"line": 25,
"column": 27
},
"end": {
"line": 25,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"start": 887,
"end": 893,
"loc": {
"start": {
"line": 25,
"column": 32
},