KCL: Convert x/y lines to use keyword arguments (#5615)
Previously, `xLine`, `xLineTo`, `yLine` and `yLineTo` used positional arguments. Now: - `xLineTo` and `yLineTo` have been removed - `xLine` and `yLine` both use keyword arguments: - `length`, optional (i.e. a relative distance along the X or Y axis) - `endAbsolute` optional (i.e. an absolute point along the X or Y axis) - `tag` optional - Exactly one of `length` or `endAbsolute` must be given. Not both, not neither. For example: ``` // Old way |> xLine(6.04, %) |> yLineTo(20, %, $base) // New way |> xLine(length = 6.04) |> yLine(endAbsolute = 20, tag = $base) ``` This also improves some of the general-purpose keyword arguments code in modeling app's TS codebase.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Operations executed gridfinity-baseplate.kcl
|
||||
---
|
||||
[
|
||||
@ -20,16 +20,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1138,
|
||||
1150,
|
||||
1162,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [
|
||||
1111,
|
||||
1151,
|
||||
1123,
|
||||
1163,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -39,8 +39,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"value": "YZ"
|
||||
},
|
||||
"sourceRange": [
|
||||
1123,
|
||||
1127,
|
||||
1135,
|
||||
1139,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -50,14 +50,14 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"name": "face",
|
||||
"functionSourceRange": [
|
||||
745,
|
||||
1047,
|
||||
1059,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1106,
|
||||
1152,
|
||||
1118,
|
||||
1164,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -98,16 +98,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1163,
|
||||
1192,
|
||||
1175,
|
||||
1204,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1098,
|
||||
1194,
|
||||
1110,
|
||||
1206,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -119,8 +119,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1106,
|
||||
1152,
|
||||
1118,
|
||||
1164,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -142,8 +142,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1317,
|
||||
1320,
|
||||
1329,
|
||||
1332,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -193,8 +193,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
1331,
|
||||
1340,
|
||||
1343,
|
||||
1352,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -232,8 +232,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
1353,
|
||||
1386,
|
||||
1365,
|
||||
1398,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -252,8 +252,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1402,
|
||||
1403,
|
||||
1414,
|
||||
1415,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -263,16 +263,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"value": true
|
||||
},
|
||||
"sourceRange": [
|
||||
1426,
|
||||
1430,
|
||||
1438,
|
||||
1442,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternCircular3d",
|
||||
"sourceRange": [
|
||||
1269,
|
||||
1432,
|
||||
1281,
|
||||
1444,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -284,8 +284,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1290,
|
||||
1300,
|
||||
1302,
|
||||
1312,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -307,16 +307,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1682,
|
||||
1694,
|
||||
1706,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [
|
||||
1655,
|
||||
1695,
|
||||
1667,
|
||||
1707,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -326,8 +326,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"value": "YZ"
|
||||
},
|
||||
"sourceRange": [
|
||||
1667,
|
||||
1671,
|
||||
1679,
|
||||
1683,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -337,14 +337,14 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"name": "face",
|
||||
"functionSourceRange": [
|
||||
745,
|
||||
1047,
|
||||
1059,
|
||||
0
|
||||
],
|
||||
"unlabeledArg": null,
|
||||
"labeledArgs": {},
|
||||
"sourceRange": [
|
||||
1650,
|
||||
1696,
|
||||
1662,
|
||||
1708,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -468,8 +468,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1617,
|
||||
1648,
|
||||
1629,
|
||||
1660,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -481,16 +481,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1650,
|
||||
1696,
|
||||
1662,
|
||||
1708,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "revolve",
|
||||
"sourceRange": [
|
||||
1609,
|
||||
1697,
|
||||
1621,
|
||||
1709,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -513,8 +513,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1792,
|
||||
1795,
|
||||
1804,
|
||||
1807,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -564,8 +564,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
1806,
|
||||
1815,
|
||||
1818,
|
||||
1827,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -603,8 +603,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
1828,
|
||||
1861,
|
||||
1840,
|
||||
1873,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -623,8 +623,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1877,
|
||||
1878,
|
||||
1889,
|
||||
1890,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -634,16 +634,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
"value": true
|
||||
},
|
||||
"sourceRange": [
|
||||
1901,
|
||||
1905,
|
||||
1913,
|
||||
1917,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternCircular3d",
|
||||
"sourceRange": [
|
||||
1742,
|
||||
1907,
|
||||
1754,
|
||||
1919,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -655,8 +655,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1763,
|
||||
1775,
|
||||
1787,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -709,8 +709,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2015,
|
||||
2030,
|
||||
2027,
|
||||
2042,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -729,8 +729,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2084,
|
||||
2093,
|
||||
2096,
|
||||
2105,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -749,16 +749,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2051,
|
||||
2064,
|
||||
2063,
|
||||
2076,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternLinear3d",
|
||||
"sourceRange": [
|
||||
1970,
|
||||
2100,
|
||||
1982,
|
||||
2112,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -781,8 +781,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
1994,
|
||||
1999,
|
||||
2006,
|
||||
2011,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -835,8 +835,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2137,
|
||||
2152,
|
||||
2149,
|
||||
2164,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -855,8 +855,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2207,
|
||||
2216,
|
||||
2219,
|
||||
2228,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -875,16 +875,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2173,
|
||||
2187,
|
||||
2185,
|
||||
2199,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternLinear3d",
|
||||
"sourceRange": [
|
||||
2106,
|
||||
2223,
|
||||
2118,
|
||||
2235,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -973,8 +973,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2356,
|
||||
2371,
|
||||
2368,
|
||||
2383,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -993,8 +993,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2425,
|
||||
2434,
|
||||
2437,
|
||||
2446,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -1013,16 +1013,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2392,
|
||||
2405,
|
||||
2404,
|
||||
2417,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternLinear3d",
|
||||
"sourceRange": [
|
||||
2309,
|
||||
2441,
|
||||
2321,
|
||||
2453,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -1045,8 +1045,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2333,
|
||||
2340,
|
||||
2345,
|
||||
2352,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -1099,8 +1099,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
]
|
||||
},
|
||||
"sourceRange": [
|
||||
2478,
|
||||
2493,
|
||||
2490,
|
||||
2505,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -1119,8 +1119,8 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2548,
|
||||
2557,
|
||||
2560,
|
||||
2569,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -1139,16 +1139,16 @@ description: Operations executed gridfinity-baseplate.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2514,
|
||||
2528,
|
||||
2526,
|
||||
2540,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "patternLinear3d",
|
||||
"sourceRange": [
|
||||
2447,
|
||||
2564,
|
||||
2459,
|
||||
2576,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
|
||||
Reference in New Issue
Block a user