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 router-template-cross-bar.kcl
|
||||
---
|
||||
[
|
||||
@ -43,16 +43,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1531,
|
||||
1532,
|
||||
1705,
|
||||
1706,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
1503,
|
||||
1533,
|
||||
1677,
|
||||
1707,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -64,8 +64,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1511,
|
||||
1520,
|
||||
1685,
|
||||
1694,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -80,8 +80,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
1561,
|
||||
1571,
|
||||
1735,
|
||||
1745,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -91,16 +91,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
"value": "START"
|
||||
},
|
||||
"sourceRange": [
|
||||
1573,
|
||||
1580,
|
||||
1747,
|
||||
1754,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
1547,
|
||||
1581,
|
||||
1721,
|
||||
1755,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -123,16 +123,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2061,
|
||||
2063,
|
||||
2235,
|
||||
2237,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
2033,
|
||||
2064,
|
||||
2207,
|
||||
2238,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -144,8 +144,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2041,
|
||||
2050,
|
||||
2215,
|
||||
2224,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -160,8 +160,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2092,
|
||||
2102,
|
||||
2266,
|
||||
2276,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -171,16 +171,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
"value": "START"
|
||||
},
|
||||
"sourceRange": [
|
||||
2104,
|
||||
2111,
|
||||
2278,
|
||||
2285,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
2078,
|
||||
2112,
|
||||
2252,
|
||||
2286,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -203,16 +203,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2592,
|
||||
2594,
|
||||
2766,
|
||||
2768,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
2564,
|
||||
2595,
|
||||
2738,
|
||||
2769,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -224,8 +224,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2572,
|
||||
2581,
|
||||
2746,
|
||||
2755,
|
||||
0
|
||||
]
|
||||
}
|
||||
@ -240,8 +240,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
2623,
|
||||
2633,
|
||||
2797,
|
||||
2807,
|
||||
0
|
||||
]
|
||||
},
|
||||
@ -251,16 +251,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
"value": "END"
|
||||
},
|
||||
"sourceRange": [
|
||||
2635,
|
||||
2640,
|
||||
2809,
|
||||
2814,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
2609,
|
||||
2641,
|
||||
2783,
|
||||
2815,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -283,16 +283,16 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
3127,
|
||||
3128,
|
||||
3301,
|
||||
3302,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
3099,
|
||||
3129,
|
||||
3273,
|
||||
3303,
|
||||
0
|
||||
],
|
||||
"type": "StdLibCall",
|
||||
@ -304,8 +304,8 @@ description: Operations executed router-template-cross-bar.kcl
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
3107,
|
||||
3116,
|
||||
3281,
|
||||
3290,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user