Kwargs: startProfileAt (#6424)
Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
This commit is contained in:
		@ -12,7 +12,7 @@ export fn buildSketch = (plane, offset) => {
 | 
			
		||||
  w = width()
 | 
			
		||||
  h = height()
 | 
			
		||||
  return startSketchOn(plane)
 | 
			
		||||
  |> startProfileAt(offset, %)
 | 
			
		||||
  |> startProfile(at = offset)
 | 
			
		||||
  |> line(end = [w, 0])
 | 
			
		||||
  |> line(end = [0, h])
 | 
			
		||||
  |> line(end = [-w, 0])
 | 
			
		||||
 | 
			
		||||
@ -79,7 +79,7 @@ async fn cache_test(
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_cache_change_grid_visualizes_grid_off_to_on() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([5.5229, 5.25217], %)
 | 
			
		||||
  |> startProfile(at = [5.5229, 5.25217])
 | 
			
		||||
  |> line(end = [10.50433, -1.19122])
 | 
			
		||||
  |> line(end = [8.01362, -5.48731])
 | 
			
		||||
  |> line(end = [-1.02877, -6.76825])
 | 
			
		||||
@ -120,7 +120,7 @@ async fn kcl_test_cache_change_grid_visualizes_grid_off_to_on() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_cache_change_grid_visualizes_grid_on_to_off() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([5.5229, 5.25217], %)
 | 
			
		||||
  |> startProfile(at = [5.5229, 5.25217])
 | 
			
		||||
  |> line(end = [10.50433, -1.19122])
 | 
			
		||||
  |> line(end = [8.01362, -5.48731])
 | 
			
		||||
  |> line(end = [-1.02877, -6.76825])
 | 
			
		||||
@ -161,7 +161,7 @@ async fn kcl_test_cache_change_grid_visualizes_grid_on_to_off() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_cache_change_highlight_edges_changes_visual() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([5.5229, 5.25217], %)
 | 
			
		||||
  |> startProfile(at = [5.5229, 5.25217])
 | 
			
		||||
  |> line(end = [10.50433, -1.19122])
 | 
			
		||||
  |> line(end = [8.01362, -5.48731])
 | 
			
		||||
  |> line(end = [-1.02877, -6.76825])
 | 
			
		||||
@ -206,7 +206,7 @@ async fn kcl_test_cache_multi_file_same_code_dont_reexecute() {
 | 
			
		||||
importedCube
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([-134.53, -56.17], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [-134.53, -56.17])
 | 
			
		||||
  |> angledLine(angle = 0, length = 79.05, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 76.28)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg01)
 | 
			
		||||
@ -220,7 +220,7 @@ sketch002 = startSketchOn(extrude001, face = seg01)
 | 
			
		||||
    let other_file = (
 | 
			
		||||
        std::path::PathBuf::from("toBeImported.kcl"),
 | 
			
		||||
        r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([281.54, 305.81], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [281.54, 305.81])
 | 
			
		||||
  |> angledLine(angle = 0, length = 123.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 85.99)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
@ -254,7 +254,7 @@ extrude(profile001, length = 100)"#
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_cache_add_line_preserves_artifact_commands() {
 | 
			
		||||
    let code = r#"sketch001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([5.5229, 5.25217], %)
 | 
			
		||||
  |> startProfile(at = [5.5229, 5.25217])
 | 
			
		||||
  |> line(end = [10.50433, -1.19122])
 | 
			
		||||
  |> line(end = [8.01362, -5.48731])
 | 
			
		||||
  |> line(end = [-1.02877, -6.76825])
 | 
			
		||||
@ -375,7 +375,7 @@ async fn kcl_test_cache_multi_file_after_empty_with_export() {
 | 
			
		||||
importedCube
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([-134.53, -56.17], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [-134.53, -56.17])
 | 
			
		||||
  |> angledLine(angle = 0, length = 79.05, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 76.28)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg01)
 | 
			
		||||
@ -389,7 +389,7 @@ sketch002 = startSketchOn(extrude001, face = seg01)
 | 
			
		||||
    let other_file = (
 | 
			
		||||
        std::path::PathBuf::from("toBeImported.kcl"),
 | 
			
		||||
        r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([281.54, 305.81], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [281.54, 305.81])
 | 
			
		||||
  |> angledLine(angle = 0, length = 123.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 85.99)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
@ -428,7 +428,7 @@ async fn kcl_test_cache_multi_file_after_empty_with_woo() {
 | 
			
		||||
importedCube
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([-134.53, -56.17], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [-134.53, -56.17])
 | 
			
		||||
  |> angledLine(angle = 0, length = 79.05, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 76.28)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg01)
 | 
			
		||||
@ -442,7 +442,7 @@ sketch002 = startSketchOn(extrude001, face = seg01)
 | 
			
		||||
    let other_file = (
 | 
			
		||||
        std::path::PathBuf::from("toBeImported.kcl"),
 | 
			
		||||
        r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([281.54, 305.81], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [281.54, 305.81])
 | 
			
		||||
  |> angledLine(angle = 0, length = 123.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 85.99)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([4.83, 12.56], %)
 | 
			
		||||
  |> startProfile(at = [4.83, 12.56])
 | 
			
		||||
  |> line(end = [15.1, 2.48])
 | 
			
		||||
  |> line(end = [3.15, -9.85], tag = $seg01)
 | 
			
		||||
  |> line(end = [-15.17, -4.1])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10], tag = $thing)
 | 
			
		||||
    |> line(end = [10, 0])
 | 
			
		||||
    |> line(end = [0, -10], tag = $thing2)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10], tag = $thing)
 | 
			
		||||
    |> line(end = [10, 0])
 | 
			
		||||
    |> line(end = [0, -10], tag = $thing2)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10], tag = $thing)
 | 
			
		||||
    |> line(end = [10, 0], tag = $thing1)
 | 
			
		||||
    |> line(end = [0, -10], tag = $thing2)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10], tag = $thing)
 | 
			
		||||
    |> line(end = [10, 0], tag = $thing1)
 | 
			
		||||
    |> line(end = [0, -10], tag = $thing2)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10], tag = $thing)
 | 
			
		||||
    |> line(end = [10, 0])
 | 
			
		||||
    |> line(end = [0, -10], tag = $thing2)
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,9 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [1, 3.82], tag = $seg01)
 | 
			
		||||
  |> angled(
 | 
			
		||||
       angle = -angleToMatchLengthX(seg01, 3, %),
 | 
			
		||||
       endAbsoluteX = 3,
 | 
			
		||||
     )
 | 
			
		||||
  |> close()
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
@ -0,0 +1,9 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [1, 3.82], tag = $seg01)
 | 
			
		||||
  |> angledLine(
 | 
			
		||||
       angle = -angleToMatchLengthY(seg01, 3, %),
 | 
			
		||||
       endAbsoluteX = 3,
 | 
			
		||||
     )
 | 
			
		||||
  |> close()
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
@ -4,7 +4,7 @@ sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = circle(sketch001, center = [154.36, 113.92], radius = 41.09)
 | 
			
		||||
extrude001 = extrude(profile001, length = 200)
 | 
			
		||||
sketch002 = startSketchOn(XY)
 | 
			
		||||
profile002 = startProfileAt([72.24, -52.05], sketch002)
 | 
			
		||||
profile002 = startProfile(sketch002, at = [72.24, -52.05])
 | 
			
		||||
  |> angledLine(angle = 0, length = 181.26, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 21.54)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $mySeg)
 | 
			
		||||
@ -19,7 +19,7 @@ extrude002 = extrude(profile002, length = 150)
 | 
			
		||||
     )
 | 
			
		||||
 | 
			
		||||
sketch003 = startSketchOn(extrude002, face = mySeg)
 | 
			
		||||
profile003 = startProfileAt([207.36, 126.19], sketch003)
 | 
			
		||||
profile003 = startProfile(sketch003, at = [207.36, 126.19])
 | 
			
		||||
  |> angledLine(angle = 0, length = 33.57, tag = $rectangleSegmentA002)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 99.11)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $seg01)
 | 
			
		||||
@ -27,7 +27,7 @@ profile003 = startProfileAt([207.36, 126.19], sketch003)
 | 
			
		||||
  |> close()
 | 
			
		||||
extrude003 = extrude(profile003, length = -20)
 | 
			
		||||
sketch004 = startSketchOn(extrude003, face = seg01)
 | 
			
		||||
profile004 = startProfileAt([-235.38, 66.16], sketch004)
 | 
			
		||||
profile004 = startProfile(sketch004, at = [-235.38, 66.16])
 | 
			
		||||
  |> angledLine(angle = 0, length = 24.21, tag = $rectangleSegmentA003)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003) - 90, length = 3.72)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003), length = -segLen(rectangleSegmentA003))
 | 
			
		||||
@ -36,7 +36,7 @@ profile004 = startProfileAt([-235.38, 66.16], sketch004)
 | 
			
		||||
extrude004 = extrude(profile004, length = 30)
 | 
			
		||||
 | 
			
		||||
sketch005 = startSketchOn(extrude002, face = seg02)
 | 
			
		||||
profile005 = startProfileAt([-129.93, -59.19], sketch005)
 | 
			
		||||
profile005 = startProfile(sketch005, at = [-129.93, -59.19])
 | 
			
		||||
  |> xLine(length = 48.79)
 | 
			
		||||
  |> line(end = [1.33, 11.03])
 | 
			
		||||
  |> xLine(length = -60.56, tag = $seg03)
 | 
			
		||||
@ -44,7 +44,7 @@ profile005 = startProfileAt([-129.93, -59.19], sketch005)
 | 
			
		||||
  |> close()
 | 
			
		||||
extrude005 = extrude(profile005, length = -10)
 | 
			
		||||
sketch006 = startSketchOn(extrude005, face = seg03)
 | 
			
		||||
profile006 = startProfileAt([-95.86, 38.73], sketch006)
 | 
			
		||||
profile006 = startProfile(sketch006, at = [-95.86, 38.73])
 | 
			
		||||
  |> angledLine(angle = 0, length = 3.48, tag = $rectangleSegmentA004)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004) - 90, length = 3.36)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004), length = -segLen(rectangleSegmentA004))
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@ const filletR = 0.25
 | 
			
		||||
 | 
			
		||||
// Sketch the bracket and extrude with fillets
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, wallMountL], tag = 'outerEdge')
 | 
			
		||||
  |> line(end = [-shelfMountL, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 2])
 | 
			
		||||
  |> line(end = [3, 1])
 | 
			
		||||
  |> line(end = [0, -4])
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ const radius = 40
 | 
			
		||||
const height = 3
 | 
			
		||||
 | 
			
		||||
const body = startSketchOn(XY)
 | 
			
		||||
      |> startProfileAt([center[0]+radius, center[1]], %)
 | 
			
		||||
      |> startProfile(at = [center[0]+radius, center[1]])
 | 
			
		||||
      |> arc(angleEnd = 360, angleStart = 0, radius = radius)
 | 
			
		||||
      |> close()
 | 
			
		||||
      |> extrude(length = height)
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ fn cube(length, center) {
 | 
			
		||||
  p3 = [ l + x, -l + y]
 | 
			
		||||
 | 
			
		||||
  return startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt(p0, %)
 | 
			
		||||
  |> startProfile(at = p0)
 | 
			
		||||
  |> line(endAbsolute = p1)
 | 
			
		||||
  |> line(endAbsolute = p2)
 | 
			
		||||
  |> line(endAbsolute = p3)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
@settings(defaultLengthUnit = in)
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([75.8, 317.2], %)
 | 
			
		||||
  |> startProfile(at = [75.8, 317.2])
 | 
			
		||||
  |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo)
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
@settings(defaultLengthUnit = in)
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([75.8, 317.2], %) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $yo)
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
// create a sketch with name sketch000
 | 
			
		||||
const sketch000 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0.0, 0.0], %)
 | 
			
		||||
  |> startProfile(at = [0.0, 0.0])
 | 
			
		||||
  |> line(end = [1.0, 1.0], tag = $line000)
 | 
			
		||||
  |> line(end = [0.0, -1.0], tag = $line001)
 | 
			
		||||
  |> line(end = [-1.0, 0.0], tag = $line002)
 | 
			
		||||
@ -18,7 +18,7 @@ const plane005 = {
 | 
			
		||||
 | 
			
		||||
// create a sketch with name sketch001
 | 
			
		||||
const sketch001 = startSketchOn(plane005)
 | 
			
		||||
  |> startProfileAt([0.100000, 0.250000], %)
 | 
			
		||||
  |> startProfile(at = [0.100000, 0.250000])
 | 
			
		||||
  |> line(end = [0.075545, 0.494260], tag = $line003)
 | 
			
		||||
  |> line(end = [0.741390, -0.113317], tag = $line004)
 | 
			
		||||
  |> line(end = [-0.816935, -0.380943], tag = $line005)
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ const tabThk = 4
 | 
			
		||||
// define a rectangular shape func
 | 
			
		||||
fn rectShape = (pos, w, l) => {
 | 
			
		||||
  const rr = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
 | 
			
		||||
    |> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge03)
 | 
			
		||||
@ -35,7 +35,7 @@ const bracketPlane = {
 | 
			
		||||
// build the bracket sketch around the body
 | 
			
		||||
fn bracketSketch = (w, d, t) => {
 | 
			
		||||
  const s = startSketchOn(bracketPlane)
 | 
			
		||||
    |> startProfileAt([-w / 2 - t, d + t], %)
 | 
			
		||||
    |> startProfile(at = [-w / 2 - t, d + t])
 | 
			
		||||
    |> line(endAbsolute = [-w / 2 - t, -t], tag = $edge1)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, -t], tag = $edge2)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, d + t], tag = $edge3)
 | 
			
		||||
@ -64,7 +64,7 @@ const bracketBody = bs
 | 
			
		||||
 | 
			
		||||
// sketch on the face
 | 
			
		||||
const retBack = startSketchOn(bs, face = bs.sketch.tags.edge4)
 | 
			
		||||
  |> startProfileAt([length / 2 + thk, 0], %)
 | 
			
		||||
  |> startProfile(at = [length / 2 + thk, 0])
 | 
			
		||||
  |> line(end = [0, thk])
 | 
			
		||||
  |> line(end = [-thk, 0])
 | 
			
		||||
  |> line(end = [0, -thk])
 | 
			
		||||
 | 
			
		||||
@ -23,10 +23,7 @@ microUsbWidth = 7.4
 | 
			
		||||
connectorPadding = 4
 | 
			
		||||
 | 
			
		||||
miniHdmiHole = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0,
 | 
			
		||||
       border + miniHdmiDistance - (miniHdmiWidth / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0, border + miniHdmiDistance - (miniHdmiWidth / 2)])
 | 
			
		||||
  |> lineTo([
 | 
			
		||||
       0,
 | 
			
		||||
       border + miniHdmiDistance + miniHdmiWidth / 2
 | 
			
		||||
@ -42,7 +39,7 @@ miniHdmiHole = startSketchOn(XY)
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
case = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(endAbsolute = [caseWidth, 0], $edge1)
 | 
			
		||||
  |> line(endAbsolute = [caseWidth, caseLength], $edge2)
 | 
			
		||||
  |> line(endAbsolute = [0, caseLength], $edge3)
 | 
			
		||||
@ -61,7 +58,7 @@ case = startSketchOn(XY)
 | 
			
		||||
 | 
			
		||||
fn m25Screw = (x, y, height) => {
 | 
			
		||||
  screw = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> circle(center= [x, y], radius=2.5)
 | 
			
		||||
    |> hole(circle(center= [x, y], radius = 1.25), %)
 | 
			
		||||
    |> extrude(length = height)
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
startProfileAt([0, 0], startSketchOn("XY"))
 | 
			
		||||
startProfile(startSketchOn("XY"), at = [0, 0])
 | 
			
		||||
  |> xLine(length = 10, tag = $line000)
 | 
			
		||||
  |> yLine(length = 10, tag = $line001)
 | 
			
		||||
  |> xLine(endAbsolute = profileStartX(%), tag = $line002)
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ const tabThk = 4
 | 
			
		||||
// define a rectangular shape func
 | 
			
		||||
fn rectShape = (pos, w, l) => {
 | 
			
		||||
  const rr = startSketchOn('xy')
 | 
			
		||||
    |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
 | 
			
		||||
    |> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge03)
 | 
			
		||||
@ -35,7 +35,7 @@ const bracketPlane = {
 | 
			
		||||
// build the bracket sketch around the body
 | 
			
		||||
fn bracketSketch = (w, d, t) => {
 | 
			
		||||
  const s = startSketchOn(bracketPlane)
 | 
			
		||||
    |> startProfileAt([-w / 2 - t, d + t], %)
 | 
			
		||||
    |> startProfile(at = [-w / 2 - t, d + t])
 | 
			
		||||
    |> line(endAbsolute = [-w / 2 - t, -t], tag = $edge1)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, -t], tag = $edge2)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, d + t], tag = $edge3)
 | 
			
		||||
@ -71,7 +71,7 @@ const tabPlane = {
 | 
			
		||||
 | 
			
		||||
// build the tabs of the mounting bracket (right side)
 | 
			
		||||
const tabsR = startSketchOn(tabPlane)
 | 
			
		||||
  |> startProfileAt([width / 2 + thk, length / 2 + thk], %)
 | 
			
		||||
  |> startProfile(at = [width / 2 + thk, length / 2 + thk])
 | 
			
		||||
  |> line(end = [tabWidth, -tabLength / 3], tag = $edge11)
 | 
			
		||||
  |> line(end = [0, -tabLength / 3 * 2], tag = $edge12)
 | 
			
		||||
  |> line(end = [-tabWidth, -tabLength / 3], tag = $edge13)
 | 
			
		||||
@ -99,7 +99,7 @@ const tabsR = startSketchOn(tabPlane)
 | 
			
		||||
 | 
			
		||||
// build the tabs of the mounting bracket (left side)
 | 
			
		||||
const tabsL = startSketchOn(tabPlane)
 | 
			
		||||
  |> startProfileAt([-width / 2 - thk, length / 2 + thk], %)
 | 
			
		||||
  |> startProfile(at = [-width / 2 - thk, length / 2 + thk])
 | 
			
		||||
  |> line(end = [-tabWidth, -tabLength / 3], tag = $edge21)
 | 
			
		||||
  |> line(end = [0, -tabLength / 3 * 2], tag = $edge22)
 | 
			
		||||
  |> line(end = [tabWidth, -tabLength / 3], tag = $edge23)
 | 
			
		||||
@ -135,7 +135,7 @@ const retPlane = {
 | 
			
		||||
 | 
			
		||||
// build the retention bump in the front
 | 
			
		||||
const retFront = startSketchOn(retPlane)
 | 
			
		||||
  |> startProfileAt([-length / 2 - thk, 0], %)
 | 
			
		||||
  |> startProfile(at = [-length / 2 - thk, 0])
 | 
			
		||||
  |> line(end = [0, thk])
 | 
			
		||||
  |> line(end = [thk, -thk])
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -143,7 +143,7 @@ const retFront = startSketchOn(retPlane)
 | 
			
		||||
 | 
			
		||||
// build the retention bump in the back
 | 
			
		||||
const retBack = startSketchOn(retPlane)
 | 
			
		||||
  |> startProfileAt([length / 2 + thk, 0], %)
 | 
			
		||||
  |> startProfile(at = [length / 2 + thk, 0])
 | 
			
		||||
  |> line(end = [0, thk])
 | 
			
		||||
  |> line(end = [-thk, 0])
 | 
			
		||||
  |> line(end = [0, -thk])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn box = (h, l, w) => {
 | 
			
		||||
 const myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, l])
 | 
			
		||||
    |> line(end = [w, 0])
 | 
			
		||||
    |> line(end = [0, -l])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn box = (p, h, l, w) => {
 | 
			
		||||
 const myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(p, %)
 | 
			
		||||
    |> startProfile(at = p)
 | 
			
		||||
    |> line(end = [0, l])
 | 
			
		||||
    |> line(end = [w, 0])
 | 
			
		||||
    |> line(end = [0, -l])
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ const tabThk = 4
 | 
			
		||||
// define a rectangular shape func
 | 
			
		||||
fn rectShape = (pos, w, l) => {
 | 
			
		||||
  const rr = startSketchOn('xy')
 | 
			
		||||
    |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
 | 
			
		||||
    |> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge03)
 | 
			
		||||
@ -35,7 +35,7 @@ const bracketPlane = {
 | 
			
		||||
// build the bracket sketch around the body
 | 
			
		||||
fn bracketSketch = (w, d, t) => {
 | 
			
		||||
  const s = startSketchOn(bracketPlane)
 | 
			
		||||
    |> startProfileAt([-w / 2 - t, d + t], %)
 | 
			
		||||
    |> startProfile(at = [-w / 2 - t, d + t])
 | 
			
		||||
    |> line(endAbsolute = [-w / 2 - t, -t], tag = $edge1)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, -t], tag = $edge2)
 | 
			
		||||
    |> line(endAbsolute = [w / 2 + t, d + t], tag = $edge3)
 | 
			
		||||
@ -71,7 +71,7 @@ const tabPlane = {
 | 
			
		||||
 | 
			
		||||
// build the tabs of the mounting bracket (right side)
 | 
			
		||||
const tabsR = startSketchOn(tabPlane)
 | 
			
		||||
  |> startProfileAt([width / 2 + thk, length / 2 + thk], %)
 | 
			
		||||
  |> startProfile(at = [width / 2 + thk, length / 2 + thk])
 | 
			
		||||
  |> line(end = [tabWidth, -tabLength / 3], tag = $edge11)
 | 
			
		||||
  |> line(end = [0, -tabLength / 3 * 2], tag = $edge12)
 | 
			
		||||
  |> line(end = [-tabWidth, -tabLength / 3], tag = $edge13)
 | 
			
		||||
@ -99,7 +99,7 @@ const tabsR = startSketchOn(tabPlane)
 | 
			
		||||
 | 
			
		||||
// build the tabs of the mounting bracket (left side)
 | 
			
		||||
const tabsL = startSketchOn(tabPlane)
 | 
			
		||||
  |> startProfileAt([-width / 2 - thk, length / 2 + thk], %)
 | 
			
		||||
  |> startProfile(at = [-width / 2 - thk, length / 2 + thk])
 | 
			
		||||
  |> line(end = [-tabWidth, -tabLength / 3], tag = $edge21)
 | 
			
		||||
  |> line(end = [0, -tabLength / 3 * 2], tag = $edge22)
 | 
			
		||||
  |> line(end = [tabWidth, -tabLength / 3], tag = $edge23)
 | 
			
		||||
@ -135,7 +135,7 @@ const retPlane = {
 | 
			
		||||
 | 
			
		||||
// build the retention bump in the front
 | 
			
		||||
const retFront = startSketchOn(retPlane)
 | 
			
		||||
  |> startProfileAt([-length / 2 - thk, 0], %)
 | 
			
		||||
  |> startProfile(at = [-length / 2 - thk, 0])
 | 
			
		||||
  |> line(end = [0, thk])
 | 
			
		||||
  |> line(end = [thk, -thk])
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -143,7 +143,7 @@ const retFront = startSketchOn(retPlane)
 | 
			
		||||
 | 
			
		||||
// build the retention bump in the back
 | 
			
		||||
const retBack = startSketchOn(retPlane)
 | 
			
		||||
  |> startProfileAt([length / 2 + thk, 0], %)
 | 
			
		||||
  |> startProfile(at = [length / 2 + thk, 0])
 | 
			
		||||
  |> line(end = [0, thk])
 | 
			
		||||
  |> line(end = [-thk, 0])
 | 
			
		||||
  |> line(end = [0, -thk])
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ let corner_radius = 5.0
 | 
			
		||||
// but I measured intentionally to not be symmetric,
 | 
			
		||||
// because your wrist isn't a perfect cylindrical surface
 | 
			
		||||
let brace_base = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([corner_radius, 0], %)
 | 
			
		||||
  |> startProfile(at = [corner_radius, 0])
 | 
			
		||||
  |> line(end = [width - corner_radius, 0.0])
 | 
			
		||||
  |> tangentialArc(end = [corner_radius, corner_radius])
 | 
			
		||||
  |> yLine(length = 25.0 - corner_radius)
 | 
			
		||||
@ -36,7 +36,7 @@ let brace_base = startSketchOn(XY)
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
let inner = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> xLine(length = 1.0)
 | 
			
		||||
  |> tangentialArc(end = [corner_radius, corner_radius])
 | 
			
		||||
  |> yLine(length = 25.0 - (corner_radius * 2))
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const svg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
 | 
			
		||||
|> line(endAbsolute = [2.52, -26.04]) // MoveAbsolute
 | 
			
		||||
|> line(endAbsolute = [2.52, -25.2]) // VerticalLineAbsolute
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ const wSegments = total_width / (wbumps + 1)
 | 
			
		||||
 | 
			
		||||
// make the base
 | 
			
		||||
const s = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-total_width / 2, -total_length / 2], %)
 | 
			
		||||
  |> startProfile(at = [-total_width / 2, -total_length / 2])
 | 
			
		||||
  |> line(end = [total_width, 0])
 | 
			
		||||
  |> line(end = [0, total_length])
 | 
			
		||||
  |> line(end = [-total_width, 0])
 | 
			
		||||
@ -28,10 +28,7 @@ const s = startSketchOn(XY)
 | 
			
		||||
  |> extrude(length = height)
 | 
			
		||||
 | 
			
		||||
const shellExtrude = startSketchOn(s, face = "start")
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -(total_width / 2 - t),
 | 
			
		||||
       -(total_length / 2 - t)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-(total_width / 2 - t), -(total_length / 2 - t)])
 | 
			
		||||
  |> line(end = [total_width - (2 * t), 0])
 | 
			
		||||
  |> line(end = [0, total_length - (2 * t)])
 | 
			
		||||
  |> line(end = [-(total_width - (2 * t)), 0])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 2])
 | 
			
		||||
  |> line(end = [3, 1])
 | 
			
		||||
  |> line(end = [0, -4])
 | 
			
		||||
 | 
			
		||||
@ -101,7 +101,7 @@ fn F = (state, F) => {
 | 
			
		||||
 | 
			
		||||
fn LSystem = (args, axioms) => {
 | 
			
		||||
    myThing = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
  return axioms({
 | 
			
		||||
    depthMax: args.iterations,
 | 
			
		||||
    depth: 0,
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn square = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0.0, 0.0], %)
 | 
			
		||||
  |> startProfile(at = [0.0, 0.0])
 | 
			
		||||
  |> line(end = [-0.3670208139314082, 0.21201331909674526])
 | 
			
		||||
  |> line(end = [-0.4707511307971115, 0.4905279615419764])
 | 
			
		||||
  |> line(end = [-0.8328324229085962, 0.4677492878818803])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
part001 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(endAbsolute = [100, 100])
 | 
			
		||||
  |> line(endAbsolute = [100, 0])
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ const length = 12
 | 
			
		||||
 | 
			
		||||
fn box = (sk1, sk2, scale) => {
 | 
			
		||||
  const boxSketch = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([sk1, sk2], %)
 | 
			
		||||
    |> startProfile(at = [sk1, sk2])
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
 | 
			
		||||
@ -2,4 +2,4 @@ export fn foo = () => { return 0 }
 | 
			
		||||
 | 
			
		||||
// This interacts with the engine.
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ const plane94894440791888 = {
 | 
			
		||||
 | 
			
		||||
// create a sketch with UID 94894440902176
 | 
			
		||||
const sketch94894440902176 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([-0.005, -0.005], %)
 | 
			
		||||
  |> startProfile(at = [-0.005, -0.005])
 | 
			
		||||
  |> line(end = [0.01, 0.0], tag = $line94894439494384)
 | 
			
		||||
  |> line(end = [0.0, 0.01], tag = $line94894439429616)
 | 
			
		||||
  |> line(end = [-0.01, 0.0], tag = $line94894439638160)
 | 
			
		||||
@ -27,10 +27,7 @@ const extrude94894439487136 = extrude(sketch94894440902176, length = 0.01)
 | 
			
		||||
 | 
			
		||||
// create a sketch with UID 94894439448464
 | 
			
		||||
const sketch94894439448464 = startSketchOn(plane94894440791888)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0.00074557205559017,
 | 
			
		||||
       0.00306415853984399
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0.00074557205559017, 0.00306415853984399])
 | 
			
		||||
  |> line(end = [0.004999999999999999, 0.0], tag = $line94894440230336)
 | 
			
		||||
  |> line(end = [0.0, -0.005], tag = $line94894439497168)
 | 
			
		||||
  |> line(end = [-0.004999999999999999, 0.0], tag = $line94894439496768)
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@ const plane94894440791888 = {
 | 
			
		||||
 | 
			
		||||
// create a sketch with UID 94894440902176
 | 
			
		||||
const sketch94894440902176 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([-0.005, -0.005], %)
 | 
			
		||||
  |> startProfile(at = [-0.005, -0.005])
 | 
			
		||||
  |> line(end = [0.01, 0.0], tag = $line94894439494384)
 | 
			
		||||
  |> line(end = [0.0, 0.01], tag = $line94894439429616)
 | 
			
		||||
  |> line(end = [-0.01, 0.0], tag = $line94894439638160)
 | 
			
		||||
@ -24,10 +24,7 @@ const sketch94894440902176 = startSketchOn('-XZ')
 | 
			
		||||
 | 
			
		||||
// create a sketch with UID 94894439448464
 | 
			
		||||
const sketch94894439448464 = startSketchOn(plane94894440791888)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0.00074557205559017,
 | 
			
		||||
       0.00306415853984399
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0.00074557205559017, 0.00306415853984399])
 | 
			
		||||
  |> line(end = [0.004999999999999999, 0.0], tag = $line94894440230336)
 | 
			
		||||
  |> line(end = [0.0, -0.005], tag = $line94894439497168)
 | 
			
		||||
  |> line(end = [-0.004999999999999999, 0.0], tag = $line94894439496768)
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ const leg1 = 5 // inches
 | 
			
		||||
const leg2 = 8 // inches
 | 
			
		||||
const thickness = sqrt(distance * p * FOS * 6 / sigmaAllow / width) // inches
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, leg1])
 | 
			
		||||
  |> line(end = [leg2, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ const shelfMountL = 9
 | 
			
		||||
const wallMountL = 8
 | 
			
		||||
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, wallMountL])
 | 
			
		||||
  |> tangentialArc(
 | 
			
		||||
    radius = filletR,
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ let radius = 80
 | 
			
		||||
 | 
			
		||||
let triangleLen = 500
 | 
			
		||||
const p = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 60, length = triangleLen, tag = $a)
 | 
			
		||||
  |> angledLine(angle = 180, length = triangleLen, tag = $b)
 | 
			
		||||
  |> angledLine(angle = 300, length = triangleLen, tag = $c)
 | 
			
		||||
@ -12,7 +12,7 @@ const p = startSketchOn(XY)
 | 
			
		||||
 | 
			
		||||
fn circl = (x, face) => {
 | 
			
		||||
return startSketchOn(p, face = face)
 | 
			
		||||
  |> startProfileAt([x + radius, triangleHeight/2], %)
 | 
			
		||||
  |> startProfile(at = [x + radius, triangleHeight/2])
 | 
			
		||||
    |> arc(
 | 
			
		||||
         angleStart = 0,
 | 
			
		||||
         angleEnd = 360,
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ fn cube = (length, center) => {
 | 
			
		||||
  let p3 = [ l + x, -l + y]
 | 
			
		||||
 | 
			
		||||
  return startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt(p0, %)
 | 
			
		||||
  |> startProfile(at = p0)
 | 
			
		||||
  |> line(endAbsolute = p1)
 | 
			
		||||
  |> line(endAbsolute = p2)
 | 
			
		||||
  |> line(endAbsolute = p3)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const svg =  startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
 | 
			
		||||
|> line(endAbsolute = [22.687663, -2.7664351]) // MoveRelative
 | 
			
		||||
|> line(endAbsolute = [15.687664000000002, -5.7664351]) // MoveRelative
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										52
									
								
								rust/kcl-lib/e2e/executor/inputs/poop_chute.kcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								rust/kcl-lib/e2e/executor/inputs/poop_chute.kcl
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,52 @@
 | 
			
		||||
wall_thickness = 0.125
 | 
			
		||||
back_walls_width = 2
 | 
			
		||||
front_walls_width = 2.5
 | 
			
		||||
height = 5.5
 | 
			
		||||
filletRadius = 0.050
 | 
			
		||||
back_length = 7
 | 
			
		||||
exit_height = 1
 | 
			
		||||
front_length = 6
 | 
			
		||||
Fx = 0.5
 | 
			
		||||
Fy = 0.5
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn('-YZ')
 | 
			
		||||
  |> startProfile(at = [back_walls_width / 2, 0])
 | 
			
		||||
  |> xLine(length = wall_thickness / 2)
 | 
			
		||||
  |> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg01)
 | 
			
		||||
  |> yLine(endAbsolute = height)
 | 
			
		||||
  |> xLine(length = -wall_thickness)
 | 
			
		||||
  |> yLine(endAbsolute = segEndY(seg01))
 | 
			
		||||
  |> angledLine(angle = 45, endAbsoluteX = back_walls_width / 2 + wall_thickness / 2)
 | 
			
		||||
  |> xLine(length = -wall_thickness)
 | 
			
		||||
  |> angledLine(angle = 180 - 45, endAbsoluteX = wall_thickness)
 | 
			
		||||
  |> yLine(endAbsolute = height)
 | 
			
		||||
  |> xLine(endAbsolute = 0)
 | 
			
		||||
  |> yLine(endAbsolute = segEndY(seg01))
 | 
			
		||||
  |> angledLine(angle = 180 - 45, endAbsoluteY = 0)
 | 
			
		||||
  |> close()
 | 
			
		||||
part001 = revolve({
 | 
			
		||||
  angle: 90,
 | 
			
		||||
  axis: {
 | 
			
		||||
    custom: {
 | 
			
		||||
      axis: [1.0, 0.0],
 | 
			
		||||
      origin: [0.0, height + .0000001]
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}, sketch001)
 | 
			
		||||
 | 
			
		||||
sketch002 = startSketchOn('-YZ')
 | 
			
		||||
  |> startProfile(at = [back_walls_width / 2, 0])
 | 
			
		||||
  |> xLine(length = wall_thickness / 2)
 | 
			
		||||
  |> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg02)
 | 
			
		||||
  |> yLine(endAbsolute = height)
 | 
			
		||||
  |> xLine(length = -wall_thickness)
 | 
			
		||||
  |> yLine(endAbsolute = segEndY(seg01))
 | 
			
		||||
  |> angledLine(angle = 45, endAbsoluteX = back_walls_width / 2 + wall_thickness / 2)
 | 
			
		||||
  |> xLine(length = -wall_thickness)
 | 
			
		||||
  |> angledLine(angle = 180 - 45, endAbsoluteX = wall_thickness)
 | 
			
		||||
  |> yLine(endAbsolute = height)
 | 
			
		||||
  |> xLine(endAbsolute = 0)
 | 
			
		||||
  |> yLine(endAbsolute = segEndY(seg02))
 | 
			
		||||
  |> angledLine(angle = 180 - 45, endAbsoluteY = 0)
 | 
			
		||||
  |> close()
 | 
			
		||||
  |> extrude(length = back_length - height)
 | 
			
		||||
@ -7,7 +7,7 @@ fn p = (xs, ys) => {
 | 
			
		||||
  let ox = 35 - (m(xs) % 70)
 | 
			
		||||
  let oy = 35 - (m(ys) % 70)
 | 
			
		||||
  const r = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([ox, oy], %)
 | 
			
		||||
  |> startProfile(at = [ox, oy])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, -1])
 | 
			
		||||
  |> line(end = [-1, 0])
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ let ys = 71816
 | 
			
		||||
  let ox = 35 - (t(xs) % 70)
 | 
			
		||||
  let oy = 35 - (t(ys) % 70)
 | 
			
		||||
  const r = startSketchOn(XZ)
 | 
			
		||||
    |> startProfileAt([ox, oy], %)
 | 
			
		||||
    |> startProfile(at = [ox, oy])
 | 
			
		||||
    |> line(end = [1, 0])
 | 
			
		||||
    |> line(end = [0, -1])
 | 
			
		||||
    |> line(end = [-1, 0])
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@ const depth = 30
 | 
			
		||||
const length001 = slateWidthHalf - radius
 | 
			
		||||
const length002 = depth + minClampingDistance
 | 
			
		||||
const sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, depth - templateGap], %)
 | 
			
		||||
  |> startProfile(at = [0, depth - templateGap])
 | 
			
		||||
  |> xLine(length = length001, tag = $seg01)
 | 
			
		||||
  |> arc(
 | 
			
		||||
       angleEnd = 0,
 | 
			
		||||
@ -34,10 +34,7 @@ const sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> close()
 | 
			
		||||
const extrude001 = extrude(sketch001, length = 5)
 | 
			
		||||
const sketch002 = startSketchOn(extrude001, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -slateWidthHalf,
 | 
			
		||||
       -templateGap * 2 - (templateDiameter / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-slateWidthHalf, -templateGap * 2 - (templateDiameter / 2)])
 | 
			
		||||
  |> xLine(length = -7, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001, %) + 90, length = minClampingDistance, tag = $rectangleSegmentB001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001, %), length = -segLen(rectangleSegmentA001, %), tag = $rectangleSegmentC001)
 | 
			
		||||
@ -45,10 +42,7 @@ const sketch002 = startSketchOn(extrude001, face = 'START')
 | 
			
		||||
  |> close()
 | 
			
		||||
const extrude002 = extrude(sketch002, length = 7.5)
 | 
			
		||||
const sketch003 = startSketchOn(extrude001, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       slateWidthHalf,
 | 
			
		||||
       -templateGap * 2 - (templateDiameter / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [slateWidthHalf, -templateGap * 2 - (templateDiameter / 2)])
 | 
			
		||||
  |> xLine(length = 7, tag = $rectangleSegmentA002)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002, %) - 90, length = minClampingDistance)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002, %), length = -segLen(rectangleSegmentA002, %))
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn rect = (origin) => {
 | 
			
		||||
  return startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt(origin, %)
 | 
			
		||||
  |> startProfile(at = origin)
 | 
			
		||||
  |> angledLine(
 | 
			
		||||
       angle = 0,
 | 
			
		||||
       length = 191.26,
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,7 @@ fn caster = (originStart) => {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const sketch001c = startSketchOn(plane001c)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> xLine(length = 3.543)
 | 
			
		||||
    |> yLine(length = 3.543)
 | 
			
		||||
    |> xLine(length = -3.543)
 | 
			
		||||
@ -47,7 +47,7 @@ fn caster = (originStart) => {
 | 
			
		||||
    |> extrude(length = -.25)
 | 
			
		||||
 | 
			
		||||
  const sketch002c = startSketchOn(sketch001c, face = 'START')
 | 
			
		||||
    |> startProfileAt([-originStart[0], 2.2 + originStart[1]], %)
 | 
			
		||||
    |> startProfile(at = [-originStart[0], 2.2 + originStart[1]])
 | 
			
		||||
    |> arc(
 | 
			
		||||
         angle_start = 30,
 | 
			
		||||
         angle_end = 330,
 | 
			
		||||
@ -103,7 +103,7 @@ const plane001 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch001l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> xLine(length = serverDepth + .8)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -serverDepth + 2 - .8, tag = $seg01)
 | 
			
		||||
@ -112,7 +112,7 @@ const sketch001l = startSketchOn(plane001)
 | 
			
		||||
const extrude001l = extrude(sketch001l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch002l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([serverDepth + .8, 0], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth + .8, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = -135, endAbsoluteX = serverDepth - 1 + .8)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -121,10 +121,7 @@ const sketch002l = startSketchOn(plane001)
 | 
			
		||||
const extrude002l = extrude(sketch002l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch003l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       serverDepth + .8,
 | 
			
		||||
       railHeight * 1.75 + 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth + .8, railHeight * 1.75 + 2])
 | 
			
		||||
  |> xLine(length = -serverDepth - .8, tag = $seg02)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = railHeight * 1.75 - 1 + 2)
 | 
			
		||||
  |> xLine(length = serverDepth - 2 + .8)
 | 
			
		||||
@ -133,7 +130,7 @@ const sketch003l = startSketchOn(plane001)
 | 
			
		||||
const extrude003l = extrude(sketch003l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch004l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = 135, endAbsoluteY = railHeight * 1.75 + 2 - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -142,7 +139,7 @@ const sketch004l = startSketchOn(plane001)
 | 
			
		||||
const extrude004l = extrude(sketch004l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch005l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([serverDepth - 1.25, 1], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth - 1.25, 1])
 | 
			
		||||
  |> line(end = [-serverDepth + 2.25, railHeight * 1.75], tag = $lineToIntersect4)
 | 
			
		||||
  |> xLine(length = 1)
 | 
			
		||||
  |> line(end = [serverDepth - 2.25, -railHeight * 1.75], tag = $lineToIntersect5)
 | 
			
		||||
@ -151,7 +148,7 @@ const sketch005l = startSketchOn(plane001)
 | 
			
		||||
const extrude005l = extrude(sketch005l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([1, 1], %)
 | 
			
		||||
  |> startProfile(at = [1, 1])
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
       angle = 70,
 | 
			
		||||
       intersectTag = lineToIntersect4,
 | 
			
		||||
@ -164,10 +161,7 @@ const sketch006l = startSketchOn(plane001)
 | 
			
		||||
const extrude006l = extrude(sketch006l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       serverDepth - 1.2,
 | 
			
		||||
       railHeight * 1.75 + 1
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth - 1.2, railHeight * 1.75 + 1])
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
       angle = 70,
 | 
			
		||||
       intersectTag = lineToIntersect5,
 | 
			
		||||
@ -192,7 +186,7 @@ const plane002 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch001w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> xLine(length = depth)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -depth + 2, tag = $seg01w)
 | 
			
		||||
@ -201,7 +195,7 @@ const sketch001w = startSketchOn(plane002)
 | 
			
		||||
const extrude001w = extrude(sketch001w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch002w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth, 0], %)
 | 
			
		||||
  |> startProfile(at = [depth, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = -135, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -210,7 +204,7 @@ const sketch002w = startSketchOn(plane002)
 | 
			
		||||
const extrude002w = extrude(sketch002w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch003w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth, railHeight * 1.75 + 2], %)
 | 
			
		||||
  |> startProfile(at = [depth, railHeight * 1.75 + 2])
 | 
			
		||||
  |> xLine(length = -depth, tag = $seg02w)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = railHeight * 1.75 - 1 + 2)
 | 
			
		||||
  |> xLine(length = depth - 2)
 | 
			
		||||
@ -219,7 +213,7 @@ const sketch003w = startSketchOn(plane002)
 | 
			
		||||
const extrude003w = extrude(sketch003w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch004w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = 135, endAbsoluteY = railHeight * 1.75 + 2 - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -228,7 +222,7 @@ const sketch004w = startSketchOn(plane002)
 | 
			
		||||
const extrude004w = extrude(sketch004w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch005w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 40.6 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 40.6 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 35.5 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90 + 45, length = 1.413 )
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1, tag = $lineToIntersect)
 | 
			
		||||
@ -237,10 +231,7 @@ const sketch005w = startSketchOn(plane002)
 | 
			
		||||
const extrude005w = extrude(sketch005w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 35.5 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 35.5 * cos(23 * pi() / 180), 40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 + 90, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = 2.56)
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
@ -254,7 +245,7 @@ const sketch006w = startSketchOn(plane002)
 | 
			
		||||
const extrude006w = extrude(sketch006w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1, 60.65 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = 34.93 , tag = $lineToIntersect3)
 | 
			
		||||
  |> angledLine(angle = 23 - 90, length = 1.414 )
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
@ -267,7 +258,7 @@ const sketch007w = startSketchOn(plane002)
 | 
			
		||||
const extrude007w = extrude(sketch007w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch008w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 41.7 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 41.7 + 1.75 / 2])
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
       angle = -23 + 90,
 | 
			
		||||
       intersectTag = lineToIntersect3,
 | 
			
		||||
@ -284,7 +275,7 @@ const sketch008w = startSketchOn(plane002)
 | 
			
		||||
const extrude008w = extrude(sketch008w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch009w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [31.2, 33.3 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 90 - 23, length = 28 )
 | 
			
		||||
  |> angledLine(angle = -23 + 45, length = -1.414 )
 | 
			
		||||
@ -293,7 +284,7 @@ const sketch009w = startSketchOn(plane002)
 | 
			
		||||
const extrude009w = extrude(sketch009w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch010w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [31.2, 33.3 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 180 - 23, length = 28 )
 | 
			
		||||
  |> angledLine(angle = -23 + 45, length = 1.414 )
 | 
			
		||||
@ -302,10 +293,7 @@ const sketch010w = startSketchOn(plane002)
 | 
			
		||||
const extrude010w = extrude(sketch010w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch011w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       31.2 - ((28 - 2) * cos(23 * pi() / 180)),
 | 
			
		||||
       33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [31.2 - ((28 - 2) * cos(23 * pi() / 180)), 33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = 90 - 23, length = 28 - 2 )
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = -1.414 )
 | 
			
		||||
  |> angledLine(angle = 90 - 23 + 180, length = 28 )
 | 
			
		||||
@ -314,10 +302,7 @@ const sketch011w = startSketchOn(plane002)
 | 
			
		||||
const extrude011w = extrude(sketch011w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch012w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       31.2 + (28 - 2) * sin(23 * pi() / 180),
 | 
			
		||||
       33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [31.2 + (28 - 2) * sin(23 * pi() / 180), 33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = 180 - 23, length = 28 - 2 )
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = -1.414 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 28 )
 | 
			
		||||
@ -326,10 +311,7 @@ const sketch012w = startSketchOn(plane002)
 | 
			
		||||
const extrude012w = extrude(sketch012w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch013w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 4 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 4 * cos(23 * pi() / 180), 40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, endAbsoluteX = 1)
 | 
			
		||||
  |> yLine(length = 2.56)
 | 
			
		||||
@ -338,10 +320,7 @@ const sketch013w = startSketchOn(plane002)
 | 
			
		||||
const extrude013w = extrude(sketch013w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch014w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 12 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 12 * cos(23 * pi() / 180), 40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -350,10 +329,7 @@ const sketch014w = startSketchOn(plane002)
 | 
			
		||||
const extrude014w = extrude(sketch014w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch015w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.55 - 8) * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.55 - 8) * cos(23 * pi() / 180), 40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -362,10 +338,7 @@ const sketch015w = startSketchOn(plane002)
 | 
			
		||||
const extrude015w = extrude(sketch015w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch016w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.5) * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.5) * cos(23 * pi() / 180), 40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -374,10 +347,7 @@ const sketch016w = startSketchOn(plane002)
 | 
			
		||||
const extrude016w = extrude(sketch016w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch017w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       depth - 1 - (3.7 * cos(23 * pi() / 180)),
 | 
			
		||||
       60.65 + 3.7 * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1 - (3.7 * cos(23 * pi() / 180)), 60.65 + 3.7 * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> arc(angleStart = -23, angleEnd = 180 - 23, radius = 7 / 2 + 2)
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = -1 )
 | 
			
		||||
  |> arc(angleStart = 180 - 23, angleEnd = -23, radius = 7 / 2 + 1)
 | 
			
		||||
@ -386,10 +356,7 @@ const sketch017w = startSketchOn(plane002)
 | 
			
		||||
const extrude017w = extrude(sketch017w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch018w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       depth - 1 - (19.3 * cos(23 * pi() / 180)),
 | 
			
		||||
       60.65 + 19.3 * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1 - (19.3 * cos(23 * pi() / 180)), 60.65 + 19.3 * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> arc(angleStart = -23, angleEnd = 180 - 23, radius = 7 / 2 + 2)
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = -1 )
 | 
			
		||||
  |> arc(angleStart = 180 - 23, angleEnd = -23, radius = 7 / 2 + 1)
 | 
			
		||||
@ -398,7 +365,7 @@ const sketch018w = startSketchOn(plane002)
 | 
			
		||||
const extrude018w = extrude(sketch018w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch019w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 27.8 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 27.8 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 7 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, length = -1 )
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -407,10 +374,7 @@ const sketch019w = startSketchOn(plane002)
 | 
			
		||||
const extrude019w = extrude(sketch019w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch020w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.53 - 12) * cos(23 * pi() / 180),
 | 
			
		||||
       27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.53 - 12) * cos(23 * pi() / 180), 27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))])
 | 
			
		||||
  |> angledLine(angle = -23, length = 7 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, length = -1 )
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = 7 )
 | 
			
		||||
@ -419,7 +383,7 @@ const sketch020w = startSketchOn(plane002)
 | 
			
		||||
const extrude020w = extrude(sketch020w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch021w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 21.9], %)
 | 
			
		||||
  |> startProfile(at = [1, 21.9])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = -1.1)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -428,7 +392,7 @@ const sketch021w = startSketchOn(plane002)
 | 
			
		||||
const extrude021w = extrude(sketch021w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch022w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth - 1, 74.1], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1, 74.1])
 | 
			
		||||
  |> angledLine(angle = 180 - 23, endAbsoluteY = railHeight * 1.75 + 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = depth - 1)
 | 
			
		||||
@ -437,7 +401,7 @@ const sketch022w = startSketchOn(plane002)
 | 
			
		||||
const extrude022w = extrude(sketch022w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch023w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 69.53 + 1.75], %)
 | 
			
		||||
  |> startProfile(at = [1, 69.53 + 1.75])
 | 
			
		||||
  |> angledLine(angle = 90 - 23, endAbsoluteY = railHeight * 1.75 + 1)
 | 
			
		||||
  |> xLine(length = 1.086)
 | 
			
		||||
  |> angledLine(angle = 90 - 23, endAbsoluteX = 1)
 | 
			
		||||
@ -446,7 +410,7 @@ const sketch023w = startSketchOn(plane002)
 | 
			
		||||
const extrude023w = extrude(sketch023w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch024w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 16.5], %)
 | 
			
		||||
  |> startProfile(at = [1, 16.5])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -455,7 +419,7 @@ const sketch024w = startSketchOn(plane002)
 | 
			
		||||
const extrude024w = extrude(sketch024w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch025w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 4], %)
 | 
			
		||||
  |> startProfile(at = [1, 4])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -472,7 +436,7 @@ const plane003 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch005 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, 0], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -482,7 +446,7 @@ const sketch005 = startSketchOn(plane003)
 | 
			
		||||
const extrude005 = extrude(sketch005, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, 0 + 2.756], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0 + 2.756])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -492,7 +456,7 @@ const sketch006 = startSketchOn(plane003)
 | 
			
		||||
const extrude006 = extrude(sketch006, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, depth], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth])
 | 
			
		||||
  |> line(end = [-width + 1, -depth + serverDepth + 3.8])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, -.75])
 | 
			
		||||
@ -505,7 +469,7 @@ const sketch007 = startSketchOn(plane003)
 | 
			
		||||
const extrude007 = extrude(sketch007, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch008 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, depth - 2.8], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth - 2.8])
 | 
			
		||||
  |> line(end = [-width + 2, -depth + serverDepth + 4.4])
 | 
			
		||||
  |> line(end = [0, -1.32])
 | 
			
		||||
  |> line(end = [width - 2, depth - serverDepth - 4.4])
 | 
			
		||||
@ -523,7 +487,7 @@ const plane004 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch005t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, 0], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -533,7 +497,7 @@ const sketch005t = startSketchOn(plane004)
 | 
			
		||||
const extrude005t = extrude(sketch005t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch007t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, depth], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth])
 | 
			
		||||
  |> line(end = [-width + 1, -depth + serverDepth + 3.8])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, -.75])
 | 
			
		||||
@ -546,7 +510,7 @@ const sketch007t = startSketchOn(plane004)
 | 
			
		||||
const extrude007t = extrude(sketch007t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch008t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, 0 + 2.756], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0 + 2.756])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -555,7 +519,7 @@ const sketch008t = startSketchOn(plane004)
 | 
			
		||||
const extrude008t = extrude(sketch008t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch009t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, depth - 2.8], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth - 2.8])
 | 
			
		||||
  |> line(end = [-width + 2, -depth + serverDepth + 4.4])
 | 
			
		||||
  |> line(end = [0, -1.32])
 | 
			
		||||
  |> line(end = [width - 2, depth - serverDepth - 4.4])
 | 
			
		||||
@ -589,7 +553,7 @@ const planeYZfl = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001fl = startSketchOn(planeXZfl)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fl) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fl), length = -segLen(rectangleSegmentA001fl), tag = $rectangleSegmentC001fl)
 | 
			
		||||
@ -599,7 +563,7 @@ const extrude001fl = extrude(sketch001fl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002fl = startSketchOn(planeYZfl)
 | 
			
		||||
  |> startProfileAt([-bendRad - thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [-bendRad - thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fl) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fl), length = -segLen(rectangleSegmentA002fl), tag = $rectangleSegmentC002fl)
 | 
			
		||||
@ -610,7 +574,7 @@ const extrude002fl = extrude(sketch002fl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003fl = startSketchOn(planeXYfl)
 | 
			
		||||
  |> startProfileAt([0 + thickness + bendRad+originStart[1], originStart[0]], %)
 | 
			
		||||
  |> startProfile(at = [0 + thickness + bendRad+originStart[1], originStart[0]])
 | 
			
		||||
  |> arc(angleStart = 270, angleEnd = 180, radius = bendRad + thickness)
 | 
			
		||||
  |> xLine(length = thickness)
 | 
			
		||||
  |> arc(angleStart = 180, angleEnd = 270, radius = bendRad)
 | 
			
		||||
@ -621,7 +585,7 @@ const extrude003fl = extrude(sketch003fl, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch004fl = startSketchOn(extrude002fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([0.72 + originStart[1], originStart[2] + 0.15], %)
 | 
			
		||||
  |> startProfile(at = [0.72 + originStart[1], originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA003fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003fl) - 90, length = 0.375, tag = $rectangleSegmentB003fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003fl), length = -segLen(rectangleSegmentA003fl), tag = $rectangleSegmentC003fl)
 | 
			
		||||
@ -636,7 +600,7 @@ const extrude004fl = extrude(sketch004fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch005fl = startSketchOn(extrude002fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([0.72 + originStart[1],originStart[2] +  0.15 + .62], %)
 | 
			
		||||
  |> startProfile(at = [0.72 + originStart[1],originStart[2] +  0.15 + .62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA004fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004fl) - 90, length = 0.375, tag = $rectangleSegmentB004fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004fl), length = -segLen(rectangleSegmentA004fl), tag = $rectangleSegmentC004fl)
 | 
			
		||||
@ -651,10 +615,7 @@ const extrude005fl = extrude(sketch005fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch006fl = startSketchOn(extrude002fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0.72 + originStart[1],
 | 
			
		||||
      originStart[2] + 0.15 + 0.62 + 0.50
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0.72 + originStart[1], originStart[2] + 0.15 + 0.62 + 0.50])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA005fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005fl) - 90, length = 0.375, tag = $rectangleSegmentB005fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005fl), length = -segLen(rectangleSegmentA005fl), tag = $rectangleSegmentC005fl)
 | 
			
		||||
@ -669,7 +630,7 @@ const extrude006fl = extrude(sketch006fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch007fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([-1.45 - originStart[0], originStart[2] + 0.15], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0], originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA006fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006fl) - 90, length = 0.375, tag = $rectangleSegmentB006fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006fl), length = -segLen(rectangleSegmentA006fl), tag = $rectangleSegmentC006fl)
 | 
			
		||||
@ -684,7 +645,7 @@ const extrude007fl = extrude(sketch007fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch008fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([-1.45 - originStart[0],originStart[2] + 0.15 + 0.62], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0],originStart[2] + 0.15 + 0.62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA007fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007fl) - 90, length = 0.375, tag = $rectangleSegmentB007fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007fl), length = -segLen(rectangleSegmentA007fl), tag = $rectangleSegmentC007fl)
 | 
			
		||||
@ -699,10 +660,7 @@ const extrude008fl = extrude(sketch008fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch009fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.45 - originStart[0],
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.5
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0], originStart[2] + 0.15 + 0.62 + 0.5])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA008fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008fl) - 90, length = 0.375, tag = $rectangleSegmentB008fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008fl), length = -segLen(rectangleSegmentA008fl), tag = $rectangleSegmentC008fl)
 | 
			
		||||
@ -717,10 +675,7 @@ const extrude009fl = extrude(sketch009fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [-0.66 - originStart[0],originStart[2] +  .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = -0.75 + .438)
 | 
			
		||||
@ -735,10 +690,7 @@ const extrude010fl = extrude(sketch010fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
      originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -752,10 +704,10 @@ const extrude011fl = extrude(sketch011fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
  |> startProfile(at = [
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] +
 | 
			
		||||
       railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
     ])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0], originStart[2]+
 | 
			
		||||
@ -804,7 +756,7 @@ const planeYZfr = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001fr = startSketchOn(planeXZfr)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fr) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fr), length = -segLen(rectangleSegmentA001fr), tag = $rectangleSegmentC001fr)
 | 
			
		||||
@ -814,7 +766,7 @@ const extrude001fr = extrude(sketch001fr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002fr = startSketchOn(planeYZfr)
 | 
			
		||||
  |> startProfileAt([0.89, 0], %)
 | 
			
		||||
  |> startProfile(at = [0.89, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fr) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fr), length = -segLen(rectangleSegmentA002fr), tag = $rectangleSegmentC002fr)
 | 
			
		||||
@ -825,10 +777,7 @@ const extrude002fr = extrude(sketch002fr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003fr = startSketchOn(planeXYfr)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + width - 2 - thickness - bendRad,
 | 
			
		||||
       originStart[0] + bendRad + thickness
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + width - 2 - thickness - bendRad, originStart[0] + bendRad + thickness])
 | 
			
		||||
  |> arc(angleStart = 0, angleEnd = -90, radius = bendRad)
 | 
			
		||||
  |> yLine(length = -thickness)
 | 
			
		||||
  |> arc(angleStart = -90, angleEnd = 0, radius = bendRad + thickness)
 | 
			
		||||
@ -838,10 +787,7 @@ const extrude003fr = extrude(sketch003fr, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch004fr = startSketchOn(extrude002fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA003fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003fr) - 90, length = 0.375, tag = $rectangleSegmentB003fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003fr), length = -segLen(rectangleSegmentA003fr), tag = $rectangleSegmentC003fr)
 | 
			
		||||
@ -856,10 +802,7 @@ const extrude004fr = extrude(sketch004fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch005fr = startSketchOn(extrude002fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15 + .62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15 + .62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA004fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004fr) - 90, length = 0.375, tag = $rectangleSegmentB004fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004fr), length = -segLen(rectangleSegmentA004fr), tag = $rectangleSegmentC004fr)
 | 
			
		||||
@ -874,10 +817,7 @@ const extrude005fr = extrude(sketch005fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch006fr = startSketchOn(extrude002fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.50
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15 + 0.62 + 0.50])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA005fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005fr) - 90, length = 0.375, tag = $rectangleSegmentB005fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005fr), length = -segLen(rectangleSegmentA005fr), tag = $rectangleSegmentC005fr)
 | 
			
		||||
@ -892,10 +832,7 @@ const extrude006fr = extrude(sketch006fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch007fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.45 - originStart[0],
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0], originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA006fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006fr) - 90, length = 0.375, tag = $rectangleSegmentB006fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006fr), length = -segLen(rectangleSegmentA006fr), tag = $rectangleSegmentC006fr)
 | 
			
		||||
@ -910,10 +847,7 @@ const extrude007fr = extrude(sketch007fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch008fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.45 - originStart[0],
 | 
			
		||||
       originStart[2] + 0.15 + 0.62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0], originStart[2] + 0.15 + 0.62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA007fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007fr) - 90, length = 0.375, tag = $rectangleSegmentB007fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007fr), length = -segLen(rectangleSegmentA007fr), tag = $rectangleSegmentC007fr)
 | 
			
		||||
@ -928,10 +862,7 @@ const extrude008fr = extrude(sketch008fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch009fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.45 - originStart[0],
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.5
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.45 - originStart[0], originStart[2] + 0.15 + 0.62 + 0.5])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA008fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008fr) - 90, length = 0.375, tag = $rectangleSegmentB008fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008fr), length = -segLen(rectangleSegmentA008fr), tag = $rectangleSegmentC008fr)
 | 
			
		||||
@ -946,10 +877,7 @@ const extrude009fr = extrude(sketch009fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -967,10 +895,7 @@ const extrude010fr = extrude(sketch010fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -984,10 +909,7 @@ const extrude011fr = extrude(sketch011fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -1036,7 +958,7 @@ const planeYZrr = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001rr = startSketchOn(planeXZrr)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rr) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rr), length = -segLen(rectangleSegmentA001rr), tag = $rectangleSegmentC001rr)
 | 
			
		||||
@ -1046,7 +968,7 @@ const extrude001rr = extrude(sketch001rr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002rr = startSketchOn(planeYZrr)
 | 
			
		||||
  |> startProfileAt([0.89, 0], %)
 | 
			
		||||
  |> startProfile(at = [0.89, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rr) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rr), length = -segLen(rectangleSegmentA002rr), tag = $rectangleSegmentC002rr)
 | 
			
		||||
@ -1057,10 +979,7 @@ const extrude002rr = extrude(sketch002rr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003rr = startSketchOn(planeXYrr)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + width - 2-bendRad,
 | 
			
		||||
       originStart[0]-bendRad
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + width - 2-bendRad, originStart[0]-bendRad])
 | 
			
		||||
  |> arc(angleStart = 0, angleEnd = 90, radius = bendRad+thickness)
 | 
			
		||||
  |> yLine(length = -thickness)
 | 
			
		||||
    |> arc(angleStart = 90, angleEnd = 0, radius = bendRad)
 | 
			
		||||
@ -1070,10 +989,7 @@ const extrude003rr = extrude(sketch003rr, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch004rr = startSketchOn(extrude002rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA003rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003rr) - 90, length = 0.375, tag = $rectangleSegmentB003rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003rr), length = -segLen(rectangleSegmentA003rr), tag = $rectangleSegmentC003rr)
 | 
			
		||||
@ -1088,10 +1004,7 @@ const extrude004rr = extrude(sketch004rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch005rr = startSketchOn(extrude002rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15 + .62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15 + .62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA004rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004rr) - 90, length = 0.375, tag = $rectangleSegmentB004rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004rr), length = -segLen(rectangleSegmentA004rr), tag = $rectangleSegmentC004rr)
 | 
			
		||||
@ -1106,10 +1019,7 @@ const extrude005rr = extrude(sketch005rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch006rr = startSketchOn(extrude002rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -0.35 + originStart[1] + width - 2,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.50
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-0.35 + originStart[1] + width - 2, originStart[2] + 0.15 + 0.62 + 0.50])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA005rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005rr) - 90, length = 0.375, tag = $rectangleSegmentB005rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005rr), length = -segLen(rectangleSegmentA005rr), tag = $rectangleSegmentC005rr)
 | 
			
		||||
@ -1124,10 +1034,7 @@ const extrude006rr = extrude(sketch006rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch007rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -originStart[0]-serverDepth+1.7,
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-originStart[0]-serverDepth+1.7, originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA006rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006rr) - 90, length = 0.375, tag = $rectangleSegmentB006rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006rr), length = -segLen(rectangleSegmentA006rr), tag = $rectangleSegmentC006rr)
 | 
			
		||||
@ -1142,10 +1049,7 @@ const extrude007rr = extrude(sketch007rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch008rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -originStart[0]-serverDepth+1.7,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-originStart[0]-serverDepth+1.7, originStart[2] + 0.15 + 0.62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA007rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007rr) - 90, length = 0.375, tag = $rectangleSegmentB007rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007rr), length = -segLen(rectangleSegmentA007rr), tag = $rectangleSegmentC007rr)
 | 
			
		||||
@ -1160,10 +1064,7 @@ const extrude008rr = extrude(sketch008rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch009rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -originStart[0]-serverDepth+1.7,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.5
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-originStart[0]-serverDepth+1.7, originStart[2] + 0.15 + 0.62 + 0.5])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA008rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008rr) - 90, length = 0.375, tag = $rectangleSegmentB008rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008rr), length = -segLen(rectangleSegmentA008rr), tag = $rectangleSegmentC008rr)
 | 
			
		||||
@ -1178,10 +1079,7 @@ const extrude009rr = extrude(sketch009rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth, originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
@ -1199,10 +1097,7 @@ const extrude010rr = extrude(sketch010rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth, originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
@ -1216,10 +1111,7 @@ const extrude011rr = extrude(sketch011rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0]+1.5-serverDepth, originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0]+1.5-serverDepth,
 | 
			
		||||
@ -1267,7 +1159,7 @@ const planeYZrl = {
 | 
			
		||||
}
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001rl = startSketchOn(planeXZrl)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rl) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rl), length = -segLen(rectangleSegmentA001rl), tag = $rectangleSegmentC001rl)
 | 
			
		||||
@ -1277,7 +1169,7 @@ const extrude001rl = extrude(sketch001rl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002rl = startSketchOn(planeYZrl)
 | 
			
		||||
  |> startProfileAt([-bendRad - thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [-bendRad - thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rl) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rl), length = -segLen(rectangleSegmentA002rl), tag = $rectangleSegmentC002rl)
 | 
			
		||||
@ -1288,10 +1180,7 @@ const extrude002rl = extrude(sketch002rl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003rl = startSketchOn(planeXYrl)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + thickness,
 | 
			
		||||
       originStart[0]
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + thickness, originStart[0]])
 | 
			
		||||
  |> arc(angleStart = 90, angleEnd = 180, radius = bendRad)
 | 
			
		||||
  |> xLine(length = -thickness)
 | 
			
		||||
  |> arc(angleStart = 180, angleEnd = 90, radius = bendRad + thickness)
 | 
			
		||||
@ -1301,10 +1190,7 @@ const extrude003rl = extrude(sketch003rl, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch004rl = startSketchOn(extrude002rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.38 + 2 + thickness + originStart[1],
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.38 + 2 + thickness + originStart[1], originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA003rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003rl) - 90, length = 0.375, tag = $rectangleSegmentB003rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA003rl), length = -segLen(rectangleSegmentA003rl), tag = $rectangleSegmentC003rl)
 | 
			
		||||
@ -1319,10 +1205,7 @@ const extrude004rl = extrude(sketch004rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch005rl = startSketchOn(extrude002rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.38 + 2 + thickness + originStart[1],
 | 
			
		||||
       originStart[2] + 0.15 + .62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.38 + 2 + thickness + originStart[1], originStart[2] + 0.15 + .62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA004rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004rl) - 90, length = 0.375, tag = $rectangleSegmentB004rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA004rl), length = -segLen(rectangleSegmentA004rl), tag = $rectangleSegmentC004rl)
 | 
			
		||||
@ -1337,10 +1220,7 @@ const extrude005rl = extrude(sketch005rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch006rl = startSketchOn(extrude002rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.38 + 2 + thickness + originStart[1],
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.50
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.38 + 2 + thickness + originStart[1], originStart[2] + 0.15 + 0.62 + 0.50])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA005rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005rl) - 90, length = 0.375, tag = $rectangleSegmentB005rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA005rl), length = -segLen(rectangleSegmentA005rl), tag = $rectangleSegmentC005rl)
 | 
			
		||||
@ -1355,10 +1235,7 @@ const extrude006rl = extrude(sketch006rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch007rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1.75 - originStart[0] - serverDepth,
 | 
			
		||||
       originStart[2] + 0.15
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1.75 - originStart[0] - serverDepth, originStart[2] + 0.15])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA006rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006rl) - 90, length = 0.375, tag = $rectangleSegmentB006rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA006rl), length = -segLen(rectangleSegmentA006rl), tag = $rectangleSegmentC006rl)
 | 
			
		||||
@ -1373,10 +1250,7 @@ const extrude007rl = extrude(sketch007rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch008rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1.75 - originStart[0] - serverDepth,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1.75 - originStart[0] - serverDepth, originStart[2] + 0.15 + 0.62])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA007rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007rl) - 90, length = 0.375, tag = $rectangleSegmentB007rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA007rl), length = -segLen(rectangleSegmentA007rl), tag = $rectangleSegmentC007rl)
 | 
			
		||||
@ -1391,10 +1265,7 @@ const extrude008rl = extrude(sketch008rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// EIA-310-D standard hole pattern
 | 
			
		||||
const sketch009rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1.75 - originStart[0] - serverDepth,
 | 
			
		||||
       originStart[2] + 0.15 + 0.62 + 0.5
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1.75 - originStart[0] - serverDepth, originStart[2] + 0.15 + 0.62 + 0.5])
 | 
			
		||||
  |> angledLine(angle = 0, length = -0.375, tag = $rectangleSegmentA008rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008rl) - 90, length = 0.375, tag = $rectangleSegmentB008rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA008rl), length = -segLen(rectangleSegmentA008rl), tag = $rectangleSegmentC008rl)
 | 
			
		||||
@ -1409,10 +1280,7 @@ const extrude009rl = extrude(sketch009rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1430,10 +1298,7 @@ const extrude010rl = extrude(sketch010rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1447,10 +1312,7 @@ const extrude011rl = extrude(sketch011rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1490,7 +1352,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const sketch001s = startSketchOn(planeXYs)
 | 
			
		||||
    |> startProfileAt([1 + 1.2, 1], %)
 | 
			
		||||
    |> startProfile(at = [1 + 1.2, 1])
 | 
			
		||||
    |> angledLine(angle = 0, length = 17.2, tag = $rectangleSegmentA001)
 | 
			
		||||
    |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 29, tag = $rectangleSegmentB001)
 | 
			
		||||
    |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001)
 | 
			
		||||
@ -1499,7 +1361,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  const extrude001s = extrude(sketch001s, length = 7)
 | 
			
		||||
 | 
			
		||||
  const sketch002s = startSketchOn(planeXZs)
 | 
			
		||||
    |> startProfileAt([-1, 4.114 + 1 + serverPos * 1.75], %)
 | 
			
		||||
    |> startProfile(at = [-1, 4.114 + 1 + serverPos * 1.75])
 | 
			
		||||
    |> yLine(length = 6.98)
 | 
			
		||||
    |> xLine(length = 0.2)
 | 
			
		||||
    |> yLine(length = -0.36)
 | 
			
		||||
@ -1523,7 +1385,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  const extrude002s = extrude(sketch002s, length = 1.8 / 2)
 | 
			
		||||
 | 
			
		||||
  const sketch003s = startSketchOn(planeXZs2)
 | 
			
		||||
    |> startProfileAt([-1, 4.114 + 1 + serverPos * 1.75], %)
 | 
			
		||||
    |> startProfile(at = [-1, 4.114 + 1 + serverPos * 1.75])
 | 
			
		||||
    |> yLine(length = 6.98)
 | 
			
		||||
    |> xLine(length = 0.2)
 | 
			
		||||
    |> yLine(length = -0.36)
 | 
			
		||||
 | 
			
		||||
@ -20,7 +20,7 @@ fn caster = (originStart) => {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const sketch001c = startSketchOn(plane001c)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> xLine(length = 3.543)
 | 
			
		||||
    |> yLine(length = 3.543)
 | 
			
		||||
    |> xLine(length = -3.543)
 | 
			
		||||
@ -45,7 +45,7 @@ fn caster = (originStart) => {
 | 
			
		||||
    |> extrude(length = -.25)
 | 
			
		||||
 | 
			
		||||
  const sketch002c = startSketchOn(sketch001c, face = 'START')
 | 
			
		||||
    |> startProfileAt([-originStart[0], 2.2 + originStart[1]], %)
 | 
			
		||||
    |> startProfile(at = [-originStart[0], 2.2 + originStart[1]])
 | 
			
		||||
    |> arc(
 | 
			
		||||
         angle_start = 30,
 | 
			
		||||
         angle_end = 330,
 | 
			
		||||
@ -101,7 +101,7 @@ const plane001 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch001l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> xLine(length = serverDepth + .8)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -serverDepth + 2 - .8, tag = $seg01)
 | 
			
		||||
@ -110,7 +110,7 @@ const sketch001l = startSketchOn(plane001)
 | 
			
		||||
const extrude001l = extrude(sketch001l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch002l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([serverDepth + .8, 0], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth + .8, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = -135, endAbsoluteX = serverDepth - 1 + .8)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -119,10 +119,7 @@ const sketch002l = startSketchOn(plane001)
 | 
			
		||||
const extrude002l = extrude(sketch002l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch003l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       serverDepth + .8,
 | 
			
		||||
       railHeight * 1.75 + 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth + .8, railHeight * 1.75 + 2])
 | 
			
		||||
  |> xLine(length = -serverDepth - .8, tag = $seg02)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = railHeight * 1.75 - 1 + 2)
 | 
			
		||||
  |> xLine(length = serverDepth - 2 + .8)
 | 
			
		||||
@ -131,7 +128,7 @@ const sketch003l = startSketchOn(plane001)
 | 
			
		||||
const extrude003l = extrude(sketch003l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch004l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = 135, endAbsoluteY = railHeight * 1.75 + 2 - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -140,7 +137,7 @@ const sketch004l = startSketchOn(plane001)
 | 
			
		||||
const extrude004l = extrude(sketch004l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch005l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([serverDepth - 1.25, 1], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth - 1.25, 1])
 | 
			
		||||
  |> line(end = [-serverDepth + 2.25, railHeight * 1.75], tag = $lineToIntersect4)
 | 
			
		||||
  |> xLine(length = 1)
 | 
			
		||||
  |> line(end = [serverDepth - 2.25, -railHeight * 1.75], tag = $lineToIntersect5)
 | 
			
		||||
@ -149,7 +146,7 @@ const sketch005l = startSketchOn(plane001)
 | 
			
		||||
const extrude005l = extrude(sketch005l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([1, 1], %)
 | 
			
		||||
  |> startProfile(at = [1, 1])
 | 
			
		||||
  |> angledLineThatIntersects(angle = 70, intersectTag = lineToIntersect4, offset = 0)
 | 
			
		||||
  |> angledLine(angle = -70, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 70 + 180, endAbsoluteY = 2 - 1)
 | 
			
		||||
@ -158,10 +155,7 @@ const sketch006l = startSketchOn(plane001)
 | 
			
		||||
const extrude006l = extrude(sketch006l, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007l = startSketchOn(plane001)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       serverDepth - 1.2,
 | 
			
		||||
       railHeight * 1.75 + 1
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [serverDepth - 1.2, railHeight * 1.75 + 1])
 | 
			
		||||
  |> angledLineThatIntersects(angle = 70, intersectTag = lineToIntersect5, offset = 0)
 | 
			
		||||
  |> angledLine(angle = -70, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 70 + 180, endAbsoluteY = railHeight * 1.75 + 1)
 | 
			
		||||
@ -182,7 +176,7 @@ const plane002 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch001w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> xLine(length = depth)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -depth + 2, tag = $seg01w)
 | 
			
		||||
@ -191,7 +185,7 @@ const sketch001w = startSketchOn(plane002)
 | 
			
		||||
const extrude001w = extrude(sketch001w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch002w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth, 0], %)
 | 
			
		||||
  |> startProfile(at = [depth, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = -135, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -200,7 +194,7 @@ const sketch002w = startSketchOn(plane002)
 | 
			
		||||
const extrude002w = extrude(sketch002w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch003w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth, railHeight * 1.75 + 2], %)
 | 
			
		||||
  |> startProfile(at = [depth, railHeight * 1.75 + 2])
 | 
			
		||||
  |> xLine(length = -depth, tag = $seg02w)
 | 
			
		||||
  |> angledLine(angle = -45, endAbsoluteY = railHeight * 1.75 - 1 + 2)
 | 
			
		||||
  |> xLine(length = depth - 2)
 | 
			
		||||
@ -209,7 +203,7 @@ const sketch003w = startSketchOn(plane002)
 | 
			
		||||
const extrude003w = extrude(sketch003w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch004w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> yLine(length = railHeight * 1.75 + 2)
 | 
			
		||||
  |> angledLine(angle = 135, endAbsoluteY = railHeight * 1.75 + 2 - 1)
 | 
			
		||||
  |> yLine(length = -railHeight * 1.75)
 | 
			
		||||
@ -218,7 +212,7 @@ const sketch004w = startSketchOn(plane002)
 | 
			
		||||
const extrude004w = extrude(sketch004w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch005w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 40.6 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 40.6 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 35.5 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90 + 45, length = 1.413 )
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1, tag = $lineToIntersect)
 | 
			
		||||
@ -227,10 +221,7 @@ const sketch005w = startSketchOn(plane002)
 | 
			
		||||
const extrude005w = extrude(sketch005w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 35.5 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 35.5 * cos(23 * pi() / 180), 40.6 - (35.5 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 + 90, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = 2.56)
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
@ -244,7 +235,7 @@ const sketch006w = startSketchOn(plane002)
 | 
			
		||||
const extrude006w = extrude(sketch006w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth - 1, 60.65 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1, 60.65 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = 34.93 , tag = $lineToIntersect3)
 | 
			
		||||
  |> angledLine(angle = 23 - 90, length = 1.414 )
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
@ -257,7 +248,7 @@ const sketch007w = startSketchOn(plane002)
 | 
			
		||||
const extrude007w = extrude(sketch007w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch008w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 41.7 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 41.7 + 1.75 / 2])
 | 
			
		||||
  |> angledLineThatIntersects(
 | 
			
		||||
       angle = -23 + 90,
 | 
			
		||||
       intersectTag = lineToIntersect3,
 | 
			
		||||
@ -274,7 +265,7 @@ const sketch008w = startSketchOn(plane002)
 | 
			
		||||
const extrude008w = extrude(sketch008w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch009w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [31.2, 33.3 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 90 - 23, length = 28 )
 | 
			
		||||
  |> angledLine(angle = -23 + 45, length = -1.414 )
 | 
			
		||||
@ -283,7 +274,7 @@ const sketch009w = startSketchOn(plane002)
 | 
			
		||||
const extrude009w = extrude(sketch009w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch010w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([31.2, 33.3 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [31.2, 33.3 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = 1.414 )
 | 
			
		||||
  |> angledLine(angle = 180 - 23, length = 28 )
 | 
			
		||||
  |> angledLine(angle = -23 + 45, length = 1.414 )
 | 
			
		||||
@ -292,10 +283,7 @@ const sketch010w = startSketchOn(plane002)
 | 
			
		||||
const extrude010w = extrude(sketch010w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch011w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       31.2 - ((28 - 2) * cos(23 * pi() / 180)),
 | 
			
		||||
       33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [31.2 - ((28 - 2) * cos(23 * pi() / 180)), 33.3 + (28 - 2) * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = 90 - 23, length = 28 - 2 )
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = -1.414 )
 | 
			
		||||
  |> angledLine(angle = 90 - 23 + 180, length = 28 )
 | 
			
		||||
@ -304,10 +292,7 @@ const sketch011w = startSketchOn(plane002)
 | 
			
		||||
const extrude011w = extrude(sketch011w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch012w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       31.2 + (28 - 2) * sin(23 * pi() / 180),
 | 
			
		||||
       33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [31.2 + (28 - 2) * sin(23 * pi() / 180), 33.3 + (28 - 2) * cos(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = 180 - 23, length = 28 - 2 )
 | 
			
		||||
  |> angledLine(angle = -23 - 45, length = -1.414 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 28 )
 | 
			
		||||
@ -316,10 +301,7 @@ const sketch012w = startSketchOn(plane002)
 | 
			
		||||
const extrude012w = extrude(sketch012w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch013w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 4 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 4 * cos(23 * pi() / 180), 40.6 - (4 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, endAbsoluteX = 1)
 | 
			
		||||
  |> yLine(length = 2.56)
 | 
			
		||||
@ -328,10 +310,7 @@ const sketch013w = startSketchOn(plane002)
 | 
			
		||||
const extrude013w = extrude(sketch013w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch014w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + 12 * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + 12 * cos(23 * pi() / 180), 40.6 - (12 * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -340,10 +319,7 @@ const sketch014w = startSketchOn(plane002)
 | 
			
		||||
const extrude014w = extrude(sketch014w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch015w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.55 - 8) * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.55 - 8) * cos(23 * pi() / 180), 40.6 - ((36 - 5.55 - 8) * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -352,10 +328,7 @@ const sketch015w = startSketchOn(plane002)
 | 
			
		||||
const extrude015w = extrude(sketch015w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch016w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.5) * cos(23 * pi() / 180),
 | 
			
		||||
       40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.5) * cos(23 * pi() / 180), 40.6 - ((36 - 5.5) * sin(23 * pi() / 180)) + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = 36 / 2 )
 | 
			
		||||
  |> angledLine(angle = -23, length = 1 )
 | 
			
		||||
  |> angledLine(angle = -23 - 90, length = -36 / 2 )
 | 
			
		||||
@ -364,10 +337,7 @@ const sketch016w = startSketchOn(plane002)
 | 
			
		||||
const extrude016w = extrude(sketch016w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch017w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       depth - 1 - (3.7 * cos(23 * pi() / 180)),
 | 
			
		||||
       60.65 + 3.7 * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1 - (3.7 * cos(23 * pi() / 180)), 60.65 + 3.7 * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> arc(angleStart = -23, angleEnd = 180 - 23, radius = 7 / 2 + 2)
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = -1 )
 | 
			
		||||
  |> arc(angleStart = 180 - 23, angleEnd = -23, radius = 7 / 2 + 1)
 | 
			
		||||
@ -376,10 +346,7 @@ const sketch017w = startSketchOn(plane002)
 | 
			
		||||
const extrude017w = extrude(sketch017w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch018w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       depth - 1 - (19.3 * cos(23 * pi() / 180)),
 | 
			
		||||
       60.65 + 19.3 * sin(23 * pi() / 180) + 1.75 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1 - (19.3 * cos(23 * pi() / 180)), 60.65 + 19.3 * sin(23 * pi() / 180) + 1.75 / 2])
 | 
			
		||||
  |> arc(angleStart = -23, angleEnd = 180 - 23, radius = 7 / 2 + 2)
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = -1 )
 | 
			
		||||
  |> arc(angleStart = 180 - 23, angleEnd = -23, radius = 7 / 2 + 1)
 | 
			
		||||
@ -388,7 +355,7 @@ const sketch018w = startSketchOn(plane002)
 | 
			
		||||
const extrude018w = extrude(sketch018w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch019w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 27.8 + 1.75 / 2], %)
 | 
			
		||||
  |> startProfile(at = [1, 27.8 + 1.75 / 2])
 | 
			
		||||
  |> angledLine(angle = -23, length = 7 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, length = -1 )
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -397,10 +364,7 @@ const sketch019w = startSketchOn(plane002)
 | 
			
		||||
const extrude019w = extrude(sketch019w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch020w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       1 + (36 - 5.53 - 12) * cos(23 * pi() / 180),
 | 
			
		||||
       27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [1 + (36 - 5.53 - 12) * cos(23 * pi() / 180), 27.8 + 1.75 / 2 - ((36 - 5.53 - 12) * sin(23 * pi() / 180))])
 | 
			
		||||
  |> angledLine(angle = -23, length = 7 )
 | 
			
		||||
  |> angledLine(angle = -23 + 90, length = -1 )
 | 
			
		||||
  |> angledLine(angle = -23 + 180, length = 7 )
 | 
			
		||||
@ -409,7 +373,7 @@ const sketch020w = startSketchOn(plane002)
 | 
			
		||||
const extrude020w = extrude(sketch020w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch021w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 21.9], %)
 | 
			
		||||
  |> startProfile(at = [1, 21.9])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = depth - 1)
 | 
			
		||||
  |> yLine(length = -1.1)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -418,7 +382,7 @@ const sketch021w = startSketchOn(plane002)
 | 
			
		||||
const extrude021w = extrude(sketch021w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch022w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([depth - 1, 74.1], %)
 | 
			
		||||
  |> startProfile(at = [depth - 1, 74.1])
 | 
			
		||||
  |> angledLine(angle = 180 - 23, endAbsoluteY = railHeight * 1.75 + 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = depth - 1)
 | 
			
		||||
@ -427,7 +391,7 @@ const sketch022w = startSketchOn(plane002)
 | 
			
		||||
const extrude022w = extrude(sketch022w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch023w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 69.53 + 1.75], %)
 | 
			
		||||
  |> startProfile(at = [1, 69.53 + 1.75])
 | 
			
		||||
  |> angledLine(angle = 90 - 23, endAbsoluteY = railHeight * 1.75 + 1)
 | 
			
		||||
  |> xLine(length = 1.086)
 | 
			
		||||
  |> angledLine(angle = 90 - 23, endAbsoluteX = 1)
 | 
			
		||||
@ -436,7 +400,7 @@ const sketch023w = startSketchOn(plane002)
 | 
			
		||||
const extrude023w = extrude(sketch023w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch024w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 16.5], %)
 | 
			
		||||
  |> startProfile(at = [1, 16.5])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -445,7 +409,7 @@ const sketch024w = startSketchOn(plane002)
 | 
			
		||||
const extrude024w = extrude(sketch024w, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch025w = startSketchOn(plane002)
 | 
			
		||||
  |> startProfileAt([1, 4], %)
 | 
			
		||||
  |> startProfile(at = [1, 4])
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteY = 1)
 | 
			
		||||
  |> xLine(length = -2.56)
 | 
			
		||||
  |> angledLine(angle = -23, endAbsoluteX = 1)
 | 
			
		||||
@ -462,7 +426,7 @@ const plane003 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch005 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, 0], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -472,7 +436,7 @@ const sketch005 = startSketchOn(plane003)
 | 
			
		||||
const extrude005 = extrude(sketch005, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch006 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, 0 + 2.756], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0 + 2.756])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -482,7 +446,7 @@ const sketch006 = startSketchOn(plane003)
 | 
			
		||||
const extrude006 = extrude(sketch006, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch007 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, depth], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth])
 | 
			
		||||
  |> line(end = [-width + 1, -depth + serverDepth + 3.8])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, -.75])
 | 
			
		||||
@ -495,7 +459,7 @@ const sketch007 = startSketchOn(plane003)
 | 
			
		||||
const extrude007 = extrude(sketch007, length = 1)
 | 
			
		||||
 | 
			
		||||
const sketch008 = startSketchOn(plane003)
 | 
			
		||||
  |> startProfileAt([width - 1, depth - 2.8], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth - 2.8])
 | 
			
		||||
  |> line(end = [-width + 2, -depth + serverDepth + 4.4])
 | 
			
		||||
  |> line(end = [0, -1.32])
 | 
			
		||||
  |> line(end = [width - 2, depth - serverDepth - 4.4])
 | 
			
		||||
@ -513,7 +477,7 @@ const plane004 = {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const sketch005t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, 0], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -523,7 +487,7 @@ const sketch005t = startSketchOn(plane004)
 | 
			
		||||
const extrude005t = extrude(sketch005t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch007t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, depth], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth])
 | 
			
		||||
  |> line(end = [-width + 1, -depth + serverDepth + 3.8])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, -.75])
 | 
			
		||||
@ -536,7 +500,7 @@ const sketch007t = startSketchOn(plane004)
 | 
			
		||||
const extrude007t = extrude(sketch007t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch008t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, 0 + 2.756], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, 0 + 2.756])
 | 
			
		||||
  |> line(end = [-width + 2, 3])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [width - 2, -3])
 | 
			
		||||
@ -545,7 +509,7 @@ const sketch008t = startSketchOn(plane004)
 | 
			
		||||
const extrude008t = extrude(sketch008t, length = -1)
 | 
			
		||||
 | 
			
		||||
const sketch009t = startSketchOn(plane004)
 | 
			
		||||
  |> startProfileAt([width - 1, depth - 2.8], %)
 | 
			
		||||
  |> startProfile(at = [width - 1, depth - 2.8])
 | 
			
		||||
  |> line(end = [-width + 2, -depth + serverDepth + 4.4])
 | 
			
		||||
  |> line(end = [0, -1.32])
 | 
			
		||||
  |> line(end = [width - 2, depth - serverDepth - 4.4])
 | 
			
		||||
@ -587,7 +551,7 @@ const planeYZfl = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001fl = startSketchOn(planeXZfl)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fl) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fl), length = -segLen(rectangleSegmentA001fl), tag = $rectangleSegmentC001fl)
 | 
			
		||||
@ -597,7 +561,7 @@ const extrude001fl = extrude(sketch001fl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002fl = startSketchOn(planeYZfl)
 | 
			
		||||
  |> startProfileAt([-bendRad - thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [-bendRad - thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fl) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002fl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fl), length = -segLen(rectangleSegmentA002fl), tag = $rectangleSegmentC002fl)
 | 
			
		||||
@ -608,10 +572,7 @@ const extrude002fl = extrude(sketch002fl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003fl = startSketchOn(planeXYfl)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0 + thickness + bendRad + originStart[1],
 | 
			
		||||
       originStart[0]
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0 + thickness + bendRad + originStart[1], originStart[0]])
 | 
			
		||||
  |> arc(angleStart = 270, angleEnd = 180, radius = bendRad + thickness)
 | 
			
		||||
  |> xLine(length = thickness)
 | 
			
		||||
  |> arc(angleStart = 180, angleEnd = 270, radius = bendRad)
 | 
			
		||||
@ -622,10 +583,7 @@ const extrude003fl = extrude(sketch003fl, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -643,10 +601,7 @@ const extrude010fl = extrude(sketch010fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -660,10 +615,7 @@ const extrude011fl = extrude(sketch011fl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012fl = startSketchOn(extrude001fl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -712,7 +664,7 @@ const planeYZfr = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001fr = startSketchOn(planeXZfr)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fr) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001fr), length = -segLen(rectangleSegmentA001fr), tag = $rectangleSegmentC001fr)
 | 
			
		||||
@ -722,7 +674,7 @@ const extrude001fr = extrude(sketch001fr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002fr = startSketchOn(planeYZfr)
 | 
			
		||||
  |> startProfileAt([0.89, 0], %)
 | 
			
		||||
  |> startProfile(at = [0.89, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fr) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002fr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002fr), length = -segLen(rectangleSegmentA002fr), tag = $rectangleSegmentC002fr)
 | 
			
		||||
@ -733,10 +685,7 @@ const extrude002fr = extrude(sketch002fr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003fr = startSketchOn(planeXYfr)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + width - 2 - thickness - bendRad,
 | 
			
		||||
       originStart[0] + bendRad + thickness
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + width - 2 - thickness - bendRad, originStart[0] + bendRad + thickness])
 | 
			
		||||
  |> arc(angleStart = 0, angleEnd = -90, radius = bendRad)
 | 
			
		||||
  |> yLine(length = -thickness)
 | 
			
		||||
  |> arc(angleStart = -90, angleEnd = 0, radius = bendRad + thickness)
 | 
			
		||||
@ -746,10 +695,7 @@ const extrude003fr = extrude(sketch003fr, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -767,10 +713,7 @@ const extrude010fr = extrude(sketch010fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -784,10 +727,7 @@ const extrude011fr = extrude(sketch011fr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012fr = startSketchOn(extrude001fr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0],
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0], originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0],
 | 
			
		||||
@ -836,7 +776,7 @@ const planeYZrr = {
 | 
			
		||||
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001rr = startSketchOn(planeXZrr)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rr) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rr), length = -segLen(rectangleSegmentA001rr), tag = $rectangleSegmentC001rr)
 | 
			
		||||
@ -846,7 +786,7 @@ const extrude001rr = extrude(sketch001rr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002rr = startSketchOn(planeYZrr)
 | 
			
		||||
  |> startProfileAt([0.89, 0], %)
 | 
			
		||||
  |> startProfile(at = [0.89, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rr) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002rr)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rr), length = -segLen(rectangleSegmentA002rr), tag = $rectangleSegmentC002rr)
 | 
			
		||||
@ -857,10 +797,7 @@ const extrude002rr = extrude(sketch002rr, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003rr = startSketchOn(planeXYrr)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + width - 2 - bendRad,
 | 
			
		||||
       originStart[0] - bendRad
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + width - 2 - bendRad, originStart[0] - bendRad])
 | 
			
		||||
  |> arc(angleStart = 0, angleEnd = 90, radius = bendRad + thickness)
 | 
			
		||||
  |> yLine(length = -thickness)
 | 
			
		||||
  |> arc(angleStart = 90, angleEnd = 0, radius = bendRad)
 | 
			
		||||
@ -870,10 +807,7 @@ const extrude003rr = extrude(sketch003rr, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth, originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
@ -891,10 +825,7 @@ const extrude010rr = extrude(sketch010rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth, originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
@ -908,10 +839,7 @@ const extrude011rr = extrude(sketch011rr, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012rr = startSketchOn(extrude001rr, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] + 1.5 - serverDepth, originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] + 1.5 - serverDepth,
 | 
			
		||||
@ -959,7 +887,7 @@ const planeYZrl = {
 | 
			
		||||
}
 | 
			
		||||
// Base flange
 | 
			
		||||
const sketch001rl = startSketchOn(planeXZrl)
 | 
			
		||||
  |> startProfileAt([bendRad + thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 0, length = 2 - bendRad - thickness, tag = $rectangleSegmentA001rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rl) + 90, length = railHeight * 1.75, tag = $rectangleSegmentB001rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001rl), length = -segLen(rectangleSegmentA001rl), tag = $rectangleSegmentC001rl)
 | 
			
		||||
@ -969,7 +897,7 @@ const extrude001rl = extrude(sketch001rl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// First flange
 | 
			
		||||
const sketch002rl = startSketchOn(planeYZrl)
 | 
			
		||||
  |> startProfileAt([-bendRad - thickness, 0], %)
 | 
			
		||||
  |> startProfile(at = [-bendRad - thickness, 0])
 | 
			
		||||
  |> angledLine(angle = 180, length = 0.89 - bendRad - thickness, tag = $rectangleSegmentA002rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rl) - 90, length = railHeight * 1.75, tag = $rectangleSegmentB002rl)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002rl), length = -segLen(rectangleSegmentA002rl), tag = $rectangleSegmentC002rl)
 | 
			
		||||
@ -980,10 +908,7 @@ const extrude002rl = extrude(sketch002rl, length = thickness)
 | 
			
		||||
 | 
			
		||||
// Bend
 | 
			
		||||
const sketch003rl = startSketchOn(planeXYrl)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       bendRad + originStart[1] + thickness,
 | 
			
		||||
       originStart[0]
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [bendRad + originStart[1] + thickness, originStart[0]])
 | 
			
		||||
  |> arc(angleStart = 90, angleEnd = 180, radius = bendRad)
 | 
			
		||||
  |> xLine(length = -thickness)
 | 
			
		||||
  |> arc(angleStart = 180, angleEnd = 90, radius = bendRad + thickness)
 | 
			
		||||
@ -993,10 +918,7 @@ const extrude003rl = extrude(sketch003rl, length = railHeight * 1.75)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch010rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + .81 - (.438 / 2)
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + .81 - (.438 / 2)])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1014,10 +936,7 @@ const extrude010rl = extrude(sketch010rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch011rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 / 2 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + railHeight * 1.75 / 2 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1031,10 +950,7 @@ const extrude011rl = extrude(sketch011rl, length = -thickness)
 | 
			
		||||
 | 
			
		||||
// define slots
 | 
			
		||||
const sketch012rl = startSketchOn(extrude001rl, face = 'START')
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       -1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
       originStart[2] + railHeight * 1.75 - .81 + .438 / 2
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [-1.12 + (.75 - .438) / 2 - originStart[0] - serverDepth + 1.5, originStart[2] + railHeight * 1.75 - .81 + .438 / 2])
 | 
			
		||||
  |> xLine(length = 0.75 - .438)
 | 
			
		||||
  |> tangentialArc(endAbsolute = [
 | 
			
		||||
       -0.66 - originStart[0] - serverDepth + 1.5,
 | 
			
		||||
@ -1073,7 +989,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const sketch001s = startSketchOn(planeXYs)
 | 
			
		||||
    |> startProfileAt([1 + 1.2, 1], %)
 | 
			
		||||
    |> startProfile(at = [1 + 1.2, 1])
 | 
			
		||||
    |> angledLine(angle = 0, length = 17.2, tag = $rectangleSegmentA001)
 | 
			
		||||
    |> angledLine(angle = segAng(rectangleSegmentA001) + 90, length = 29, tag = $rectangleSegmentB001)
 | 
			
		||||
    |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001)
 | 
			
		||||
@ -1082,7 +998,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  const extrude001s = extrude(sketch001s, length = 7)
 | 
			
		||||
 | 
			
		||||
  const sketch002s = startSketchOn(planeXZs)
 | 
			
		||||
    |> startProfileAt([-1, 4.114 + 1 + serverPos * 1.75], %)
 | 
			
		||||
    |> startProfile(at = [-1, 4.114 + 1 + serverPos * 1.75])
 | 
			
		||||
    |> yLine(length = 6.98)
 | 
			
		||||
    |> xLine(length = 0.2)
 | 
			
		||||
    |> yLine(length = -0.36)
 | 
			
		||||
@ -1106,7 +1022,7 @@ fn streamServer = (serverPos) => {
 | 
			
		||||
  const extrude002s = extrude(sketch002s, length = 1.8 / 2)
 | 
			
		||||
 | 
			
		||||
  const sketch003s = startSketchOn(planeXZs2)
 | 
			
		||||
    |> startProfileAt([-1, 4.114 + 1 + serverPos * 1.75], %)
 | 
			
		||||
    |> startProfile(at = [-1, 4.114 + 1 + serverPos * 1.75])
 | 
			
		||||
    |> yLine(length = 6.98)
 | 
			
		||||
    |> xLine(length = 0.2)
 | 
			
		||||
    |> yLine(length = -0.36)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([75.8, 317.2], %) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
@ -15,14 +15,14 @@ const extrude001 = extrude(sketch001, length = 100)
 | 
			
		||||
  |> chamfer(length = 50, tags = [seg02], tag = $seg04)
 | 
			
		||||
 | 
			
		||||
const sketch003 = startSketchOn(extrude001, face = seg04)
 | 
			
		||||
   |> startProfileAt([-69.1, 277.34], %)
 | 
			
		||||
   |> startProfile(at = [-69.1, 277.34])
 | 
			
		||||
   |> angledLine(angle = 0, length = 41.48, tag = $rectangleSegmentA003)
 | 
			
		||||
   |> angledLine(angle = segAng(rectangleSegmentA003) - 90, length = 104.8, tag = $rectangleSegmentB002)
 | 
			
		||||
   |> angledLine(angle = segAng(rectangleSegmentA003), length = -segLen(rectangleSegmentA003), tag = $rectangleSegmentC002)
 | 
			
		||||
   |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
   |> close()
 | 
			
		||||
const sketch002 = startSketchOn(extrude001, face = seg03)
 | 
			
		||||
  |> startProfileAt([159.25, 278.35], %)
 | 
			
		||||
  |> startProfile(at = [159.25, 278.35])
 | 
			
		||||
  |> angledLine(angle = 0, length = 40.82, tag = $rectangleSegmentA002)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 132.27, tag = $rectangleSegmentB001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $rectangleSegmentC001)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([75.8, 317.2], %) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> startProfile(at = [75.8, 317.2]) // [$startCapTag, $EndCapTag]
 | 
			
		||||
  |> angledLine(angle = 0, length = 268.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 217.26, tag = $seg01)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
@ -15,14 +15,14 @@ const extrude001 = extrude(sketch001, length = 100)
 | 
			
		||||
     )
 | 
			
		||||
 | 
			
		||||
const sketch003 = startSketchOn(extrude001, face = seg04)
 | 
			
		||||
   |> startProfileAt([-69.1, 277.34], %)
 | 
			
		||||
   |> startProfile(at = [-69.1, 277.34])
 | 
			
		||||
   |> angledLine(angle = 0, length = 41.48, tag = $rectangleSegmentA003)
 | 
			
		||||
   |> angledLine(angle = segAng(rectangleSegmentA003) - 90, length = 104.8, tag = $rectangleSegmentB002)
 | 
			
		||||
   |> angledLine(angle = segAng(rectangleSegmentA003), length = -segLen(rectangleSegmentA003), tag = $rectangleSegmentC002)
 | 
			
		||||
   |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
   |> close()
 | 
			
		||||
const sketch002 = startSketchOn(extrude001, face = seg03)
 | 
			
		||||
  |> startProfileAt([159.25, 278.35], %)
 | 
			
		||||
  |> startProfile(at = [159.25, 278.35])
 | 
			
		||||
  |> angledLine(angle = 0, length = 40.82, tag = $rectangleSegmentA002)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002) - 90, length = 132.27, tag = $rectangleSegmentB001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA002), length = -segLen(rectangleSegmentA002), tag = $rectangleSegmentC001)
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([11.19, 28.35], %)
 | 
			
		||||
  |> startProfile(at = [11.19, 28.35])
 | 
			
		||||
  |> line(end = [28.67, -13.25], tag = $here)
 | 
			
		||||
  |> line(end = [-4.12, -22.81])
 | 
			
		||||
  |> line(end = [-33.24, 14.55])
 | 
			
		||||
@ -7,7 +7,7 @@ part001 = startSketchOn(XY)
 | 
			
		||||
  |> extrude(length = 5)
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(part001, face = here)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@ filletR = 0.25
 | 
			
		||||
 | 
			
		||||
// Sketch the bracket and extrude with fillets
 | 
			
		||||
bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, wallMountL], tag = $outerEdge)
 | 
			
		||||
  |> line(end = [-shelfMountL, 0], tag = $seg01)
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -46,7 +46,7 @@ bracket = startSketchOn(XY)
 | 
			
		||||
     )
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(bracket, face = seg01)
 | 
			
		||||
  |> startProfileAt([4.28, 3.83], %)
 | 
			
		||||
  |> startProfile(at = [4.28, 3.83])
 | 
			
		||||
  |> line(end = [2.17, -0.03])
 | 
			
		||||
  |> line(end = [-0.07, -1.8])
 | 
			
		||||
  |> line(end = [-2.07, 0.05])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  const sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  const sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -12,7 +12,7 @@ const part001 = cube([0,0], 20)
 | 
			
		||||
    |> extrude(length = 20)
 | 
			
		||||
 | 
			
		||||
const part002 = startSketchOn(part001, face = "END")
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  const sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -12,7 +12,7 @@ const part001 = cube([0,0], 20)
 | 
			
		||||
    |> extrude(length = 20)
 | 
			
		||||
 | 
			
		||||
const part002 = startSketchOn(part001, face = "END")
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  const sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -12,7 +12,7 @@ const part001 = cube([0,0], 20)
 | 
			
		||||
    |> extrude(length = 20)
 | 
			
		||||
 | 
			
		||||
const part002 = startSketchOn(part001, face = "start")
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ const tubeFace = {
 | 
			
		||||
}
 | 
			
		||||
// Make the base
 | 
			
		||||
const s = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-totalWidth / 2, -totalLength / 2], %)
 | 
			
		||||
  |> startProfile(at = [-totalWidth / 2, -totalLength / 2])
 | 
			
		||||
  |> line([totalWidth, 0], %)
 | 
			
		||||
  |> line([0, totalLength], %)
 | 
			
		||||
  |> line([-totalWidth, 0], %)
 | 
			
		||||
@ -36,10 +36,10 @@ const s = startSketchOn('XY')
 | 
			
		||||
 | 
			
		||||
// Sketch and extrude a rectangular shape to create the shell underneath the lego. This is a hack until we have a shell function.
 | 
			
		||||
const shellExtrude = startSketchOn(s, "start")
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
  |> startProfile(at = [
 | 
			
		||||
       -(totalWidth / 2 - t),
 | 
			
		||||
       -(totalLength / 2 - t)
 | 
			
		||||
     ], %)
 | 
			
		||||
     ])
 | 
			
		||||
  |> line([totalWidth - (2 * t), 0], %)
 | 
			
		||||
  |> line([0, totalLength - (2 * t)], %)
 | 
			
		||||
  |> line([-(totalWidth - (2 * t)), 0], %)
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ let r = 1
 | 
			
		||||
let angleStart = 110
 | 
			
		||||
 | 
			
		||||
startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([startX, startY], %)
 | 
			
		||||
  |> startProfile(at = [startX, startY])
 | 
			
		||||
  |> angledLine(
 | 
			
		||||
    angle = angleStart,
 | 
			
		||||
    length = .000001,
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
const boxSketch = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0, 10])
 | 
			
		||||
    |> tangentialArc(radius = 5, angle = 90)
 | 
			
		||||
    |> line(end = [5, -15])
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
sketch002 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([-108.83, -57.48], %)
 | 
			
		||||
  |> startProfile(at = [-108.83, -57.48])
 | 
			
		||||
  |> angledLine(angle = 0, length = 105.13, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 77.9)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
part001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(endAbsolute = [100, 100])
 | 
			
		||||
  |> line(endAbsolute = [100, 0])
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,7 @@ async fn kcl_test_fillet_duplicate_tags() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_execute_engine_error_return() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([5.5229, 5.25217], %)
 | 
			
		||||
  |> startProfile(at = [5.5229, 5.25217])
 | 
			
		||||
  |> line(end = [10.50433, -1.19122])
 | 
			
		||||
  |> line(end = [8.01362, -5.48731])
 | 
			
		||||
  |> line(end = [-1.02877, -6.76825])
 | 
			
		||||
@ -157,7 +157,7 @@ async fn kcl_test_negative_args() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_basic_tangential_arc_with_point() {
 | 
			
		||||
    let code = r#"boxSketch = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0, 10])
 | 
			
		||||
    |> tangentialArc(end = [-5, 5])
 | 
			
		||||
    |> line(end = [5, -15])
 | 
			
		||||
@ -171,7 +171,7 @@ async fn kcl_test_basic_tangential_arc_with_point() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_basic_tangential_arc_to() {
 | 
			
		||||
    let code = r#"boxSketch = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0, 10])
 | 
			
		||||
    |> tangentialArc(endAbsolute = [-5, 15])
 | 
			
		||||
    |> line(end = [5, -15])
 | 
			
		||||
@ -190,7 +190,7 @@ length = 12
 | 
			
		||||
 | 
			
		||||
fn box = (sk1, sk2, scale, plane) => {
 | 
			
		||||
  boxsketch = startSketchOn(plane)
 | 
			
		||||
    |> startProfileAt([sk1, sk2], %)
 | 
			
		||||
    |> startProfile(at = [sk1, sk2])
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -222,7 +222,7 @@ shelfMountL = 9
 | 
			
		||||
wallMountL = 8
 | 
			
		||||
 | 
			
		||||
bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, wallMountL])
 | 
			
		||||
  |> tangentialArc(radius = filletR, angle = 90 )
 | 
			
		||||
  |> line(end = [-shelfMountL, 0])
 | 
			
		||||
@ -237,7 +237,7 @@ bracket = startSketchOn(XY)
 | 
			
		||||
  |> extrude(length = width)
 | 
			
		||||
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-15.53, -10.28], %)
 | 
			
		||||
  |> startProfile(at = [-15.53, -10.28])
 | 
			
		||||
  |> line(end = [10.49, -2.08])
 | 
			
		||||
  |> line(end = [10.42, 8.47])
 | 
			
		||||
  |> line(end = [-19.16, 5.1])
 | 
			
		||||
@ -245,19 +245,19 @@ part001 = startSketchOn(XY)
 | 
			
		||||
  |> extrude(length = 4)
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([-9.35, 19.18], %)
 | 
			
		||||
  |> startProfile(at = [-9.35, 19.18])
 | 
			
		||||
  |> line(end = [32.14, -2.47])
 | 
			
		||||
  |> line(end = [8.39, -3.73])
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
part003 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([13.82, 16.51], %)
 | 
			
		||||
  |> startProfile(at = [13.82, 16.51])
 | 
			
		||||
  |> line(end = [-6.24, -30.82])
 | 
			
		||||
  |> line(end = [8.39, -3.73])
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
part004 = startSketchOn(YZ)
 | 
			
		||||
  |> startProfileAt([19.04, 20.22], %)
 | 
			
		||||
  |> startProfile(at = [19.04, 20.22])
 | 
			
		||||
  |> line(end = [9.44, -30.16])
 | 
			
		||||
  |> line(end = [8.39, -3.73])
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -270,7 +270,7 @@ part004 = startSketchOn(YZ)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_holes() {
 | 
			
		||||
    let code = r#"square = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
@ -289,7 +289,7 @@ async fn optional_params() {
 | 
			
		||||
    let code = r#"
 | 
			
		||||
    fn other_circle = (pos, radius, tag?) => {
 | 
			
		||||
      sg = startSketchOn(XY)
 | 
			
		||||
        |> startProfileAt(pos, %)
 | 
			
		||||
        |> startProfile(at = pos)
 | 
			
		||||
        |> arc(angleEnd = 360, angleStart = 0, radius = radius)
 | 
			
		||||
        |> close()
 | 
			
		||||
        |> extrude(length = 2)
 | 
			
		||||
@ -311,7 +311,7 @@ async fn kcl_test_rounded_with_holes() {
 | 
			
		||||
 | 
			
		||||
fn roundedRectangle = (pos, w, l, cornerRadius) => {
 | 
			
		||||
  rr = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([pos[0] - w/2, 0], %)
 | 
			
		||||
    |> startProfile(at = [pos[0] - w/2, 0])
 | 
			
		||||
    |> line(endAbsolute = [pos[0] - w/2, pos[1] - l/2 + cornerRadius])
 | 
			
		||||
    |> tarc([pos[0] - w/2 + cornerRadius, pos[1] - l/2], %, $arc0)
 | 
			
		||||
    |> line(endAbsolute = [pos[0] + w/2 - cornerRadius, pos[1] - l/2])
 | 
			
		||||
@ -376,7 +376,7 @@ async fn kcl_test_patterns_linear_basic() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_patterns_linear_basic_3d() {
 | 
			
		||||
    let code = r#"part = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0,1])
 | 
			
		||||
    |> line(end = [1, 0])
 | 
			
		||||
    |> line(end = [0, -1])
 | 
			
		||||
@ -420,7 +420,7 @@ async fn kcl_test_patterns_linear_basic_holes() {
 | 
			
		||||
    |> patternLinear2d(axis = [1,1], instances = 13, distance = 3)
 | 
			
		||||
 | 
			
		||||
rectangle = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 50])
 | 
			
		||||
  |> line(end = [50, 0])
 | 
			
		||||
  |> line(end = [0, -50])
 | 
			
		||||
@ -449,7 +449,7 @@ async fn kcl_test_patterns_circular_basic_2d() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_patterns_circular_basic_3d() {
 | 
			
		||||
    let code = r#"part = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0,1])
 | 
			
		||||
    |> line(end = [1, 0])
 | 
			
		||||
    |> line(end = [0, -1])
 | 
			
		||||
@ -465,7 +465,7 @@ async fn kcl_test_patterns_circular_basic_3d() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_patterns_circular_3d_tilted_axis() {
 | 
			
		||||
    let code = r#"part = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0,1])
 | 
			
		||||
    |> line(end = [1, 0])
 | 
			
		||||
    |> line(end = [0, -1])
 | 
			
		||||
@ -573,7 +573,7 @@ model = cube"#;
 | 
			
		||||
async fn kcl_test_cube_mm() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -595,7 +595,7 @@ async fn kcl_test_cube_cm() {
 | 
			
		||||
    let code = r#"@settings(defaultLengthUnit = cm)
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -617,7 +617,7 @@ async fn kcl_test_cube_m() {
 | 
			
		||||
    let code = r#"@settings(defaultLengthUnit = m)
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -639,7 +639,7 @@ async fn kcl_test_cube_in() {
 | 
			
		||||
    let code = r#"@settings(defaultLengthUnit = in)
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -661,7 +661,7 @@ async fn kcl_test_cube_ft() {
 | 
			
		||||
    let code = r#"@settings(defaultLengthUnit = ft)
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -683,7 +683,7 @@ async fn kcl_test_cube_yd() {
 | 
			
		||||
    let code = r#"@settings(defaultLengthUnit = yd)
 | 
			
		||||
fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -704,7 +704,7 @@ myCube = cube([0,0], 10)
 | 
			
		||||
async fn kcl_test_error_sketch_on_arc_face() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt(pos, %)
 | 
			
		||||
  |> startProfile(at = pos)
 | 
			
		||||
  |> tangentialArc(end = [0, scale], tag = $here)
 | 
			
		||||
  |> line(end = [scale, 0])
 | 
			
		||||
  |> line(end = [0, -scale])
 | 
			
		||||
@ -716,7 +716,7 @@ part001 = cube([0, 0], 20)
 | 
			
		||||
  |> extrude(length = 20)
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(part001, face = part001.sketch.tags.here)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [5, 0])
 | 
			
		||||
  |> line(end = [5, 5])
 | 
			
		||||
  |> line(end = [0, 5])
 | 
			
		||||
@ -740,7 +740,7 @@ part002 = startSketchOn(part001, face = part001.sketch.tags.here)
 | 
			
		||||
async fn kcl_test_sketch_on_face_of_face() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -752,7 +752,7 @@ part001 = cube([0,0], 20)
 | 
			
		||||
    |> extrude(length = 20)
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(part001, face = END)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
@ -760,7 +760,7 @@ part002 = startSketchOn(part001, face = END)
 | 
			
		||||
  |> extrude(length = 5)
 | 
			
		||||
 | 
			
		||||
part003 = startSketchOn(part002, face = END)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 5])
 | 
			
		||||
  |> line(end = [5, 0])
 | 
			
		||||
  |> line(end = [0, -5])
 | 
			
		||||
@ -775,7 +775,7 @@ part003 = startSketchOn(part002, face = END)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_stdlib_kcl_error_right_code_path() {
 | 
			
		||||
    let code = r#"square = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
@ -800,7 +800,7 @@ async fn kcl_test_stdlib_kcl_error_right_code_path() {
 | 
			
		||||
async fn kcl_test_sketch_on_face_circle() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -828,7 +828,7 @@ async fn kcl_test_stdlib_kcl_error_circle() {
 | 
			
		||||
// Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function.
 | 
			
		||||
fn rectShape = (pos, w, l) => {
 | 
			
		||||
  rr = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
 | 
			
		||||
  |> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
 | 
			
		||||
  |> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1)
 | 
			
		||||
  |> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2)
 | 
			
		||||
  |> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge3)
 | 
			
		||||
@ -872,7 +872,7 @@ part = rectShape([0, 0], 20, 20)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -892,7 +892,7 @@ async fn kcl_test_simple_revolve() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve_uppercase() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -912,7 +912,7 @@ async fn kcl_test_simple_revolve_uppercase() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve_negative() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -932,7 +932,7 @@ async fn kcl_test_simple_revolve_negative() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_bad_angle_low() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -958,7 +958,7 @@ async fn kcl_test_revolve_bad_angle_low() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_bad_angle_high() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -984,7 +984,7 @@ async fn kcl_test_revolve_bad_angle_high() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve_custom_angle() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -1004,7 +1004,7 @@ async fn kcl_test_simple_revolve_custom_angle() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve_custom_axis() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -1024,7 +1024,7 @@ async fn kcl_test_simple_revolve_custom_axis() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_on_edge() {
 | 
			
		||||
    let code = r#"box = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10], tag = $revolveAxis)
 | 
			
		||||
@ -1032,7 +1032,7 @@ async fn kcl_test_revolve_on_edge() {
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(box, face = END)
 | 
			
		||||
  |> startProfileAt([5, 10], %)
 | 
			
		||||
  |> startProfile(at = [5, 10])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
  |> line(end = [2, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -1048,7 +1048,7 @@ sketch001 = startSketchOn(box, face = END)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_on_edge_get_edge() {
 | 
			
		||||
    let code = r#"box = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10], tag = $revolveAxis)
 | 
			
		||||
@ -1056,7 +1056,7 @@ async fn kcl_test_revolve_on_edge_get_edge() {
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(box, face = revolveAxis)
 | 
			
		||||
  |> startProfileAt([5, 10], %)
 | 
			
		||||
  |> startProfile(at = [5, 10])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
  |> line(end = [2, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -1078,7 +1078,7 @@ sketch001 = startSketchOn(box, face = revolveAxis)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_on_face_circle_edge() {
 | 
			
		||||
    let code = r#"box = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, -20], tag = $revolveAxis) 
 | 
			
		||||
@ -1100,7 +1100,7 @@ sketch001 = startSketchOn(box, face = "END")
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_on_face_circle() {
 | 
			
		||||
    let code = r#"box = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [20, 0], tag = $revolveAxis)
 | 
			
		||||
  |> line(end = [0, -20]) 
 | 
			
		||||
@ -1122,7 +1122,7 @@ sketch001 = startSketchOn(box, face = "END")
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_revolve_on_face() {
 | 
			
		||||
    let code = r#"box = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
@ -1130,7 +1130,7 @@ async fn kcl_test_revolve_on_face() {
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(box, face = END)
 | 
			
		||||
  |> startProfileAt([5, 10], %)
 | 
			
		||||
  |> startProfile(at = [5, 10])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
  |> line(end = [2, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -1162,7 +1162,7 @@ async fn kcl_test_basic_revolve_circle() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_simple_revolve_sketch_on_edge() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
     |> startProfileAt([4, 12], %)
 | 
			
		||||
     |> startProfile(at = [4, 12])
 | 
			
		||||
     |> line(end = [2, 0])
 | 
			
		||||
     |> line(end = [0, -6])
 | 
			
		||||
     |> line(end = [4, -6])
 | 
			
		||||
@ -1174,7 +1174,7 @@ async fn kcl_test_simple_revolve_sketch_on_edge() {
 | 
			
		||||
     |> revolve(axis = Y, angle = 180)
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(part001, face = END)
 | 
			
		||||
    |> startProfileAt([4.5, -5], %)
 | 
			
		||||
    |> startProfile(at = [4.5, -5])
 | 
			
		||||
    |> line(end = [0, 5])
 | 
			
		||||
    |> line(end = [5, 0])
 | 
			
		||||
    |> line(end = [0, -5])
 | 
			
		||||
@ -1190,7 +1190,7 @@ part002 = startSketchOn(part001, face = END)
 | 
			
		||||
async fn kcl_test_plumbus_fillets() {
 | 
			
		||||
    let code = r#"fn make_circle = (ext, face, pos, radius) => {
 | 
			
		||||
  sg = startSketchOn(ext, face = face)
 | 
			
		||||
  |> startProfileAt([pos[0] + radius, pos[1]], %)
 | 
			
		||||
  |> startProfile(at = [pos[0] + radius, pos[1]])
 | 
			
		||||
  |> arc(
 | 
			
		||||
       angleEnd = 360,
 | 
			
		||||
       angleStart = 0,
 | 
			
		||||
@ -1204,7 +1204,7 @@ async fn kcl_test_plumbus_fillets() {
 | 
			
		||||
 | 
			
		||||
fn pentagon = (len) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-len / 2, -len / 2], %)
 | 
			
		||||
  |> startProfile(at = [-len / 2, -len / 2])
 | 
			
		||||
  |> angledLine(angle = 0, length = len, tag = $a)
 | 
			
		||||
  |> angledLine(
 | 
			
		||||
       angle = segAng(a) + 180 - 108,
 | 
			
		||||
@ -1312,7 +1312,7 @@ filletR = 0.25
 | 
			
		||||
 | 
			
		||||
// Sketch the bracket and extrude with fillets
 | 
			
		||||
bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, wallMountL], tag = $outerEdge)
 | 
			
		||||
  |> line(end = [-shelfMountL, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -1337,7 +1337,7 @@ bracket = startSketchOn(XY)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_error_empty_start_sketch_on_string() {
 | 
			
		||||
    let code = r#"part001 = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([75.75, 184.25], %)
 | 
			
		||||
  |> startProfile(at = [75.75, 184.25])
 | 
			
		||||
  |> line(end = [190.03, -118.13])
 | 
			
		||||
  |> line(end = [-33.38, -202.86])
 | 
			
		||||
  |> line(end = [-315.86, -64.2])
 | 
			
		||||
@ -1368,7 +1368,7 @@ dia = 4
 | 
			
		||||
 | 
			
		||||
fn squareHole = (l, w) => {
 | 
			
		||||
  squareHoleSketch = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-width / 2, -length / 2], %)
 | 
			
		||||
  |> startProfile(at = [-width / 2, -length / 2])
 | 
			
		||||
  |> line(endAbsolute = [width / 2, -length / 2])
 | 
			
		||||
  |> line(endAbsolute = [width / 2, length / 2])
 | 
			
		||||
  |> line(endAbsolute = [-width / 2, length / 2])
 | 
			
		||||
@ -1395,7 +1395,7 @@ async fn kcl_test_array_of_sketches() {
 | 
			
		||||
    let code = r#"plane001 = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
profile001 = plane001
 | 
			
		||||
  |> startProfileAt([40.82, 240.82], %)
 | 
			
		||||
  |> startProfile(at = [40.82, 240.82])
 | 
			
		||||
  |> line(end = [235.72, -8.16])
 | 
			
		||||
  |> line(end = [13.27, -253.07])
 | 
			
		||||
  |> line(end = [-247.97, -19.39])
 | 
			
		||||
@ -1403,7 +1403,7 @@ profile001 = plane001
 | 
			
		||||
  |> close()
 | 
			
		||||
 | 
			
		||||
profile002 = plane001
 | 
			
		||||
  |> startProfileAt([47.17, -71.91], %)
 | 
			
		||||
  |> startProfile(at = [47.17, -71.91])
 | 
			
		||||
  |> line(end = [247.96, -4.03])
 | 
			
		||||
  |> line(end = [-17.26, -116.79])
 | 
			
		||||
  |> line(end = [-235.87, 12.66])
 | 
			
		||||
@ -1424,7 +1424,7 @@ async fn kcl_test_circular_pattern3d_array_of_extrudes() {
 | 
			
		||||
    let code = r#"plane001 = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
sketch001 = plane001
 | 
			
		||||
  |> startProfileAt([40.82, 240.82], %)
 | 
			
		||||
  |> startProfile(at = [40.82, 240.82])
 | 
			
		||||
  |> line(end = [235.72, -8.16])
 | 
			
		||||
  |> line(end = [13.27, -253.07])
 | 
			
		||||
  |> line(end = [-247.97, -19.39])
 | 
			
		||||
@ -1433,7 +1433,7 @@ sketch001 = plane001
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
 | 
			
		||||
sketch002 = plane001
 | 
			
		||||
  |> startProfileAt([47.17, -71.91], %)
 | 
			
		||||
  |> startProfile(at = [47.17, -71.91])
 | 
			
		||||
  |> line(end = [247.96, -4.03])
 | 
			
		||||
  |> line(end = [-17.26, -116.79])
 | 
			
		||||
  |> line(end = [-235.87, 12.66])
 | 
			
		||||
@ -1475,7 +1475,7 @@ cornerFilletRad = 0.5
 | 
			
		||||
holeDia = 0.5
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([-foot1Length, 0], %)
 | 
			
		||||
  |> startProfile(at = [-foot1Length, 0])
 | 
			
		||||
  |> line(end = [0, thickness], tag = $cornerFillet1)
 | 
			
		||||
  |> line(end = [foot1Length, 0])
 | 
			
		||||
  |> line(end = [0, height], tag = $fillet1)
 | 
			
		||||
@ -1523,7 +1523,7 @@ cornerChamferRad = 0.5
 | 
			
		||||
holeDia = 0.5
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([-foot1Length, 0], %)
 | 
			
		||||
  |> startProfile(at = [-foot1Length, 0])
 | 
			
		||||
  |> line(end = [0, thickness], tag = $cornerChamfer1)
 | 
			
		||||
  |> line(end = [foot1Length, 0])
 | 
			
		||||
  |> line(end = [0, height], tag = $chamfer1)
 | 
			
		||||
@ -1555,7 +1555,7 @@ baseExtrusion = extrude(sketch001, length = width)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_shell_with_tag() {
 | 
			
		||||
    let code = r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([61.74, 206.13], %)
 | 
			
		||||
  |> startProfile(at = [61.74, 206.13])
 | 
			
		||||
  |> xLine(length = 305.11, tag = $seg01)
 | 
			
		||||
  |> yLine(length = -291.85)
 | 
			
		||||
  |> xLine(length = -segLen(seg01))
 | 
			
		||||
@ -1576,7 +1576,7 @@ async fn kcl_test_shell_with_tag() {
 | 
			
		||||
async fn kcl_test_linear_pattern3d_filleted_sketch() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -1607,7 +1607,7 @@ pattn1 = patternLinear3d(
 | 
			
		||||
async fn kcl_test_circular_pattern3d_filleted_sketch() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -1634,7 +1634,7 @@ pattn2 = patternCircular3d(part001, axis = [0,0, 1], center = [-20, -20, -20], i
 | 
			
		||||
async fn kcl_test_circular_pattern3d_chamfered_sketch() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -1660,7 +1660,7 @@ pattn2 = patternCircular3d(part001, axis = [0,0, 1], center = [-20, -20, -20], i
 | 
			
		||||
async fn kcl_test_tag_chamfer_with_more_than_one_edge_should_fail() {
 | 
			
		||||
    let code = r#"fn cube = (pos, scale) => {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -1694,7 +1694,7 @@ part001 = cube([0,0], 20)
 | 
			
		||||
async fn kcl_test_duplicate_tags_should_error() {
 | 
			
		||||
    let code = r#"fn triangle = (len) => {
 | 
			
		||||
  return startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-len / 2, -len / 2], %)
 | 
			
		||||
  |> startProfile(at = [-len / 2, -len / 2])
 | 
			
		||||
  |> angledLine(angle = 0, length = len , tag = $a)
 | 
			
		||||
  |> angledLine(
 | 
			
		||||
       angle = segAng(a) + 120,
 | 
			
		||||
@ -1769,7 +1769,7 @@ async fn kcl_test_extrude_custom_plane() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_arc_error_same_start_end() {
 | 
			
		||||
    let code = r#"startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([10, 0], %)
 | 
			
		||||
  |> startProfile(at = [10, 0])
 | 
			
		||||
  |> arc(
 | 
			
		||||
       angleStart = 180,
 | 
			
		||||
       angleEnd = 180,
 | 
			
		||||
@ -1793,7 +1793,7 @@ async fn kcl_test_arc_error_same_start_end() {
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_to_x_90() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 90, endAbsoluteX = 10)
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [-10, 0])
 | 
			
		||||
@ -1813,7 +1813,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_to_x_270() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 270, endAbsoluteX = 10)
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [-10, 0])
 | 
			
		||||
@ -1833,7 +1833,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_to_y_0() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 0, endAbsoluteY = 20)
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
  |> angledLine(angle = 70, endAbsoluteY = 10)
 | 
			
		||||
@ -1853,7 +1853,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_to_y_180() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 180, endAbsoluteY = 20)
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
  |> angledLine(angle = 70, endAbsoluteY = 10)
 | 
			
		||||
@ -1873,7 +1873,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_of_x_length_90() {
 | 
			
		||||
    let code = r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 90, lengthX = 90, tag = $edge1)
 | 
			
		||||
  |> angledLine(angle = -15, lengthX = -15, tag = $edge2)
 | 
			
		||||
  |> line(end = [0, -5])
 | 
			
		||||
@ -1893,7 +1893,7 @@ extrusion = extrude(sketch001, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_of_x_length_270() {
 | 
			
		||||
    let code = r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> angledLine(angle = 90, lengthX = 90, tag = $edge1)
 | 
			
		||||
  |> angledLine(angle = -15, lengthX = -15, tag = $edge2)
 | 
			
		||||
  |> line(end = [0, -5])
 | 
			
		||||
@ -1913,7 +1913,7 @@ extrusion = extrude(sketch001, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_of_y_length_0() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> angledLine(angle = 0, lengthY = 10)
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -1935,7 +1935,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_of_y_length_180() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> angledLine(angle = 180, lengthY = 10)
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -1957,7 +1957,7 @@ example = extrude(exampleSketch, length = 10)
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_angled_line_of_y_length_negative_180() {
 | 
			
		||||
    let code = r#"exampleSketch = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> angledLine(angle = -180, lengthY = 10)
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
@ -2017,7 +2017,7 @@ someFunction('INVALID')
 | 
			
		||||
#[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
async fn kcl_test_error_no_auth_websocket() {
 | 
			
		||||
    let code = r#"const sketch001 = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([61.74, 206.13], %)
 | 
			
		||||
  |> startProfile(at = [61.74, 206.13])
 | 
			
		||||
  |> xLine(length = 305.11, tag = $seg01)
 | 
			
		||||
  |> yLine(length = -291.85)
 | 
			
		||||
  |> xLine(length = -segLen(seg01))
 | 
			
		||||
@ -2052,7 +2052,7 @@ length = 1 + 1 / 2
 | 
			
		||||
 | 
			
		||||
// create a sketch on the XY plane
 | 
			
		||||
sketch000 = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line(end = [0, innerDiameter / 2])
 | 
			
		||||
"#;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -249,7 +249,7 @@ mod tests {
 | 
			
		||||
    async fn test_get_changed_program_same_code() {
 | 
			
		||||
        let new = r#"// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -280,7 +280,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
 | 
			
		||||
    async fn test_get_changed_program_same_code_changed_whitespace() {
 | 
			
		||||
        let old = r#" // Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -292,7 +292,7 @@ shell(firstSketch, faces = [END], thickness = 0.25) "#;
 | 
			
		||||
 | 
			
		||||
        let new = r#"// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -325,7 +325,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
 | 
			
		||||
    async fn test_get_changed_program_same_code_changed_code_comment_start_of_program() {
 | 
			
		||||
        let old = r#" // Removed the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -337,7 +337,7 @@ shell(firstSketch, faces = [END], thickness = 0.25) "#;
 | 
			
		||||
 | 
			
		||||
        let new = r#"// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -372,7 +372,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
 | 
			
		||||
@bar
 | 
			
		||||
// Removed the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0]) // my thing
 | 
			
		||||
@ -386,7 +386,7 @@ shell(firstSketch, faces = [END], thickness = 0.25) "#;
 | 
			
		||||
@baz
 | 
			
		||||
// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -420,7 +420,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
 | 
			
		||||
    async fn test_get_changed_program_same_code_but_different_grid_setting() {
 | 
			
		||||
        let new = r#"// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -457,7 +457,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
 | 
			
		||||
    async fn test_get_changed_program_same_code_but_different_edge_visiblity_setting() {
 | 
			
		||||
        let new = r#"// Remove the end face for the extrusion.
 | 
			
		||||
firstSketch = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([-12, 12], %)
 | 
			
		||||
  |> startProfile(at = [-12, 12])
 | 
			
		||||
  |> line(end = [24, 0])
 | 
			
		||||
  |> line(end = [0, -24])
 | 
			
		||||
  |> line(end = [-24, 0])
 | 
			
		||||
@ -608,7 +608,7 @@ startSketchOn('XY')
 | 
			
		||||
importedCube
 | 
			
		||||
 | 
			
		||||
sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([-134.53, -56.17], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [-134.53, -56.17])
 | 
			
		||||
  |> angledLine(angle = 0, length = 79.05, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 76.28)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $seg01)
 | 
			
		||||
@ -622,7 +622,7 @@ sketch002 = startSketchOn(extrude001, face = seg01)
 | 
			
		||||
        let other_file = (
 | 
			
		||||
            std::path::PathBuf::from("toBeImported.kcl"),
 | 
			
		||||
            r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
profile001 = startProfileAt([281.54, 305.81], sketch001)
 | 
			
		||||
profile001 = startProfile(sketch001, at = [281.54, 305.81])
 | 
			
		||||
  |> angledLine(angle = 0, length = 123.43, tag = $rectangleSegmentA001)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 85.99)
 | 
			
		||||
  |> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001))
 | 
			
		||||
 | 
			
		||||
@ -1295,7 +1295,7 @@ yo = 5 + 6
 | 
			
		||||
abc = 3
 | 
			
		||||
identifierGuy = 5
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
|> startProfileAt([-1.2, 4.83], %)
 | 
			
		||||
|> startProfile(at = [-1.2, 4.83])
 | 
			
		||||
|> line(end = [2.8, 0])
 | 
			
		||||
|> angledLine(angle = 100 + 100, length = 3.01)
 | 
			
		||||
|> angledLine(angle = abc, length = 3.02)
 | 
			
		||||
@ -1312,7 +1312,7 @@ yo2 = hmm([identifierGuy + 5])"#;
 | 
			
		||||
    async fn test_execute_with_pipe_substitutions_unary() {
 | 
			
		||||
        let ast = r#"const myVar = 3
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [3, 4], tag = $seg01)
 | 
			
		||||
  |> line(end = [
 | 
			
		||||
  min(segLen(seg01), myVar),
 | 
			
		||||
@ -1327,7 +1327,7 @@ const part001 = startSketchOn(XY)
 | 
			
		||||
    async fn test_execute_with_pipe_substitutions() {
 | 
			
		||||
        let ast = r#"const myVar = 3
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [3, 4], tag = $seg01)
 | 
			
		||||
  |> line(end = [
 | 
			
		||||
  min(segLen(seg01), myVar),
 | 
			
		||||
@ -1350,7 +1350,7 @@ const arrExpShouldNotBeIncluded = [1, 2, 3]
 | 
			
		||||
const objExpShouldNotBeIncluded = { a: 1, b: 2, c: 3 }
 | 
			
		||||
 | 
			
		||||
const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> yLine(endAbsolute = 1)
 | 
			
		||||
  |> xLine(length = 3.84) // selection-range-7ish-before-this
 | 
			
		||||
 | 
			
		||||
@ -1371,7 +1371,7 @@ fn thing = () => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const firstExtrude = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, l])
 | 
			
		||||
  |> line(end = [w, 0])
 | 
			
		||||
  |> line(end = [0, thing()])
 | 
			
		||||
@ -1392,7 +1392,7 @@ fn thing = (x) => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const firstExtrude = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, l])
 | 
			
		||||
  |> line(end = [w, 0])
 | 
			
		||||
  |> line(end = [0, thing(8)])
 | 
			
		||||
@ -1413,7 +1413,7 @@ fn thing = (x) => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const firstExtrude = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, l])
 | 
			
		||||
  |> line(end = [w, 0])
 | 
			
		||||
  |> line(end = thing(8))
 | 
			
		||||
@ -1438,7 +1438,7 @@ fn thing = (x) => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const firstExtrude = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, l])
 | 
			
		||||
  |> line(end = [w, 0])
 | 
			
		||||
  |> line(end = [0, thing(8)])
 | 
			
		||||
@ -1452,7 +1452,7 @@ const firstExtrude = startSketchOn(XY)
 | 
			
		||||
    async fn test_execute_with_function_sketch() {
 | 
			
		||||
        let ast = r#"fn box = (h, l, w) => {
 | 
			
		||||
 const myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, l])
 | 
			
		||||
    |> line(end = [w, 0])
 | 
			
		||||
    |> line(end = [0, -l])
 | 
			
		||||
@ -1471,7 +1471,7 @@ const fnBox = box(3, 6, 10)"#;
 | 
			
		||||
    async fn test_get_member_of_object_with_function_period() {
 | 
			
		||||
        let ast = r#"fn box = (obj) => {
 | 
			
		||||
 let myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(obj.start, %)
 | 
			
		||||
    |> startProfile(at = obj.start)
 | 
			
		||||
    |> line(end = [0, obj.l])
 | 
			
		||||
    |> line(end = [obj.w, 0])
 | 
			
		||||
    |> line(end = [0, -obj.l])
 | 
			
		||||
@ -1490,7 +1490,7 @@ const thisBox = box({start: [0,0], l: 6, w: 10, h: 3})
 | 
			
		||||
    async fn test_get_member_of_object_with_function_brace() {
 | 
			
		||||
        let ast = r#"fn box = (obj) => {
 | 
			
		||||
 let myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(obj["start"], %)
 | 
			
		||||
    |> startProfile(at = obj["start"])
 | 
			
		||||
    |> line(end = [0, obj["l"]])
 | 
			
		||||
    |> line(end = [obj["w"], 0])
 | 
			
		||||
    |> line(end = [0, -obj["l"]])
 | 
			
		||||
@ -1509,7 +1509,7 @@ const thisBox = box({start: [0,0], l: 6, w: 10, h: 3})
 | 
			
		||||
    async fn test_get_member_of_object_with_function_mix_period_brace() {
 | 
			
		||||
        let ast = r#"fn box = (obj) => {
 | 
			
		||||
 let myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(obj["start"], %)
 | 
			
		||||
    |> startProfile(at = obj["start"])
 | 
			
		||||
    |> line(end = [0, obj["l"]])
 | 
			
		||||
    |> line(end = [obj["w"], 0])
 | 
			
		||||
    |> line(end = [10 - obj["w"], -obj.l])
 | 
			
		||||
@ -1531,7 +1531,7 @@ const thisBox = box({start: [0,0], l: 6, w: 10, h: 3})
 | 
			
		||||
fn test2 = () => {
 | 
			
		||||
  return {
 | 
			
		||||
    thing: startSketchOn(XY)
 | 
			
		||||
      |> startProfileAt([0, 0], %)
 | 
			
		||||
      |> startProfile(at = [0, 0])
 | 
			
		||||
      |> line(end = [0, 1])
 | 
			
		||||
      |> line(end = [1, 0])
 | 
			
		||||
      |> line(end = [0, -1])
 | 
			
		||||
@ -1552,7 +1552,7 @@ x2.thing
 | 
			
		||||
    async fn test_execute_with_function_sketch_loop_objects() {
 | 
			
		||||
        let ast = r#"fn box = (obj) => {
 | 
			
		||||
let myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(obj.start, %)
 | 
			
		||||
    |> startProfile(at = obj.start)
 | 
			
		||||
    |> line(end = [0, obj.l])
 | 
			
		||||
    |> line(end = [obj.w, 0])
 | 
			
		||||
    |> line(end = [0, -obj.l])
 | 
			
		||||
@ -1574,7 +1574,7 @@ for var in [{start: [0,0], l: 6, w: 10, h: 3}, {start: [-10,-10], l: 3, w: 5, h:
 | 
			
		||||
    async fn test_execute_with_function_sketch_loop_array() {
 | 
			
		||||
        let ast = r#"fn box = (h, l, w, start) => {
 | 
			
		||||
 const myBox = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, l])
 | 
			
		||||
    |> line(end = [w, 0])
 | 
			
		||||
    |> line(end = [0, -l])
 | 
			
		||||
@ -1596,7 +1596,7 @@ for var in [[3, 6, 10, [0,0]], [1.5, 3, 5, [-10,-10]]] {
 | 
			
		||||
    async fn test_get_member_of_array_with_function() {
 | 
			
		||||
        let ast = r#"fn box = (arr) => {
 | 
			
		||||
 let myBox =startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(arr[0], %)
 | 
			
		||||
    |> startProfile(at = arr[0])
 | 
			
		||||
    |> line(end = [0, arr[1]])
 | 
			
		||||
    |> line(end = [arr[2], 0])
 | 
			
		||||
    |> line(end = [0, -arr[1]])
 | 
			
		||||
@ -1850,7 +1850,7 @@ const leg2 = 8 // inches
 | 
			
		||||
fn thickness = () => { return 0.56 }
 | 
			
		||||
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, leg1])
 | 
			
		||||
  |> line(end = [leg2, 0])
 | 
			
		||||
  |> line(end = [0, -thickness()])
 | 
			
		||||
@ -2061,7 +2061,7 @@ const thickness_squared = distance * p * FOS * 6 / sigmaAllow
 | 
			
		||||
const thickness = 0.56 // inches. App does not support square root function yet
 | 
			
		||||
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, leg1])
 | 
			
		||||
  |> line(end = [leg2, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -2095,7 +2095,7 @@ const leg2 = 8 // inches
 | 
			
		||||
const thickness_squared = (distance * p * FOS * 6 / (sigmaAllow - width))
 | 
			
		||||
const thickness = 0.32 // inches. App does not support square root function yet
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, leg1])
 | 
			
		||||
  |> line(end = [leg2, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -2119,7 +2119,7 @@ const leg2 = 8 // inches
 | 
			
		||||
const thickness_squared = distance * p * FOS * 6 / (sigmaAllow - width)
 | 
			
		||||
const thickness = 0.32 // inches. App does not support square root function yet
 | 
			
		||||
const bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, leg1])
 | 
			
		||||
  |> line(end = [leg2, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -2145,7 +2145,7 @@ let w = f() + f()
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_ids_stable_between_executions() {
 | 
			
		||||
        let code = r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
|> startProfileAt([61.74, 206.13], %)
 | 
			
		||||
|> startProfile(at = [61.74, 206.13])
 | 
			
		||||
|> xLine(length = 305.11, tag = $seg01)
 | 
			
		||||
|> yLine(length = -291.85)
 | 
			
		||||
|> xLine(length = -segLen(seg01))
 | 
			
		||||
@ -2172,7 +2172,7 @@ let w = f() + f()
 | 
			
		||||
        let id_generator = cache::read_old_ast().await.unwrap().exec_state.mod_local.id_generator;
 | 
			
		||||
 | 
			
		||||
        let code = r#"sketch001 = startSketchOn(XZ)
 | 
			
		||||
|> startProfileAt([62.74, 206.13], %)
 | 
			
		||||
|> startProfile(at = [62.74, 206.13])
 | 
			
		||||
|> xLine(length = 305.11, tag = $seg01)
 | 
			
		||||
|> yLine(length = -291.85)
 | 
			
		||||
|> xLine(length = -segLen(seg01))
 | 
			
		||||
@ -2198,7 +2198,7 @@ let w = f() + f()
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_changing_a_setting_updates_the_cached_state() {
 | 
			
		||||
        let code = r#"sketch001 = startSketchOn('XZ')
 | 
			
		||||
|> startProfileAt([61.74, 206.13], %)
 | 
			
		||||
|> startProfile(at = [61.74, 206.13])
 | 
			
		||||
|> xLine(length = 305.11, tag = $seg01)
 | 
			
		||||
|> yLine(length = -291.85)
 | 
			
		||||
|> xLine(length = -segLen(seg01))
 | 
			
		||||
@ -2267,7 +2267,7 @@ let w = f() + f()
 | 
			
		||||
    async fn read_tag_version() {
 | 
			
		||||
        let ast = r#"fn bar(t) {
 | 
			
		||||
  return startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> angledLine(
 | 
			
		||||
        angle = -60,
 | 
			
		||||
        length = segLen(t),
 | 
			
		||||
@ -2277,7 +2277,7 @@ let w = f() + f()
 | 
			
		||||
}
 | 
			
		||||
  
 | 
			
		||||
sketch = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0], tag = $tag0)
 | 
			
		||||
  |> line(end = [0, 0])
 | 
			
		||||
@ -2290,7 +2290,7 @@ fn foo() {
 | 
			
		||||
solid = sketch |> extrude(length = 10)
 | 
			
		||||
// tag0 tags a face
 | 
			
		||||
sketch2 = startSketchOn(solid, face = tag0)
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> line(end = [0, 1])
 | 
			
		||||
  |> line(end = [1, 0])
 | 
			
		||||
  |> line(end = [0, 0])
 | 
			
		||||
 | 
			
		||||
@ -101,7 +101,7 @@ const thickness = 0.5
 | 
			
		||||
 | 
			
		||||
// Create the sketch to be revolved around the y-axis. Use the small diameter, large diameter, length, and thickness to define the sketch.
 | 
			
		||||
const Part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([pipeLargeDia - (thickness / 2), 38], %)
 | 
			
		||||
  |> startProfile(at = [pipeLargeDia - (thickness / 2), 38])
 | 
			
		||||
  |> line([thickness, 0], %)
 | 
			
		||||
  |> line([0, -1], %)
 | 
			
		||||
  |> angledLine(angle = 60, endAbsoluteX = pipeSmallDia + thickness)
 | 
			
		||||
@ -131,7 +131,7 @@ const thickness = 0.5
 | 
			
		||||
 | 
			
		||||
// Create the sketch to be revolved around the y-axis. Use the small diameter, large diameter, length, and thickness to define the sketch.
 | 
			
		||||
const part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([pipeLargeDia - (thickness / 2), 38], %)
 | 
			
		||||
  |> startProfile(at = [pipeLargeDia - (thickness / 2), 38])
 | 
			
		||||
  |> line([thickness, 0], %)
 | 
			
		||||
  |> line([0, -1], %)
 | 
			
		||||
  |> angledLine(angle = 60, endAbsoluteX = pipeSmallDia + thickness)
 | 
			
		||||
 | 
			
		||||
@ -101,7 +101,7 @@ const filletR = 0.25
 | 
			
		||||
 | 
			
		||||
// Sketch the bracket and extrude with fillets
 | 
			
		||||
const bracket = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line([0, wallMountL], %, $outerEdge)
 | 
			
		||||
  |> line([-shelfMountL, 0], %)
 | 
			
		||||
  |> line([0, -thickness], %)
 | 
			
		||||
@ -148,7 +148,7 @@ const filletR = 0.25
 | 
			
		||||
 | 
			
		||||
// Sketch the bracket and extrude with fillets
 | 
			
		||||
const bracket = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line([0, wallMountL], %, $outerEdge)
 | 
			
		||||
  |> line([-shelfMountL, 0], %)
 | 
			
		||||
  |> line([0, -thickness], %)
 | 
			
		||||
 | 
			
		||||
@ -264,7 +264,7 @@ impl Backend {
 | 
			
		||||
            completion_list.push(
 | 
			
		||||
                r#"fn cube = (pos, scale) => {
 | 
			
		||||
  const sg = startSketchOn('XY')
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line([0, scale], %)
 | 
			
		||||
    |> line([scale, 0], %)
 | 
			
		||||
    |> line([0, -scale], %)
 | 
			
		||||
 | 
			
		||||
@ -727,7 +727,7 @@ async fn test_kcl_lsp_completions_tags() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([11.19, 28.35], %)
 | 
			
		||||
  |> startProfile(at = [11.19, 28.35])
 | 
			
		||||
  |> line(end = [28.67, -13.25], tag = $here)
 | 
			
		||||
  |> line(end = [-4.12, -22.81])
 | 
			
		||||
  |> line(end = [-33.24, 14.55])
 | 
			
		||||
@ -897,7 +897,7 @@ fn bar(x: string): string {
 | 
			
		||||
bar("an arg")
 | 
			
		||||
 | 
			
		||||
startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
"#
 | 
			
		||||
@ -1219,7 +1219,7 @@ async fn test_kcl_lsp_semantic_tokens_with_modifiers() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -1521,7 +1521,7 @@ async fn test_kcl_lsp_document_symbol_tag() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([11.19, 28.35], %)
 | 
			
		||||
  |> startProfile(at = [11.19, 28.35])
 | 
			
		||||
  |> line(end = [28.67, -13.25], tag = $here)
 | 
			
		||||
  |> line(end = [-4.12, -22.81])
 | 
			
		||||
  |> line(end = [-33.24, 14.55])
 | 
			
		||||
@ -1567,7 +1567,7 @@ async fn test_kcl_lsp_formatting() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"startSketchOn(XY)
 | 
			
		||||
                    |> startProfileAt([0,0], %)"#
 | 
			
		||||
                    |> startProfile(at = [0,0])"#
 | 
			
		||||
                    .to_string(),
 | 
			
		||||
            },
 | 
			
		||||
        })
 | 
			
		||||
@ -1598,7 +1598,7 @@ async fn test_kcl_lsp_formatting() {
 | 
			
		||||
    assert_eq!(
 | 
			
		||||
        formatting[0].new_text,
 | 
			
		||||
        r#"startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0, 0], %)"#
 | 
			
		||||
    |> startProfile(at = [0, 0])"#
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1624,7 +1624,7 @@ overHangLength = .4
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve the inside bearing piece
 | 
			
		||||
insideRevolve = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([insideDia / 2, 0], %)
 | 
			
		||||
  |> startProfile(at = [insideDia / 2, 0])
 | 
			
		||||
  |> line(end = [0, thickness + sphereDia / 2])
 | 
			
		||||
  |> line(end = [overHangLength, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -1638,10 +1638,7 @@ insideRevolve = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve one of the balls and duplicate it using a circular pattern. (This is currently a workaround, we have a bug with rotating on a sketch that touches the rotation axis)
 | 
			
		||||
sphere = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       0.05 + insideDia / 2 + thickness,
 | 
			
		||||
       0 - 0.05
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [0.05 + insideDia / 2 + thickness, 0 - 0.05])
 | 
			
		||||
  |> line(end = [sphereDia - 0.1, 0])
 | 
			
		||||
  |> arc(angle_start = 0, angle_end = -180, radius = sphereDia / 2 - 0.05)
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -1656,10 +1653,7 @@ sphere = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve the outside bearing
 | 
			
		||||
outsideRevolve = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
       insideDia / 2 + thickness + sphereDia,
 | 
			
		||||
       0
 | 
			
		||||
     ], %)
 | 
			
		||||
  |> startProfile(at = [insideDia / 2 + thickness + sphereDia, 0])
 | 
			
		||||
  |> line(end = [0, sphereDia / 2])
 | 
			
		||||
  |> line(end = [-overHangLength + thickness, 0])
 | 
			
		||||
  |> line(end = [0, thickness])
 | 
			
		||||
@ -1702,7 +1696,7 @@ outsideRevolve = startSketchOn(XZ)
 | 
			
		||||
        tower_lsp::lsp_types::Range {
 | 
			
		||||
            start: tower_lsp::lsp_types::Position { line: 0, character: 0 },
 | 
			
		||||
            end: tower_lsp::lsp_types::Position {
 | 
			
		||||
                line: 56,
 | 
			
		||||
                line: 50,
 | 
			
		||||
                character: 29
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -1720,7 +1714,7 @@ overHangLength = .4
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve the inside bearing piece
 | 
			
		||||
insideRevolve = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([insideDia / 2, 0], %)
 | 
			
		||||
  |> startProfile(at = [insideDia / 2, 0])
 | 
			
		||||
  |> line(end = [0, thickness + sphereDia / 2])
 | 
			
		||||
  |> line(end = [overHangLength, 0])
 | 
			
		||||
  |> line(end = [0, -thickness])
 | 
			
		||||
@ -1734,10 +1728,10 @@ insideRevolve = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve one of the balls and duplicate it using a circular pattern. (This is currently a workaround, we have a bug with rotating on a sketch that touches the rotation axis)
 | 
			
		||||
sphere = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
  |> startProfile(at = [
 | 
			
		||||
       0.05 + insideDia / 2 + thickness,
 | 
			
		||||
       0 - 0.05
 | 
			
		||||
     ], %)
 | 
			
		||||
     ])
 | 
			
		||||
  |> line(end = [sphereDia - 0.1, 0])
 | 
			
		||||
  |> arc(angle_start = 0, angle_end = -180, radius = sphereDia / 2 - 0.05)
 | 
			
		||||
  |> close()
 | 
			
		||||
@ -1752,10 +1746,10 @@ sphere = startSketchOn(XZ)
 | 
			
		||||
 | 
			
		||||
// Sketch and revolve the outside bearing
 | 
			
		||||
outsideRevolve = startSketchOn(XZ)
 | 
			
		||||
  |> startProfileAt([
 | 
			
		||||
  |> startProfile(at = [
 | 
			
		||||
       insideDia / 2 + thickness + sphereDia,
 | 
			
		||||
       0
 | 
			
		||||
     ], %)
 | 
			
		||||
     ])
 | 
			
		||||
  |> line(end = [0, sphereDia / 2])
 | 
			
		||||
  |> line(end = [-overHangLength + thickness, 0])
 | 
			
		||||
  |> line(end = [0, thickness])
 | 
			
		||||
@ -2002,7 +1996,7 @@ async fn test_copilot_lsp_completions_raw() {
 | 
			
		||||
        .get_completions(
 | 
			
		||||
            "kcl".to_string(),
 | 
			
		||||
            r#"bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  "#
 | 
			
		||||
            .to_string(),
 | 
			
		||||
            r#"  |> close()
 | 
			
		||||
@ -2021,7 +2015,7 @@ async fn test_copilot_lsp_completions_raw() {
 | 
			
		||||
        .get_completions(
 | 
			
		||||
            "kcl".to_string(),
 | 
			
		||||
            r#"bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  "#
 | 
			
		||||
            .to_string(),
 | 
			
		||||
            r#"  |> close()
 | 
			
		||||
@ -2061,7 +2055,7 @@ async fn test_copilot_lsp_completions() {
 | 
			
		||||
            position: crate::lsp::copilot::types::CopilotPosition { line: 3, character: 3 },
 | 
			
		||||
            relative_path: "test.copilot".to_string(),
 | 
			
		||||
            source: r#"bracket = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  
 | 
			
		||||
  |> close()
 | 
			
		||||
  |> extrude(length = 10)
 | 
			
		||||
@ -2385,7 +2379,7 @@ async fn kcl_test_kcl_lsp_diagnostics_on_execution_error() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2406,7 +2400,7 @@ async fn kcl_test_kcl_lsp_diagnostics_on_execution_error() {
 | 
			
		||||
 | 
			
		||||
    // Update the text.
 | 
			
		||||
    let new_text = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2446,7 +2440,7 @@ async fn kcl_test_kcl_lsp_full_to_empty_file_updates_ast_and_memory() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2491,7 +2485,7 @@ async fn kcl_test_kcl_lsp_code_unchanged_but_has_diagnostics_reexecute() {
 | 
			
		||||
    let server = kcl_lsp_server(true).await.unwrap();
 | 
			
		||||
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2579,7 +2573,7 @@ async fn kcl_test_kcl_lsp_code_and_ast_unchanged_but_has_diagnostics_reexecute()
 | 
			
		||||
    let server = kcl_lsp_server(true).await.unwrap();
 | 
			
		||||
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2656,7 +2650,7 @@ async fn kcl_test_kcl_lsp_cant_execute_set() {
 | 
			
		||||
    let server = kcl_lsp_server(true).await.unwrap();
 | 
			
		||||
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2737,7 +2731,7 @@ async fn test_kcl_lsp_folding() {
 | 
			
		||||
                language_id: "kcl".to_string(),
 | 
			
		||||
                version: 1,
 | 
			
		||||
                text: r#"startSketchOn(XY)
 | 
			
		||||
                    |> startProfileAt([0,0], %)"#
 | 
			
		||||
                    |> startProfile(at = [0,0])"#
 | 
			
		||||
                    .to_string(),
 | 
			
		||||
            },
 | 
			
		||||
        })
 | 
			
		||||
@ -2776,7 +2770,7 @@ async fn kcl_test_kcl_lsp_code_with_parse_error_and_ast_unchanged_but_has_diagno
 | 
			
		||||
    let server = kcl_lsp_server(false).await.unwrap();
 | 
			
		||||
 | 
			
		||||
    let code = r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2831,7 +2825,7 @@ async fn kcl_test_kcl_lsp_code_with_lint_and_ast_unchanged_but_has_diagnostics_r
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2885,7 +2879,7 @@ async fn kcl_test_kcl_lsp_code_with_lint_and_parse_error_and_ast_unchanged_but_h
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -2940,7 +2934,7 @@ async fn kcl_test_kcl_lsp_code_lint_and_ast_unchanged_but_has_diagnostics_reexec
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0], tag = $seg01)
 | 
			
		||||
@ -3001,7 +2995,7 @@ async fn kcl_test_kcl_lsp_code_lint_reexecute_new_lint() {
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0], tag = $seg01)
 | 
			
		||||
@ -3040,7 +3034,7 @@ part001 = startSketchOn(XY)
 | 
			
		||||
                range: None,
 | 
			
		||||
                range_length: None,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0], tag = $seg01)
 | 
			
		||||
@ -3070,7 +3064,7 @@ async fn kcl_test_kcl_lsp_code_lint_reexecute_new_ast_error() {
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0], tag = $seg01)
 | 
			
		||||
@ -3109,7 +3103,7 @@ part001 = startSketchOn(XY)
 | 
			
		||||
                range: None,
 | 
			
		||||
                range_length: None,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> ^^^^startProfileAt([-10, -10], %)
 | 
			
		||||
  |> ^^^^startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0], tag = $seg01)
 | 
			
		||||
@ -3139,7 +3133,7 @@ async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_parse_error() {
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -3186,7 +3180,7 @@ part001 = startSketchOn(XY)
 | 
			
		||||
                range: None,
 | 
			
		||||
                range_length: None,
 | 
			
		||||
                text: r#"part001 = startSketchOn(XY)
 | 
			
		||||
  |> ^^^^startProfileAt([-10, -10], %)
 | 
			
		||||
  |> ^^^^startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -3224,7 +3218,7 @@ async fn kcl_test_kcl_lsp_code_lint_reexecute_had_lint_new_execution_error() {
 | 
			
		||||
 | 
			
		||||
    let code = r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0])
 | 
			
		||||
  |> line(end = [0, 20])
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -3276,7 +3270,7 @@ part001 = startSketchOn(XY)
 | 
			
		||||
                range_length: None,
 | 
			
		||||
                text: r#"LINT = 1
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([-10, -10], %)
 | 
			
		||||
  |> startProfile(at = [-10, -10])
 | 
			
		||||
  |> line(end = [20, 0], tag = $seg01)
 | 
			
		||||
  |> line(end = [0, 20], tag = $seg01)
 | 
			
		||||
  |> line(end = [-20, 0])
 | 
			
		||||
@ -3433,7 +3427,7 @@ fn bar(x: string): string {
 | 
			
		||||
bar("an arg")
 | 
			
		||||
 | 
			
		||||
startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
"#
 | 
			
		||||
 | 
			
		||||
@ -528,13 +528,13 @@ mod test {
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn test_parse_digest() {
 | 
			
		||||
        let prog1_string = r#"startSketchOn('XY')
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line([5, 5], %)
 | 
			
		||||
"#;
 | 
			
		||||
        let prog1_digest = crate::parsing::top_level_parse(prog1_string).unwrap().compute_digest();
 | 
			
		||||
 | 
			
		||||
        let prog2_string = r#"startSketchOn('XY')
 | 
			
		||||
    |> startProfileAt([0, 2], %)
 | 
			
		||||
    |> startProfile(at = [0, 2])
 | 
			
		||||
    |> line([5, 5], %)
 | 
			
		||||
"#;
 | 
			
		||||
        let prog2_digest = crate::parsing::top_level_parse(prog2_string).unwrap().compute_digest();
 | 
			
		||||
@ -542,7 +542,7 @@ mod test {
 | 
			
		||||
        assert!(prog1_digest != prog2_digest);
 | 
			
		||||
 | 
			
		||||
        let prog3_string = r#"startSketchOn('XY')
 | 
			
		||||
    |> startProfileAt([0, 0], %)
 | 
			
		||||
    |> startProfile(at = [0, 0])
 | 
			
		||||
    |> line([5, 5], %)
 | 
			
		||||
"#;
 | 
			
		||||
        let prog3_digest = crate::parsing::top_level_parse(prog3_string).unwrap().compute_digest();
 | 
			
		||||
 | 
			
		||||
@ -3624,11 +3624,11 @@ mod tests {
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_get_lsp_folding_ranges() {
 | 
			
		||||
        let code = r#"const part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0.0000000000, 5.0000000000], %)
 | 
			
		||||
  |> startProfile(at = [0.0000000000, 5.0000000000])
 | 
			
		||||
    |> line([0.4900857016, -0.0240763666], %)
 | 
			
		||||
 | 
			
		||||
startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0.0000000000, 5.0000000000], %)
 | 
			
		||||
  |> startProfile(at = [0.0000000000, 5.0000000000])
 | 
			
		||||
    |> line([0.4900857016, -0.0240763666], %)
 | 
			
		||||
 | 
			
		||||
const part002 = "part002"
 | 
			
		||||
@ -3663,7 +3663,7 @@ ghi("things")
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_get_lsp_symbols() {
 | 
			
		||||
        let code = r#"const part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([0.0000000000, 5.0000000000], %)
 | 
			
		||||
  |> startProfile(at = [0.0000000000, 5.0000000000])
 | 
			
		||||
    |> line([0.4900857016, -0.0240763666], %)
 | 
			
		||||
 | 
			
		||||
const part002 = "part002"
 | 
			
		||||
@ -3688,7 +3688,7 @@ const h = 30
 | 
			
		||||
 | 
			
		||||
// st
 | 
			
		||||
const cylinder = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([50, 0], %)
 | 
			
		||||
  |> startProfile(at = [50, 0])
 | 
			
		||||
  |> arc({
 | 
			
		||||
       angle_end: 360,
 | 
			
		||||
       angle_start: 0,
 | 
			
		||||
@ -3708,7 +3708,7 @@ const h = 30
 | 
			
		||||
 | 
			
		||||
// st
 | 
			
		||||
const cylinder = startSketchOn('-XZ')
 | 
			
		||||
  |> startProfileAt([50, 0], %)
 | 
			
		||||
  |> startProfile(at = [50, 0])
 | 
			
		||||
  // comment
 | 
			
		||||
  |> arc({
 | 
			
		||||
       angle_end: 360,
 | 
			
		||||
@ -3725,7 +3725,7 @@ const cylinder = startSketchOn('-XZ')
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_ast_in_comment_inline() {
 | 
			
		||||
        let some_program_string = r#"const part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([0,0], %)
 | 
			
		||||
  |> startProfile(at = [0,0])
 | 
			
		||||
  |> xLine(length = 5) // lin
 | 
			
		||||
"#;
 | 
			
		||||
        let program = crate::parsing::top_level_parse(some_program_string).unwrap();
 | 
			
		||||
 | 
			
		||||
@ -3340,7 +3340,7 @@ comment */
 | 
			
		||||
/* comment at start */
 | 
			
		||||
 | 
			
		||||
mySk1 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)"#;
 | 
			
		||||
  |> startProfile(at = [0, 0])"#;
 | 
			
		||||
        let tokens = crate::parsing::token::lex(test_program, ModuleId::default()).unwrap();
 | 
			
		||||
        let program = program.parse(tokens.as_slice()).unwrap();
 | 
			
		||||
        let mut starting_comments = program.inner.non_code_meta.start_nodes;
 | 
			
		||||
 | 
			
		||||
@ -81,7 +81,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Add color to an extruded solid.
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(endAbsolute = [10, 0])
 | 
			
		||||
///   |> line(endAbsolute = [0, 10])
 | 
			
		||||
///   |> line(endAbsolute = [-10, 0])
 | 
			
		||||
@ -108,7 +108,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// // Add color to different solids.
 | 
			
		||||
/// fn cube(center) {
 | 
			
		||||
///    return startSketchOn(XY)
 | 
			
		||||
///    |> startProfileAt([center[0] - 10, center[1] - 10], %)
 | 
			
		||||
///    |> startProfile(at = [center[0] - 10, center[1] - 10])
 | 
			
		||||
///    |> line(endAbsolute = [center[0] + 10, center[1] - 10])
 | 
			
		||||
///     |> line(endAbsolute = [center[0] + 10, center[1] + 10])
 | 
			
		||||
///     |> line(endAbsolute = [center[0] - 10, center[1] + 10])
 | 
			
		||||
@ -128,7 +128,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// // You can set the appearance before or after you shell it will yield the same result.
 | 
			
		||||
/// // This example shows setting the appearance _after_ the shell.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -151,7 +151,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// // You can set the appearance before or after you shell it will yield the same result.
 | 
			
		||||
/// // This example shows setting the appearance _before_ the shell.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -174,7 +174,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
 | 
			
		||||
/// // This example shows _before_ the pattern.
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 2])
 | 
			
		||||
///   |> line(end = [3, 1])
 | 
			
		||||
///   |> line(end = [0, -4])
 | 
			
		||||
@ -197,7 +197,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
 | 
			
		||||
/// // This example shows _after_ the pattern.
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 2])
 | 
			
		||||
///   |> line(end = [3, 1])
 | 
			
		||||
///   |> line(end = [0, -4])
 | 
			
		||||
@ -219,7 +219,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Color the result of a 2D pattern that was extruded.
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([.5, 25], %)
 | 
			
		||||
///   |> startProfile(at = [.5, 25])
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [-1, 0])
 | 
			
		||||
///   |> line(end = [0, -5])
 | 
			
		||||
@ -244,7 +244,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
 | 
			
		||||
@ -659,10 +659,6 @@ impl Args {
 | 
			
		||||
        Ok((sketches, sketch))
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub(crate) fn get_data_and_sketch_surface(&self) -> Result<([TyF64; 2], SketchSurface, Option<TagNode>), KclError> {
 | 
			
		||||
        FromArgs::from_args(self, 0)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub(crate) async fn get_adjacent_face_to_tag(
 | 
			
		||||
        &self,
 | 
			
		||||
        exec_state: &mut ExecState,
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,7 @@ pub async fn reduce(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
///   // Start the decagon sketch at this point.
 | 
			
		||||
///   startOfDecagonSketch = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([(cos(0)*radius), (sin(0) * radius)], %)
 | 
			
		||||
///     |> startProfile(at = [(cos(0)*radius), (sin(0) * radius)])
 | 
			
		||||
///
 | 
			
		||||
///   // Use a `reduce` to draw the remaining decagon sides.
 | 
			
		||||
///   // For each number in the array 1..10, run the given function,
 | 
			
		||||
@ -159,7 +159,7 @@ pub async fn reduce(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// fn decagon(radius):
 | 
			
		||||
///     stepAngle = (1/10) * TAU
 | 
			
		||||
///     plane = startSketchOn('XY')
 | 
			
		||||
///     startOfDecagonSketch = startProfileAt([(cos(0)*radius), (sin(0) * radius)], plane)
 | 
			
		||||
///     startOfDecagonSketch = startProfile(plane, at = [(cos(0)*radius), (sin(0) * radius)])
 | 
			
		||||
///
 | 
			
		||||
///     // Here's the reduce part.
 | 
			
		||||
///     partialDecagon = startOfDecagonSketch
 | 
			
		||||
 | 
			
		||||
@ -46,7 +46,7 @@ pub async fn chamfer(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// chamferLength = 2
 | 
			
		||||
///
 | 
			
		||||
/// mountingPlateSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([-width/2, -length/2], %)
 | 
			
		||||
///   |> startProfile(at = [-width/2, -length/2])
 | 
			
		||||
///   |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
 | 
			
		||||
///   |> line(endAbsolute = [width/2, length/2], tag = $edge2)
 | 
			
		||||
///   |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
 | 
			
		||||
@ -68,7 +68,7 @@ pub async fn chamfer(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// // Sketch on the face of a chamfer.
 | 
			
		||||
/// fn cube(pos, scale) {
 | 
			
		||||
/// sg = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt(pos, %)
 | 
			
		||||
///     |> startProfile(at = pos)
 | 
			
		||||
///     |> line(end = [0, scale])
 | 
			
		||||
///     |> line(end = [scale, 0])
 | 
			
		||||
///     |> line(end = [0, -scale])
 | 
			
		||||
@ -87,7 +87,7 @@ pub async fn chamfer(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///     )  
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(part001, face = chamfer1)
 | 
			
		||||
///     |> startProfileAt([10, 10], %)
 | 
			
		||||
///     |> startProfile(at = [10, 10])
 | 
			
		||||
///     |> line(end = [2, 0])
 | 
			
		||||
///     |> line(end = [0, 2])
 | 
			
		||||
///     |> line(end = [-2, 0])
 | 
			
		||||
 | 
			
		||||
@ -54,7 +54,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Clone a basic sketch and move it and extrude it.
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -78,7 +78,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Clone a basic solid and move it.
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -95,7 +95,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Translate and rotate a cloned sketch to create a loft.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///         |> startProfileAt([-10, 10], %)
 | 
			
		||||
///         |> startProfile(at = [-10, 10])
 | 
			
		||||
///         |> xLine(length = 20)
 | 
			
		||||
///         |> yLine(length = -20)
 | 
			
		||||
///         |> xLine(length = -20)
 | 
			
		||||
@ -112,7 +112,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Translate a cloned solid. Fillet only the clone.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///         |> startProfileAt([-10, 10], %)
 | 
			
		||||
///         |> startProfile(at = [-10, 10])
 | 
			
		||||
///         |> xLine(length = 20)
 | 
			
		||||
///         |> yLine(length = -20)
 | 
			
		||||
///         |> xLine(length = -20, tag = $filletTag)
 | 
			
		||||
@ -132,7 +132,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // You can reuse the tags from the original geometry with the cloned geometry.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10], tag = $sketchingFace)
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -143,7 +143,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///     |> extrude(length = 5)
 | 
			
		||||
///
 | 
			
		||||
/// startSketchOn(sketch002, face = sketchingFace)
 | 
			
		||||
///   |> startProfileAt([1, 1], %)
 | 
			
		||||
///   |> startProfile(at = [1, 1])
 | 
			
		||||
///   |> line(end = [8, 0])
 | 
			
		||||
///   |> line(end = [0, 8])
 | 
			
		||||
///   |> line(end = [-8, 0])
 | 
			
		||||
@ -160,7 +160,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// filletRadius = 2
 | 
			
		||||
///
 | 
			
		||||
/// mountingPlateSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([-width/2, -length/2], %)
 | 
			
		||||
///   |> startProfile(at = [-width/2, -length/2])
 | 
			
		||||
///   |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
 | 
			
		||||
///   |> line(endAbsolute = [width/2, length/2], tag = $edge2)
 | 
			
		||||
///   |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
 | 
			
		||||
@ -222,7 +222,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // This shows the cloned geometry will have the same tags as the original geometry.
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([4, 12], %)
 | 
			
		||||
///   |> startProfile(at = [4, 12])
 | 
			
		||||
///   |> line(end = [2, 0])
 | 
			
		||||
///   |> line(end = [0, -6])
 | 
			
		||||
///   |> line(end = [4, -6])
 | 
			
		||||
@ -239,7 +239,7 @@ pub async fn clone(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// // Sketch on the cloned face.
 | 
			
		||||
/// // exampleSketch002 = startSketchOn(example002, face = end01)
 | 
			
		||||
/// //  |> startProfileAt([4.5, -5], %)
 | 
			
		||||
/// //  |> startProfile(at = [4.5, -5])
 | 
			
		||||
/// //  |> line(end = [0, 5])
 | 
			
		||||
/// //  |> line(end = [5, 0])
 | 
			
		||||
/// //  |> line(end = [0, -5])
 | 
			
		||||
@ -520,7 +520,7 @@ mod tests {
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_clone_sketch() {
 | 
			
		||||
        let code = r#"cube = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10])
 | 
			
		||||
    |> line(end = [10, 0])
 | 
			
		||||
    |> line(end = [0, -10])
 | 
			
		||||
@ -568,7 +568,7 @@ clonedCube = clone(cube)
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_clone_solid() {
 | 
			
		||||
        let code = r#"cube = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %)
 | 
			
		||||
    |> startProfile(at = [0,0])
 | 
			
		||||
    |> line(end = [0, 10])
 | 
			
		||||
    |> line(end = [10, 0])
 | 
			
		||||
    |> line(end = [0, -10])
 | 
			
		||||
@ -627,7 +627,7 @@ clonedCube = clone(cube)
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_clone_sketch_with_tags() {
 | 
			
		||||
        let code = r#"cube = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %) // tag this one
 | 
			
		||||
    |> startProfile(at = [0,0]) // tag this one
 | 
			
		||||
    |> line(end = [0, 10], tag = $tag02)
 | 
			
		||||
    |> line(end = [10, 0], tag = $tag03)
 | 
			
		||||
    |> line(end = [0, -10], tag = $tag04)
 | 
			
		||||
@ -682,7 +682,7 @@ clonedCube = clone(cube)
 | 
			
		||||
    #[tokio::test(flavor = "multi_thread")]
 | 
			
		||||
    async fn kcl_test_clone_solid_with_tags() {
 | 
			
		||||
        let code = r#"cube = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %) // tag this one
 | 
			
		||||
    |> startProfile(at = [0,0]) // tag this one
 | 
			
		||||
    |> line(end = [0, 10], tag = $tag02)
 | 
			
		||||
    |> line(end = [10, 0], tag = $tag03)
 | 
			
		||||
    |> line(end = [0, -10], tag = $tag04)
 | 
			
		||||
@ -751,7 +751,7 @@ clonedCube = clone(cube)
 | 
			
		||||
        let code = r#"// Clone a basic solid and move it.
 | 
			
		||||
 | 
			
		||||
exampleSketch = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [-10, 0])
 | 
			
		||||
@ -826,7 +826,7 @@ clonedCube = clone(cube)
 | 
			
		||||
    #[ignore = "this test is not working yet, need to fix the edge cut ids"]
 | 
			
		||||
    async fn kcl_test_clone_solid_with_edge_cuts() {
 | 
			
		||||
        let code = r#"cube = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt([0,0], %) // tag this one
 | 
			
		||||
    |> startProfile(at = [0,0]) // tag this one
 | 
			
		||||
    |> line(end = [0, 10], tag = $tag02)
 | 
			
		||||
    |> line(end = [10, 0], tag = $tag03)
 | 
			
		||||
    |> line(end = [0, -10], tag = $tag04)
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -64,7 +64,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -87,7 +87,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -192,7 +192,7 @@ pub async fn intersect(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -214,7 +214,7 @@ pub async fn intersect(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -325,7 +325,7 @@ pub async fn subtract(exec_state: &mut ExecState, args: Args) -> Result<KclValue
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
@ -347,7 +347,7 @@ pub async fn subtract(exec_state: &mut ExecState, args: Args) -> Result<KclValue
 | 
			
		||||
///
 | 
			
		||||
/// fn cube(center, size) {
 | 
			
		||||
///     return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([center[0] - size, center[1] - size], %)
 | 
			
		||||
///         |> startProfile(at = [center[0] - size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] - size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] + size, center[1] + size])
 | 
			
		||||
///         |> line(endAbsolute = [center[0] - size, center[1] + size])
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ pub async fn get_opposite_edge(exec_state: &mut ExecState, args: Args) -> Result
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///        angle = 60,
 | 
			
		||||
@ -110,7 +110,7 @@ pub async fn get_next_adjacent_edge(exec_state: &mut ExecState, args: Args) -> R
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///        angle = 60,
 | 
			
		||||
@ -202,7 +202,7 @@ pub async fn get_previous_adjacent_edge(exec_state: &mut ExecState, args: Args)
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///        angle = 60,
 | 
			
		||||
@ -296,7 +296,7 @@ pub async fn get_common_edge(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// scale = 20
 | 
			
		||||
/// part001 = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, scale])
 | 
			
		||||
///     |> line(end = [scale, 0])
 | 
			
		||||
///     |> line(end = [0, -scale])
 | 
			
		||||
 | 
			
		||||
@ -62,7 +62,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// example = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///     angleStart = 120,
 | 
			
		||||
@ -83,7 +83,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([-10, 0], %)
 | 
			
		||||
///   |> startProfile(at = [-10, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///     angleStart = 120,
 | 
			
		||||
///     angleEnd = -60,
 | 
			
		||||
@ -105,7 +105,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([-10, 0], %)
 | 
			
		||||
///   |> startProfile(at = [-10, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///     angleStart = 120,
 | 
			
		||||
///     angleEnd = -60,
 | 
			
		||||
@ -127,7 +127,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([-10, 0], %)
 | 
			
		||||
///   |> startProfile(at = [-10, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///     angleStart = 120,
 | 
			
		||||
///     angleEnd = -60,
 | 
			
		||||
 | 
			
		||||
@ -88,7 +88,7 @@ pub async fn fillet(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// filletRadius = 2
 | 
			
		||||
///
 | 
			
		||||
/// mountingPlateSketch = startSketchOn("XY")
 | 
			
		||||
///   |> startProfileAt([-width/2, -length/2], %)
 | 
			
		||||
///   |> startProfile(at = [-width/2, -length/2])
 | 
			
		||||
///   |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
 | 
			
		||||
///   |> line(endAbsolute = [width/2, length/2], tag = $edge2)
 | 
			
		||||
///   |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
 | 
			
		||||
@ -113,7 +113,7 @@ pub async fn fillet(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// filletRadius = 1
 | 
			
		||||
///
 | 
			
		||||
/// mountingPlateSketch = startSketchOn("XY")
 | 
			
		||||
///   |> startProfileAt([-width/2, -length/2], %)
 | 
			
		||||
///   |> startProfile(at = [-width/2, -length/2])
 | 
			
		||||
///   |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
 | 
			
		||||
///   |> line(endAbsolute = [width/2, length/2], tag = $edge2)
 | 
			
		||||
///   |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Loft a square and a triangle.
 | 
			
		||||
/// squareSketch = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -67,7 +67,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///     |> close()
 | 
			
		||||
///
 | 
			
		||||
/// triangleSketch = startSketchOn(offsetPlane('XY', offset = 75))
 | 
			
		||||
///     |> startProfileAt([0, 125], %)
 | 
			
		||||
///     |> startProfile(at = [0, 125])
 | 
			
		||||
///     |> line(end = [-15, -30])
 | 
			
		||||
///     |> line(end = [30, 0])
 | 
			
		||||
///     |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
@ -79,7 +79,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Loft a square, a circle, and another circle.
 | 
			
		||||
/// squareSketch = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -98,7 +98,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Loft a square, a circle, and another circle with options.
 | 
			
		||||
/// squareSketch = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
 | 
			
		||||
@ -157,7 +157,7 @@ pub async fn sqrt(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = sqrt(2500),
 | 
			
		||||
@ -189,7 +189,7 @@ pub async fn abs(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
/// myAngle = -120
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [8, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = abs(myAngle),
 | 
			
		||||
@ -224,7 +224,7 @@ pub async fn round(_exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///    |> startProfileAt([0, 0], %)
 | 
			
		||||
///    |> startProfile(at = [0, 0])
 | 
			
		||||
///    |> line(endAbsolute = [12, 10])
 | 
			
		||||
///    |> line(end = [round(7.02986), 0])
 | 
			
		||||
///    |> yLine(endAbsolute = 0)
 | 
			
		||||
@ -252,7 +252,7 @@ pub async fn floor(_exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///    |> startProfileAt([0, 0], %)
 | 
			
		||||
///    |> startProfile(at = [0, 0])
 | 
			
		||||
///    |> line(endAbsolute = [12, 10])
 | 
			
		||||
///    |> line(end = [floor(7.02986), 0])
 | 
			
		||||
///    |> yLine(endAbsolute = 0)
 | 
			
		||||
@ -280,7 +280,7 @@ pub async fn ceil(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(endAbsolute = [12, 10])
 | 
			
		||||
///   |> line(end = [ceil(7.02986), 0])
 | 
			
		||||
///   |> yLine(endAbsolute = 0)
 | 
			
		||||
@ -315,7 +315,7 @@ pub async fn min(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 70,
 | 
			
		||||
///     length = min(15, 31, 4, 13, 22)
 | 
			
		||||
@ -359,7 +359,7 @@ pub async fn max(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 70,
 | 
			
		||||
///     length = max(15, 31, 4, 13, 22)
 | 
			
		||||
@ -410,7 +410,7 @@ pub async fn pow(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = pow(5, 2),
 | 
			
		||||
@ -452,7 +452,7 @@ pub async fn acos(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = toDegrees(acos(0.5)),
 | 
			
		||||
///     length = 10,
 | 
			
		||||
@ -495,7 +495,7 @@ pub async fn asin(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = toDegrees(asin(0.5)),
 | 
			
		||||
///     length = 20,
 | 
			
		||||
@ -537,7 +537,7 @@ pub async fn atan(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = toDegrees(atan(1.25)),
 | 
			
		||||
///     length = 20,
 | 
			
		||||
@ -569,7 +569,7 @@ pub async fn atan2(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = toDegrees(atan2(y = 1.25, x = 2)),
 | 
			
		||||
///     length = 20,
 | 
			
		||||
@ -626,7 +626,7 @@ pub async fn log(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [log(100, 5), 0])
 | 
			
		||||
///   |> line(end = [5, 8])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -654,7 +654,7 @@ pub async fn log2(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [log2(100), 0])
 | 
			
		||||
///   |> line(end = [5, 8])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -682,7 +682,7 @@ pub async fn log10(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [log10(100), 0])
 | 
			
		||||
///   |> line(end = [5, 8])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -710,7 +710,7 @@ pub async fn ln(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclE
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [ln(100), 15])
 | 
			
		||||
///   |> line(end = [5, -6])
 | 
			
		||||
///   |> line(end = [-10, -10])
 | 
			
		||||
@ -739,7 +739,7 @@ pub async fn e(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclE
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 30,
 | 
			
		||||
///     length = 2 * e() ^ 2,
 | 
			
		||||
@ -771,7 +771,7 @@ pub async fn tau(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 10 * tau(),
 | 
			
		||||
 | 
			
		||||
@ -81,7 +81,7 @@ lazy_static! {
 | 
			
		||||
        Box::new(crate::std::sketch::AngledLine),
 | 
			
		||||
        Box::new(crate::std::sketch::AngledLineThatIntersects),
 | 
			
		||||
        Box::new(crate::std::sketch::StartSketchOn),
 | 
			
		||||
        Box::new(crate::std::sketch::StartProfileAt),
 | 
			
		||||
        Box::new(crate::std::sketch::StartProfile),
 | 
			
		||||
        Box::new(crate::std::sketch::ProfileStartX),
 | 
			
		||||
        Box::new(crate::std::sketch::ProfileStartY),
 | 
			
		||||
        Box::new(crate::std::sketch::ProfileStart),
 | 
			
		||||
 | 
			
		||||
@ -147,7 +147,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
 | 
			
		||||
///   p3 = [ l + x, -l + y]
 | 
			
		||||
///
 | 
			
		||||
///   return startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt(p0, %)
 | 
			
		||||
///   |> startProfile(at = p0)
 | 
			
		||||
///   |> line(endAbsolute = p1)
 | 
			
		||||
///   |> line(endAbsolute = p2)
 | 
			
		||||
///   |> line(endAbsolute = p3)
 | 
			
		||||
@ -187,7 +187,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
 | 
			
		||||
///   p3 = [ l + x, -l + y]
 | 
			
		||||
///   
 | 
			
		||||
///   return startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt(p0, %)
 | 
			
		||||
///   |> startProfile(at = p0)
 | 
			
		||||
///   |> line(endAbsolute = p1)
 | 
			
		||||
///   |> line(endAbsolute = p2)
 | 
			
		||||
///   |> line(endAbsolute = p3)
 | 
			
		||||
@ -244,7 +244,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
 | 
			
		||||
///   ]
 | 
			
		||||
/// }
 | 
			
		||||
/// startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> polygon(
 | 
			
		||||
///        radius = 10,
 | 
			
		||||
///        numSides = 4,
 | 
			
		||||
@ -812,7 +812,7 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 2])
 | 
			
		||||
///   |> line(end = [3, 1])
 | 
			
		||||
///   |> line(end = [0, -4])
 | 
			
		||||
@ -831,7 +831,7 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
 | 
			
		||||
/// // Pattern a whole sketch on face.
 | 
			
		||||
/// let size = 100
 | 
			
		||||
/// const case = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
@ -859,7 +859,7 @@ pub async fn pattern_linear_3d(exec_state: &mut ExecState, args: Args) -> Result
 | 
			
		||||
/// // Pattern an object on a face.
 | 
			
		||||
/// let size = 100
 | 
			
		||||
/// const case = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
@ -1063,7 +1063,7 @@ pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Resu
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([.5, 25], %)
 | 
			
		||||
///   |> startProfile(at = [.5, 25])
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [-1, 0])
 | 
			
		||||
///   |> line(end = [0, -5])
 | 
			
		||||
 | 
			
		||||
@ -27,7 +27,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// w = 15
 | 
			
		||||
/// cube = startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [w, 0], tag = $line1)
 | 
			
		||||
///   |> line(end = [0, w], tag = $line2)
 | 
			
		||||
///   |> line(end = [-w, 0], tag = $line3)
 | 
			
		||||
@ -37,7 +37,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
 | 
			
		||||
///
 | 
			
		||||
/// fn cylinder(radius, tag) {
 | 
			
		||||
///   return startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> circle(radius = radius, center = segEnd(tag) )
 | 
			
		||||
///   |> extrude(length = radius)
 | 
			
		||||
/// }
 | 
			
		||||
@ -79,7 +79,7 @@ pub async fn segment_end_x(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [20, 0], tag = $thing)
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [segEndX(thing), 0])
 | 
			
		||||
@ -120,7 +120,7 @@ pub async fn segment_end_y(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [20, 0])
 | 
			
		||||
///   |> line(end = [0, 3], tag = $thing)
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -163,7 +163,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// w = 15
 | 
			
		||||
/// cube = startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [w, 0], tag = $line1)
 | 
			
		||||
///   |> line(end = [0, w], tag = $line2)
 | 
			
		||||
///   |> line(end = [-w, 0], tag = $line3)
 | 
			
		||||
@ -173,7 +173,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
///
 | 
			
		||||
/// fn cylinder(radius, tag) {
 | 
			
		||||
///   return startSketchOn('XY')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> circle( radius = radius, center = segStart(tag) )
 | 
			
		||||
///   |> extrude(length = radius)
 | 
			
		||||
/// }
 | 
			
		||||
@ -215,7 +215,7 @@ pub async fn segment_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [20, 0], tag = $thing)
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [20 - segStartX(thing), 0])
 | 
			
		||||
@ -256,7 +256,7 @@ pub async fn segment_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [20, 0])
 | 
			
		||||
///   |> line(end = [0, 3], tag = $thing)
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -299,7 +299,7 @@ pub async fn last_segment_x(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [5, 0])
 | 
			
		||||
///   |> line(end = [20, 5])
 | 
			
		||||
///   |> line(end = [lastSegX(%), 0])
 | 
			
		||||
@ -345,7 +345,7 @@ pub async fn last_segment_y(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [5, 0])
 | 
			
		||||
///   |> line(end = [20, 5])
 | 
			
		||||
///   |> line(end = [0, lastSegY(%)])
 | 
			
		||||
@ -388,7 +388,7 @@ pub async fn segment_length(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn("XZ")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 60,
 | 
			
		||||
///     length = 10,
 | 
			
		||||
@ -435,7 +435,7 @@ pub async fn segment_angle(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [5, 10], tag = $seg01)
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -481,7 +481,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Horizontal pill.
 | 
			
		||||
/// pillSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [20, 0])
 | 
			
		||||
///   |> tangentialArc(end = [0, 10], tag = $arc1)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
@ -497,7 +497,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Vertical pill.  Use absolute coordinate for arc.
 | 
			
		||||
/// pillSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 20])
 | 
			
		||||
///   |> tangentialArc(endAbsolute = [10, 20], tag = $arc1)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
@ -512,7 +512,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// rectangleSketch = startSketchOn('XZ')
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0], tag = $seg1)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = tangentToEnd(seg1),
 | 
			
		||||
@ -527,7 +527,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// bottom = startSketchOn("XY")
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///        endAbsolute = [10, 10],
 | 
			
		||||
///        interiorAbsolute = [5, 1],
 | 
			
		||||
@ -542,7 +542,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///   |> circle( center= [0, 0], radius= 3 , tag= $circ)
 | 
			
		||||
///
 | 
			
		||||
/// triangleSketch = startSketchOn("XY")
 | 
			
		||||
///   |> startProfileAt([-5, 0], %)
 | 
			
		||||
///   |> startProfile(at = [-5, 0])
 | 
			
		||||
///   |> angledLine(angle = tangentToEnd(circ), length = 10)
 | 
			
		||||
///   |> line(end = [-15, 0])
 | 
			
		||||
///   |> close()
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,7 @@ async fn inner_circle(
 | 
			
		||||
    let from_t = [TyF64::new(from[0], ty.clone()), TyF64::new(from[1], ty)];
 | 
			
		||||
 | 
			
		||||
    let sketch =
 | 
			
		||||
        crate::std::sketch::inner_start_profile_at(from_t, sketch_surface, None, exec_state, args.clone()).await?;
 | 
			
		||||
        crate::std::sketch::inner_start_profile(sketch_surface, from_t, None, exec_state, args.clone()).await?;
 | 
			
		||||
 | 
			
		||||
    let angle_start = Angle::zero();
 | 
			
		||||
    let angle_end = Angle::turn();
 | 
			
		||||
@ -189,8 +189,7 @@ async fn inner_circle_three_point(
 | 
			
		||||
        TyF64::new(center[1], ty.clone()),
 | 
			
		||||
    ];
 | 
			
		||||
    let sketch =
 | 
			
		||||
        crate::std::sketch::inner_start_profile_at(from.clone(), sketch_surface, None, exec_state, args.clone())
 | 
			
		||||
            .await?;
 | 
			
		||||
        crate::std::sketch::inner_start_profile(sketch_surface, from.clone(), None, exec_state, args.clone()).await?;
 | 
			
		||||
 | 
			
		||||
    let angle_start = Angle::zero();
 | 
			
		||||
    let angle_end = Angle::turn();
 | 
			
		||||
@ -366,9 +365,9 @@ async fn inner_polygon(
 | 
			
		||||
        })
 | 
			
		||||
        .collect();
 | 
			
		||||
 | 
			
		||||
    let mut sketch = crate::std::sketch::inner_start_profile_at(
 | 
			
		||||
        point_to_typed(vertices[0], units),
 | 
			
		||||
    let mut sketch = crate::std::sketch::inner_start_profile(
 | 
			
		||||
        sketch_surface,
 | 
			
		||||
        point_to_typed(vertices[0], units),
 | 
			
		||||
        None,
 | 
			
		||||
        exec_state,
 | 
			
		||||
        args.clone(),
 | 
			
		||||
 | 
			
		||||
@ -30,7 +30,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Remove the end face for the extrusion.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -48,7 +48,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Remove the start face for the extrusion.
 | 
			
		||||
/// firstSketch = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -66,7 +66,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Remove a tagged face and the end face for the extrusion.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0], tag = $myTag)
 | 
			
		||||
@ -84,7 +84,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Remove multiple faces at once.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0], tag = $myTag)
 | 
			
		||||
@ -103,7 +103,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Shell a sketch on face.
 | 
			
		||||
/// size = 100
 | 
			
		||||
/// case = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
@ -126,7 +126,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Shell a sketch on face object on the end face.
 | 
			
		||||
/// size = 100
 | 
			
		||||
/// case = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
@ -151,7 +151,7 @@ pub async fn shell(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// size = 100
 | 
			
		||||
/// case = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
@ -262,7 +262,7 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Hollow a basic sketch.
 | 
			
		||||
/// firstSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -274,7 +274,7 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// // Hollow a basic sketch.
 | 
			
		||||
/// firstSketch = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -287,7 +287,7 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// // Hollow a sketch on face object.
 | 
			
		||||
/// size = 100
 | 
			
		||||
/// case = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-size, -size], %)
 | 
			
		||||
///     |> startProfile(at = [-size, -size])
 | 
			
		||||
///     |> line(end = [2 * size, 0])
 | 
			
		||||
///     |> line(end = [0, 2 * size])
 | 
			
		||||
///     |> tangentialArc(endAbsolute = [-size, size])
 | 
			
		||||
 | 
			
		||||
@ -134,7 +134,7 @@ fn involute_curve(radius: f64, angle: f64) -> (f64, f64) {
 | 
			
		||||
/// a = 10
 | 
			
		||||
/// b = 14
 | 
			
		||||
/// startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> involuteCircular(startRadius = a, endRadius = b, angle = 60)
 | 
			
		||||
///   |> involuteCircular(startRadius = a, endRadius = b, angle = 60, reverse = true)
 | 
			
		||||
/// ```
 | 
			
		||||
@ -236,7 +236,7 @@ pub async fn line(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// triangle = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   // The END argument means it ends at exactly [10, 0].
 | 
			
		||||
///   // This is an absolute measurement, it is NOT relative to
 | 
			
		||||
///   // the start of the sketch.
 | 
			
		||||
@ -247,7 +247,7 @@ pub async fn line(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///   |> extrude(length = 5)
 | 
			
		||||
///
 | 
			
		||||
/// box = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([10, 10], %)
 | 
			
		||||
///   |> startProfile(at = [10, 10])
 | 
			
		||||
///   // The 'to' argument means move the pen this much.
 | 
			
		||||
///   // So, [10, 0] is a relative distance away from the current point.
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
@ -406,7 +406,7 @@ pub async fn x_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> xLine(length = 15)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 80,
 | 
			
		||||
@ -475,7 +475,7 @@ pub async fn y_line(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> yLine(length = 15)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 30,
 | 
			
		||||
@ -556,7 +556,7 @@ pub async fn angled_line(exec_state: &mut ExecState, args: Args) -> Result<KclVa
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> yLine(endAbsolute = 15)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 30,
 | 
			
		||||
@ -854,7 +854,7 @@ pub async fn angled_line_that_intersects(exec_state: &mut ExecState, args: Args)
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(endAbsolute = [5, 10])
 | 
			
		||||
///   |> line(endAbsolute = [-10, 10], tag = $lineToIntersect)
 | 
			
		||||
///   |> line(endAbsolute = [0, 20])
 | 
			
		||||
@ -1000,7 +1000,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1009,7 +1009,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example = extrude(exampleSketch, length = 5)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch002 = startSketchOn(example, face = END)
 | 
			
		||||
///   |> startProfileAt([1, 1], %)
 | 
			
		||||
///   |> startProfile(at = [1, 1])
 | 
			
		||||
///   |> line(end = [8, 0])
 | 
			
		||||
///   |> line(end = [0, 8])
 | 
			
		||||
///   |> line(end = [-8, 0])
 | 
			
		||||
@ -1018,7 +1018,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example002 = extrude(exampleSketch002, length = 5)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch003 = startSketchOn(example002, face = END)
 | 
			
		||||
///   |> startProfileAt([2, 2], %)
 | 
			
		||||
///   |> startProfile(at = [2, 2])
 | 
			
		||||
///   |> line(end = [6, 0])
 | 
			
		||||
///   |> line(end = [0, 6])
 | 
			
		||||
///   |> line(end = [-6, 0])
 | 
			
		||||
@ -1031,7 +1031,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// // Sketch on the end of an extruded face by tagging the end face.
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1040,7 +1040,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example = extrude(exampleSketch, length = 5, tagEnd = $end01)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch002 = startSketchOn(example, face = end01)
 | 
			
		||||
///   |> startProfileAt([1, 1], %)
 | 
			
		||||
///   |> startProfile(at = [1, 1])
 | 
			
		||||
///   |> line(end = [8, 0])
 | 
			
		||||
///   |> line(end = [0, 8])
 | 
			
		||||
///   |> line(end = [-8, 0])
 | 
			
		||||
@ -1049,7 +1049,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example002 = extrude(exampleSketch002, length = 5, tagEnd = $end02)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch003 = startSketchOn(example002, face = end02)
 | 
			
		||||
///   |> startProfileAt([2, 2], %)
 | 
			
		||||
///   |> startProfile(at = [2, 2])
 | 
			
		||||
///   |> line(end = [6, 0])
 | 
			
		||||
///   |> line(end = [0, 6])
 | 
			
		||||
///   |> line(end = [-6, 0])
 | 
			
		||||
@ -1060,7 +1060,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10], tag = $sketchingFace)
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1069,7 +1069,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example = extrude(exampleSketch, length = 10)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch002 = startSketchOn(example, face = sketchingFace)
 | 
			
		||||
///   |> startProfileAt([1, 1], %)
 | 
			
		||||
///   |> startProfile(at = [1, 1])
 | 
			
		||||
///   |> line(end = [8, 0])
 | 
			
		||||
///   |> line(end = [0, 8])
 | 
			
		||||
///   |> line(end = [-8, 0])
 | 
			
		||||
@ -1078,7 +1078,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example002 = extrude(exampleSketch002, length = 10)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch003 = startSketchOn(example002, face = sketchingFace002)
 | 
			
		||||
///   |> startProfileAt([-8, 12], %)
 | 
			
		||||
///   |> startProfile(at = [-8, 12])
 | 
			
		||||
///   |> line(end = [0, 6])
 | 
			
		||||
///   |> line(end = [6, 0])
 | 
			
		||||
///   |> line(end = [0, -6])
 | 
			
		||||
@ -1089,7 +1089,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([4, 12], %)
 | 
			
		||||
///   |> startProfile(at = [4, 12])
 | 
			
		||||
///   |> line(end = [2, 0])
 | 
			
		||||
///   |> line(end = [0, -6])
 | 
			
		||||
///   |> line(end = [4, -6])
 | 
			
		||||
@ -1102,7 +1102,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example = revolve(exampleSketch, axis = Y, angle = 180)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch002 = startSketchOn(example, face = END)
 | 
			
		||||
///   |> startProfileAt([4.5, -5], %)
 | 
			
		||||
///   |> startProfile(at = [4.5, -5])
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [5, 0])
 | 
			
		||||
///   |> line(end = [0, -5])
 | 
			
		||||
@ -1115,7 +1115,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// // Sketch on the end of a revolved face by tagging the end face.
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([4, 12], %)
 | 
			
		||||
///   |> startProfile(at = [4, 12])
 | 
			
		||||
///   |> line(end = [2, 0])
 | 
			
		||||
///   |> line(end = [0, -6])
 | 
			
		||||
///   |> line(end = [4, -6])
 | 
			
		||||
@ -1128,7 +1128,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
/// example = revolve(exampleSketch, axis = Y, angle = 180, tagEnd = $end01)
 | 
			
		||||
///
 | 
			
		||||
/// exampleSketch002 = startSketchOn(example, face = end01)
 | 
			
		||||
///   |> startProfileAt([4.5, -5], %)
 | 
			
		||||
///   |> startProfile(at = [4.5, -5])
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [5, 0])
 | 
			
		||||
///   |> line(end = [0, -5])
 | 
			
		||||
@ -1144,7 +1144,7 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///     yAxis = { x = 0, y = 1, z = 0 },
 | 
			
		||||
///     zAxis = { x = 0, y = 0, z = 1 }
 | 
			
		||||
///   })
 | 
			
		||||
///  |> startProfileAt([0, 0], %)
 | 
			
		||||
///  |> startProfile(at = [0, 0])
 | 
			
		||||
///  |> line(end = [100.0, 0])
 | 
			
		||||
///  |> yLine(length = -100.0)
 | 
			
		||||
///  |> xLine(length = -100.0)
 | 
			
		||||
@ -1260,10 +1260,13 @@ async fn make_sketch_plane_from_orientation(
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Start a new profile at a given point.
 | 
			
		||||
pub async fn start_profile_at(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
 | 
			
		||||
    let (start, sketch_surface, tag) = args.get_data_and_sketch_surface()?;
 | 
			
		||||
pub async fn start_profile(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
 | 
			
		||||
    // let (start, sketch_surface, tag) = args.get_data_and_sketch_surface()?;
 | 
			
		||||
    let sketch_surface = args.get_unlabeled_kw_arg("startProfileOn")?;
 | 
			
		||||
    let start: [TyF64; 2] = args.get_kw_arg("at")?;
 | 
			
		||||
    let tag = args.get_kw_arg_opt(NEW_TAG_KW)?;
 | 
			
		||||
 | 
			
		||||
    let sketch = inner_start_profile_at(start, sketch_surface, tag, exec_state, args).await?;
 | 
			
		||||
    let sketch = inner_start_profile(sketch_surface, start, tag, exec_state, args).await?;
 | 
			
		||||
    Ok(KclValue::Sketch {
 | 
			
		||||
        value: Box::new(sketch),
 | 
			
		||||
    })
 | 
			
		||||
@ -1273,7 +1276,7 @@ pub async fn start_profile_at(exec_state: &mut ExecState, args: Args) -> Result<
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1284,7 +1287,7 @@ pub async fn start_profile_at(exec_state: &mut ExecState, args: Args) -> Result<
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(-XZ)
 | 
			
		||||
///   |> startProfileAt([10, 10], %)
 | 
			
		||||
///   |> startProfile(at = [10, 10])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1295,7 +1298,7 @@ pub async fn start_profile_at(exec_state: &mut ExecState, args: Args) -> Result<
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(-XZ)
 | 
			
		||||
///   |> startProfileAt([-10, 23], %)
 | 
			
		||||
///   |> startProfile(at = [-10, 23])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> line(end = [-10, 0])
 | 
			
		||||
@ -1304,11 +1307,18 @@ pub async fn start_profile_at(exec_state: &mut ExecState, args: Args) -> Result<
 | 
			
		||||
/// example = extrude(exampleSketch, length = 5)
 | 
			
		||||
/// ```
 | 
			
		||||
#[stdlib {
 | 
			
		||||
    name = "startProfileAt",
 | 
			
		||||
    name = "startProfile",
 | 
			
		||||
    keywords = true,
 | 
			
		||||
    unlabeled_first = true,
 | 
			
		||||
    args = {
 | 
			
		||||
        sketch_surface = { docs = "What to start the profile on" },
 | 
			
		||||
        at = { docs = "Where to start the profile. An absolute point." },
 | 
			
		||||
        tag = { docs = "Tag this first starting point" },
 | 
			
		||||
    }
 | 
			
		||||
}]
 | 
			
		||||
pub(crate) async fn inner_start_profile_at(
 | 
			
		||||
    to: [TyF64; 2],
 | 
			
		||||
pub(crate) async fn inner_start_profile(
 | 
			
		||||
    sketch_surface: SketchSurface,
 | 
			
		||||
    at: [TyF64; 2],
 | 
			
		||||
    tag: Option<TagNode>,
 | 
			
		||||
    exec_state: &mut ExecState,
 | 
			
		||||
    args: Args,
 | 
			
		||||
@ -1364,7 +1374,7 @@ pub(crate) async fn inner_start_profile_at(
 | 
			
		||||
        ModelingCmdReq {
 | 
			
		||||
            cmd: ModelingCmd::from(mcmd::MovePathPen {
 | 
			
		||||
                path: path_id.into(),
 | 
			
		||||
                to: KPoint2d::from(point_to_mm(to.clone())).with_z(0.0).map(LengthUnit),
 | 
			
		||||
                to: KPoint2d::from(point_to_mm(at.clone())).with_z(0.0).map(LengthUnit),
 | 
			
		||||
            }),
 | 
			
		||||
            cmd_id: move_pen_id.into(),
 | 
			
		||||
        },
 | 
			
		||||
@ -1375,7 +1385,7 @@ pub(crate) async fn inner_start_profile_at(
 | 
			
		||||
    ])
 | 
			
		||||
    .await?;
 | 
			
		||||
 | 
			
		||||
    let (to, ty) = untype_point(to);
 | 
			
		||||
    let (to, ty) = untype_point(at);
 | 
			
		||||
    let current_path = BasePath {
 | 
			
		||||
        from: to,
 | 
			
		||||
        to,
 | 
			
		||||
@ -1431,7 +1441,7 @@ pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///  |> startProfileAt([5, 2], %)
 | 
			
		||||
///  |> startProfile(at = [5, 2])
 | 
			
		||||
///  |> angledLine(angle = -26.6, length = 50)
 | 
			
		||||
///  |> angledLine(angle = 90, length = 50)
 | 
			
		||||
///  |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
 | 
			
		||||
@ -1461,7 +1471,7 @@ pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///  |> startProfileAt([5, 2], %)
 | 
			
		||||
///  |> startProfile(at = [5, 2])
 | 
			
		||||
///  |> angledLine(angle = -60, length = 14 )
 | 
			
		||||
///  |> angledLine(angle = 30, endAbsoluteY =  profileStartY(%))
 | 
			
		||||
/// ```
 | 
			
		||||
@ -1490,7 +1500,7 @@ pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///  |> startProfileAt([5, 2], %)
 | 
			
		||||
///  |> startProfile(at = [5, 2])
 | 
			
		||||
///  |> angledLine(angle = 120, length = 50 , tag = $seg01)
 | 
			
		||||
///  |> angledLine(angle = segAng(seg01) + 120, length = 50 )
 | 
			
		||||
///  |> line(end = profileStart(%))
 | 
			
		||||
@ -1525,7 +1535,7 @@ pub async fn close(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// startSketchOn(XZ)
 | 
			
		||||
///    |> startProfileAt([0, 0], %)
 | 
			
		||||
///    |> startProfile(at = [0, 0])
 | 
			
		||||
///    |> line(end = [10, 10])
 | 
			
		||||
///    |> line(end = [10, 0])
 | 
			
		||||
///    |> close()
 | 
			
		||||
@ -1534,7 +1544,7 @@ pub async fn close(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(-XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> close()
 | 
			
		||||
@ -1630,7 +1640,7 @@ pub async fn arc(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///        angleStart = 0,
 | 
			
		||||
@ -1642,7 +1652,7 @@ pub async fn arc(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
 | 
			
		||||
/// ```
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> arc(
 | 
			
		||||
///         endAbsolute = [10,0],
 | 
			
		||||
///         interiorAbsolute = [5,5]
 | 
			
		||||
@ -1852,7 +1862,7 @@ pub async fn tangential_arc(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 45,
 | 
			
		||||
///     length = 10,
 | 
			
		||||
@ -1866,7 +1876,7 @@ pub async fn tangential_arc(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 60,
 | 
			
		||||
///     length = 10,
 | 
			
		||||
@ -1880,7 +1890,7 @@ pub async fn tangential_arc(exec_state: &mut ExecState, args: Args) -> Result<Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 60,
 | 
			
		||||
///     length = 10,
 | 
			
		||||
@ -2161,7 +2171,7 @@ pub async fn bezier_curve(exec_state: &mut ExecState, args: Args) -> Result<KclV
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> bezierCurve(
 | 
			
		||||
///        control1 = [5, 0],
 | 
			
		||||
@ -2256,7 +2266,7 @@ pub async fn hole(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
///
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// exampleSketch = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [5, 0])
 | 
			
		||||
///   |> line(end = [0, -5])
 | 
			
		||||
@ -2270,7 +2280,7 @@ pub async fn hole(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
 | 
			
		||||
/// ```no_run
 | 
			
		||||
/// fn squareHoleSketch() {
 | 
			
		||||
///   squareSketch = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-1, -1], %)
 | 
			
		||||
///     |> startProfile(at = [-1, -1])
 | 
			
		||||
///     |> line(end = [2, 0])
 | 
			
		||||
///     |> line(end = [0, 2])
 | 
			
		||||
///     |> line(end = [-2, 0])
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -110,7 +110,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Sweep two sketches along the same path.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
 | 
			
		||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
 | 
			
		||||
///     |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///         angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -126,7 +126,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
 | 
			
		||||
///
 | 
			
		||||
/// sketch002 = startSketchOn(YZ)
 | 
			
		||||
/// sweepPath = startProfileAt([0, 0], sketch002)
 | 
			
		||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
 | 
			
		||||
///     |> yLine(length = 231.81)
 | 
			
		||||
///     |> tangentialArc(radius = 80, angle = -90)
 | 
			
		||||
///     |> xLine(length = 384.93)
 | 
			
		||||
@ -140,7 +140,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
 | 
			
		||||
///
 | 
			
		||||
/// sketch002 = startSketchOn('YZ')
 | 
			
		||||
/// sweepPath = startProfileAt([0, 0], sketch002)
 | 
			
		||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
 | 
			
		||||
///     |> yLine(length = 231.81)
 | 
			
		||||
///     |> tangentialArc(radius = 80, angle = -90)
 | 
			
		||||
///     |> xLine(length = 384.93)
 | 
			
		||||
 | 
			
		||||
@ -76,7 +76,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn('XZ')
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -117,7 +117,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// // Sweep two sketches along the same path.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn('XY')
 | 
			
		||||
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
 | 
			
		||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
 | 
			
		||||
///     |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///         angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -133,7 +133,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
 | 
			
		||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
 | 
			
		||||
///
 | 
			
		||||
/// sketch002 = startSketchOn('YZ')
 | 
			
		||||
/// sweepPath = startProfileAt([0, 0], sketch002)
 | 
			
		||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
 | 
			
		||||
///     |> yLine(length = 231.81)
 | 
			
		||||
///     |> tangentialArc(radius = 80, angle = -90)
 | 
			
		||||
///     |> xLine(length = 384.93)
 | 
			
		||||
@ -242,7 +242,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn('XZ')
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -297,7 +297,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
/// // Sweep two sketches along the same path.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn('XY')
 | 
			
		||||
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
 | 
			
		||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
 | 
			
		||||
///     |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///         angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -313,7 +313,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
 | 
			
		||||
///
 | 
			
		||||
/// sketch002 = startSketchOn('YZ')
 | 
			
		||||
/// sweepPath = startProfileAt([0, 0], sketch002)
 | 
			
		||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
 | 
			
		||||
///     |> yLine(length = 231.81)
 | 
			
		||||
///     |> tangentialArc(radius = 80, angle = -90)
 | 
			
		||||
///     |> xLine(length = 384.93)
 | 
			
		||||
@ -335,7 +335,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
///     p3 = [l, -l]
 | 
			
		||||
///
 | 
			
		||||
///     return startSketchOn(XY)
 | 
			
		||||
///         |> startProfileAt(p0, %)
 | 
			
		||||
///         |> startProfile(at = p0)
 | 
			
		||||
///         |> line(endAbsolute = p1)
 | 
			
		||||
///         |> line(endAbsolute = p2)
 | 
			
		||||
///         |> line(endAbsolute = p3)
 | 
			
		||||
@ -357,7 +357,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
 | 
			
		||||
/// sketch001 = startSketchOn('XY')
 | 
			
		||||
///
 | 
			
		||||
/// fn square() {
 | 
			
		||||
///     return  startProfileAt([-10, 10], sketch001)
 | 
			
		||||
///     return  startProfile(sketch001, at = [-10, 10])
 | 
			
		||||
///         |> xLine(length = 20)
 | 
			
		||||
///         |> yLine(length = -20)
 | 
			
		||||
///         |> xLine(length = -20)
 | 
			
		||||
@ -581,7 +581,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn('XZ')
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -614,7 +614,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn('XZ')
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -645,7 +645,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
///
 | 
			
		||||
/// // Create a path for the sweep.
 | 
			
		||||
/// sweepPath = startSketchOn('XZ')
 | 
			
		||||
///     |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
///     |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
///     |> line(end = [0, 7])
 | 
			
		||||
///     |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
///     |> line(end = [-3, 0])
 | 
			
		||||
@ -688,7 +688,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// // Sweep two sketches along the same path.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn('XY')
 | 
			
		||||
/// rectangleSketch = startProfileAt([-200, 23.86], sketch001)
 | 
			
		||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
 | 
			
		||||
///     |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///         angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -704,7 +704,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
 | 
			
		||||
///
 | 
			
		||||
/// sketch002 = startSketchOn('YZ')
 | 
			
		||||
/// sweepPath = startProfileAt([0, 0], sketch002)
 | 
			
		||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
 | 
			
		||||
///     |> yLine(length = 231.81)
 | 
			
		||||
///     |> tangentialArc(radius = 80, angle = -90)
 | 
			
		||||
///     |> xLine(length = 384.93)
 | 
			
		||||
@ -720,7 +720,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
 | 
			
		||||
/// sketch001 = startSketchOn('XY')
 | 
			
		||||
///
 | 
			
		||||
/// fn square() {
 | 
			
		||||
///     return  startProfileAt([-10, 10], sketch001)
 | 
			
		||||
///     return  startProfile(sketch001, at = [-10, 10])
 | 
			
		||||
///         |> xLine(length = 20)
 | 
			
		||||
///         |> yLine(length = -20)
 | 
			
		||||
///         |> xLine(length = -20)
 | 
			
		||||
@ -832,7 +832,7 @@ mod tests {
 | 
			
		||||
    use crate::execution::parse_execute;
 | 
			
		||||
 | 
			
		||||
    const PIPE: &str = r#"sweepPath = startSketchOn('XZ')
 | 
			
		||||
    |> startProfileAt([0.05, 0.05], %)
 | 
			
		||||
    |> startProfile(at = [0.05, 0.05])
 | 
			
		||||
    |> line(end = [0, 7])
 | 
			
		||||
    |> tangentialArc(angle = 90, radius = 5)
 | 
			
		||||
    |> line(end = [-3, 0])
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@ export PI = 3.14159265358979323846264338327950288_
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 30,
 | 
			
		||||
///     length = 2 * E ^ 2,
 | 
			
		||||
@ -35,7 +35,7 @@ export E = 2.71828182845904523536028747135266250_
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 10 * TAU,
 | 
			
		||||
@ -51,7 +51,7 @@ export TAU = 6.28318530717958647692528676655900577_
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 30,
 | 
			
		||||
///     length = 3 / cos(30deg),
 | 
			
		||||
@ -68,7 +68,7 @@ export fn cos(@num: number(Angle)): number(_) {}
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 15 / sin(135deg),
 | 
			
		||||
@ -85,7 +85,7 @@ export fn sin(@num: number(Angle)): number(_) {}
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 50 * tan((1/2): number(rad)),
 | 
			
		||||
@ -103,7 +103,7 @@ export fn tan(@num: number(Angle)): number(_) {}
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = polar(angle = 30, length = 5), tag = $thing)
 | 
			
		||||
///   |> line(end = [0, 5])
 | 
			
		||||
///   |> line(end = [segEndX(thing), 0])
 | 
			
		||||
 | 
			
		||||
@ -69,7 +69,7 @@ export END = 'end'
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Create a helix around an edge.
 | 
			
		||||
/// helper001 = startSketchOn(XZ)
 | 
			
		||||
///  |> startProfileAt([0, 0], %)
 | 
			
		||||
///  |> startProfile(at = [0, 0])
 | 
			
		||||
///  |> line(end = [0, 10], tag = $edge001)
 | 
			
		||||
///
 | 
			
		||||
/// helixPath = helix(
 | 
			
		||||
@ -157,7 +157,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// part001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([4, 12], %)
 | 
			
		||||
///     |> startProfile(at = [4, 12])
 | 
			
		||||
///     |> line(end = [2, 0])
 | 
			
		||||
///     |> line(end = [0, -6])
 | 
			
		||||
///     |> line(end = [4, -6])
 | 
			
		||||
@ -181,7 +181,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// part001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([4, 12], %)
 | 
			
		||||
///     |> startProfile(at = [4, 12])
 | 
			
		||||
///     |> line(end = [2, 0])
 | 
			
		||||
///     |> line(end = [0, -6])
 | 
			
		||||
///     |> line(end = [4, -6])
 | 
			
		||||
@ -195,7 +195,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// part001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([4, 12], %)
 | 
			
		||||
///     |> startProfile(at = [4, 12])
 | 
			
		||||
///     |> line(end = [2, 0])
 | 
			
		||||
///     |> line(end = [0, -6])
 | 
			
		||||
///     |> line(end = [4, -6])
 | 
			
		||||
@ -207,7 +207,7 @@ export fn helix(
 | 
			
		||||
///     |> revolve(axis = Y, angle = 180)
 | 
			
		||||
///
 | 
			
		||||
/// part002 = startSketchOn(part001, face = END)
 | 
			
		||||
///     |> startProfileAt([4.5, -5], %)
 | 
			
		||||
///     |> startProfile(at = [4.5, -5])
 | 
			
		||||
///     |> line(end = [0, 5])
 | 
			
		||||
///     |> line(end = [5, 0])
 | 
			
		||||
///     |> line(end = [0, -5])
 | 
			
		||||
@ -217,7 +217,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// box = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20])
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///     |> line(end = [0, -20])
 | 
			
		||||
@ -234,7 +234,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// box = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20])
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///     |> line(end = [0, -20], tag = $revolveAxis)
 | 
			
		||||
@ -251,7 +251,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// box = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20])
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///     |> line(end = [0, -20], tag = $revolveAxis)
 | 
			
		||||
@ -269,7 +269,7 @@ export fn helix(
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([10, 0], %)
 | 
			
		||||
///   |> startProfile(at = [10, 0])
 | 
			
		||||
///   |> line(end = [5, -5])
 | 
			
		||||
///   |> line(end = [5, 5])
 | 
			
		||||
///   |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
@ -288,14 +288,14 @@ export fn helix(
 | 
			
		||||
/// // Revolve two sketches around the same axis.
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XY)
 | 
			
		||||
/// profile001 = startProfileAt([4, 8], sketch001)
 | 
			
		||||
/// profile001 = startProfile(sketch001, at = [4, 8])
 | 
			
		||||
///     |> xLine(length = 3)
 | 
			
		||||
///     |> yLine(length = -3)
 | 
			
		||||
///     |> xLine(length = -3)
 | 
			
		||||
///     |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
 | 
			
		||||
///     |> close()
 | 
			
		||||
///
 | 
			
		||||
/// profile002 = startProfileAt([-5, 8], sketch001)
 | 
			
		||||
/// profile002 = startProfile(sketch001, at = [-5, 8])
 | 
			
		||||
///     |> xLine(length = 3)
 | 
			
		||||
///     |> yLine(length = -3)
 | 
			
		||||
///     |> xLine(length = -3)
 | 
			
		||||
@ -312,7 +312,7 @@ export fn helix(
 | 
			
		||||
/// // Revolve around a path that has not been extruded.
 | 
			
		||||
///
 | 
			
		||||
/// profile001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20], tag = $revolveAxis)
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///     |> line(end = [0, -20])
 | 
			
		||||
@ -327,7 +327,7 @@ export fn helix(
 | 
			
		||||
/// // Revolve around a path that has not been extruded or closed.
 | 
			
		||||
///
 | 
			
		||||
/// profile001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20], tag = $revolveAxis)
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///
 | 
			
		||||
@ -340,7 +340,7 @@ export fn helix(
 | 
			
		||||
/// // Symmetrically revolve around a path.
 | 
			
		||||
///
 | 
			
		||||
/// profile001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20], tag = $revolveAxis)
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///
 | 
			
		||||
@ -353,7 +353,7 @@ export fn helix(
 | 
			
		||||
/// // Bidirectional revolve around a path.
 | 
			
		||||
///
 | 
			
		||||
/// profile001 = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([0, 0], %)
 | 
			
		||||
///     |> startProfile(at = [0, 0])
 | 
			
		||||
///     |> line(end = [0, 20], tag = $revolveAxis)
 | 
			
		||||
///     |> line(end = [20, 0])
 | 
			
		||||
///
 | 
			
		||||
@ -415,7 +415,7 @@ export fn toYards(@num: number(yd)): number(yd) {
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 70 * cos(toRadians(45)),
 | 
			
		||||
@ -433,7 +433,7 @@ export fn toRadians(@num: number(rad)): number(rad) {
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///     angle = 50,
 | 
			
		||||
///     length = 70 * cos(toDegrees((PI/4): number(rad))),
 | 
			
		||||
@ -455,7 +455,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Loft a square and a circle on the `XY` plane using offset.
 | 
			
		||||
/// squareSketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -471,7 +471,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Loft a square and a circle on the `XZ` plane using offset.
 | 
			
		||||
/// squareSketch = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -487,7 +487,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Loft a square and a circle on the `YZ` plane using offset.
 | 
			
		||||
/// squareSketch = startSketchOn(YZ)
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -503,7 +503,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Loft a square and a circle on the `-XZ` plane using offset.
 | 
			
		||||
/// squareSketch = startSketchOn(-XZ)
 | 
			
		||||
///     |> startProfileAt([-100, 200], %)
 | 
			
		||||
///     |> startProfile(at = [-100, 200])
 | 
			
		||||
///     |> line(end = [200, 0])
 | 
			
		||||
///     |> line(end = [0, -200])
 | 
			
		||||
///     |> line(end = [-200, 0])
 | 
			
		||||
@ -519,12 +519,12 @@ export fn toDegrees(@num: number(deg)): number(deg) {
 | 
			
		||||
/// ```
 | 
			
		||||
/// // A circle on the XY plane
 | 
			
		||||
/// startSketchOn(XY)
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> circle( radius = 10, center = [0, 0] )
 | 
			
		||||
///
 | 
			
		||||
/// // Triangle on the plane 4 units above
 | 
			
		||||
/// startSketchOn(offsetPlane(XY, offset = 4))
 | 
			
		||||
///   |> startProfileAt([0, 0], %)
 | 
			
		||||
///   |> startProfile(at = [0, 0])
 | 
			
		||||
///   |> line(end = [10, 0])
 | 
			
		||||
///   |> line(end = [0, 10])
 | 
			
		||||
///   |> close()
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,7 @@
 | 
			
		||||
///
 | 
			
		||||
/// ```
 | 
			
		||||
/// exampleSketch = startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt([-15, 0], %)
 | 
			
		||||
///   |> startProfile(at = [-15, 0])
 | 
			
		||||
///   |> line(end = [30, 0])
 | 
			
		||||
///   |> line(end = [0, 30])
 | 
			
		||||
///   |> line(end = [-30, 0])
 | 
			
		||||
@ -43,7 +43,7 @@ export fn circle(
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Mirror an un-closed sketch across the Y axis.
 | 
			
		||||
/// sketch001 = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0, 10], %)
 | 
			
		||||
///     |> startProfile(at = [0, 10])
 | 
			
		||||
///     |> line(end = [15, 0])
 | 
			
		||||
///     |> line(end = [-7, -3])
 | 
			
		||||
///     |> line(end = [9, -1])
 | 
			
		||||
@ -60,7 +60,7 @@ export fn circle(
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Mirror a un-closed sketch across the Y axis.
 | 
			
		||||
/// sketch001 = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0, 8.5], %)
 | 
			
		||||
///     |> startProfile(at = [0, 8.5])
 | 
			
		||||
///     |> line(end = [20, -8.5])
 | 
			
		||||
///     |> line(end = [-20, -8.5])
 | 
			
		||||
///     |> mirror2d(axis = Y)
 | 
			
		||||
@ -71,11 +71,11 @@ export fn circle(
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Mirror a un-closed sketch across an edge.
 | 
			
		||||
/// helper001 = startSketchOn(XZ)
 | 
			
		||||
///  |> startProfileAt([0, 0], %)
 | 
			
		||||
///  |> startProfile(at = [0, 0])
 | 
			
		||||
///  |> line(end = [0, 10], tag = $edge001)
 | 
			
		||||
///
 | 
			
		||||
/// sketch001 = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0, 8.5], %)
 | 
			
		||||
///     |> startProfile(at = [0, 8.5])
 | 
			
		||||
///     |> line(end = [20, -8.5])
 | 
			
		||||
///     |> line(end = [-20, -8.5])
 | 
			
		||||
///     |> mirror2d(axis = edge001)
 | 
			
		||||
@ -86,7 +86,7 @@ export fn circle(
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Mirror an un-closed sketch across a custom axis.
 | 
			
		||||
/// sketch001 = startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt([0, 8.5], %)
 | 
			
		||||
///     |> startProfile(at = [0, 8.5])
 | 
			
		||||
///     |> line(end = [20, -8.5])
 | 
			
		||||
///     |> line(end = [-20, -8.5])
 | 
			
		||||
///     |> mirror2d(
 | 
			
		||||
@ -101,7 +101,7 @@ export fn circle(
 | 
			
		||||
/// ```
 | 
			
		||||
/// // Sketch on the face of a mirrored sketch, that has been extruded.
 | 
			
		||||
/// sketch0011 = startSketchOn(XY)
 | 
			
		||||
///      |> startProfileAt([6.77, 0], %)
 | 
			
		||||
///      |> startProfile(at = [6.77, 0])
 | 
			
		||||
///      |> yLine(length = 1.27)
 | 
			
		||||
///      |> tangentialArc(endAbsolute = [5.96, 2.37])
 | 
			
		||||
///      |> tangentialArc(endAbsolute = [-6.2, 2.44])
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ export type string
 | 
			
		||||
///
 | 
			
		||||
/// ```norun,inline
 | 
			
		||||
/// startSketchOn(XZ)
 | 
			
		||||
///   |> startProfileAt(origin, %)
 | 
			
		||||
///   |> startProfile(at = origin)
 | 
			
		||||
///   |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
 | 
			
		||||
///   |> angledLine(
 | 
			
		||||
///        angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -69,7 +69,7 @@ export type string
 | 
			
		||||
/// ```norun,inline
 | 
			
		||||
/// fn rect(origin) {
 | 
			
		||||
///   return startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt(origin, %)
 | 
			
		||||
///     |> startProfile(at = origin)
 | 
			
		||||
///     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///          angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -98,7 +98,7 @@ export type string
 | 
			
		||||
/// ```norun,inline
 | 
			
		||||
/// fn rect(origin) {
 | 
			
		||||
///   return startSketchOn(XZ)
 | 
			
		||||
///     |> startProfileAt(origin, %)
 | 
			
		||||
///     |> startProfile(at = origin)
 | 
			
		||||
///     |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
 | 
			
		||||
///     |> angledLine(
 | 
			
		||||
///          angle = segAng(rectangleSegmentA001) - 90,
 | 
			
		||||
@ -136,7 +136,7 @@ export type Plane
 | 
			
		||||
///
 | 
			
		||||
/// ```kcl,inline
 | 
			
		||||
/// mySketch = startSketchOn(XY)
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -154,7 +154,7 @@ export type Plane
 | 
			
		||||
/// ```kcl,inline
 | 
			
		||||
/// fn createSketch() {
 | 
			
		||||
///    return startSketchOn(XY)
 | 
			
		||||
///         |> startProfileAt([-12, 12], %)
 | 
			
		||||
///         |> startProfile(at = [-12, 12])
 | 
			
		||||
///         |> line(end = [24, 0])
 | 
			
		||||
///         |> line(end = [0, -24])
 | 
			
		||||
///         |> line(end = [-24, 0])
 | 
			
		||||
@ -180,7 +180,7 @@ export type Sketch
 | 
			
		||||
///
 | 
			
		||||
/// ```kcl,inline
 | 
			
		||||
/// myPart = startSketchOn('XY')
 | 
			
		||||
///     |> startProfileAt([-12, 12], %)
 | 
			
		||||
///     |> startProfile(at = [-12, 12])
 | 
			
		||||
///     |> line(end = [24, 0])
 | 
			
		||||
///     |> line(end = [0, -24])
 | 
			
		||||
///     |> line(end = [-24, 0])
 | 
			
		||||
@ -199,7 +199,7 @@ export type Sketch
 | 
			
		||||
/// ```kcl,inline
 | 
			
		||||
/// fn createPart() {
 | 
			
		||||
///    return startSketchOn('XY')
 | 
			
		||||
///         |> startProfileAt([-12, 12], %)
 | 
			
		||||
///         |> startProfile(at = [-12, 12])
 | 
			
		||||
///         |> line(end = [24, 0])
 | 
			
		||||
///         |> line(end = [0, -24])
 | 
			
		||||
///         |> line(end = [-24, 0])
 | 
			
		||||
 | 
			
		||||
@ -55,44 +55,47 @@ description: Result of parsing angled_line.kcl
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "elements": [
 | 
			
		||||
                      {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "raw": "4.83",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "value": {
 | 
			
		||||
                          "value": 4.83,
 | 
			
		||||
                          "suffix": "None"
 | 
			
		||||
                    "type": "LabeledArg",
 | 
			
		||||
                    "label": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "name": "at",
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "Identifier"
 | 
			
		||||
                    },
 | 
			
		||||
                    "arg": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "elements": [
 | 
			
		||||
                        {
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "4.83",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 4.83,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "12.56",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 12.56,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        }
 | 
			
		||||
                      },
 | 
			
		||||
                      {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "raw": "12.56",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "value": {
 | 
			
		||||
                          "value": 12.56,
 | 
			
		||||
                          "suffix": "None"
 | 
			
		||||
                        }
 | 
			
		||||
                      }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "ArrayExpression",
 | 
			
		||||
                    "type": "ArrayExpression"
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "PipeSubstitution",
 | 
			
		||||
                    "type": "PipeSubstitution"
 | 
			
		||||
                      ],
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "ArrayExpression",
 | 
			
		||||
                      "type": "ArrayExpression"
 | 
			
		||||
                    }
 | 
			
		||||
                  }
 | 
			
		||||
                ],
 | 
			
		||||
                "callee": {
 | 
			
		||||
@ -102,7 +105,7 @@ description: Result of parsing angled_line.kcl
 | 
			
		||||
                  "name": {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "name": "startProfileAt",
 | 
			
		||||
                    "name": "startProfile",
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "Identifier"
 | 
			
		||||
                  },
 | 
			
		||||
@ -113,8 +116,9 @@ description: Result of parsing angled_line.kcl
 | 
			
		||||
                "commentStart": 0,
 | 
			
		||||
                "end": 0,
 | 
			
		||||
                "start": 0,
 | 
			
		||||
                "type": "CallExpression",
 | 
			
		||||
                "type": "CallExpression"
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "unlabeled": null
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
part001 = startSketchOn('XY')
 | 
			
		||||
  |> startProfileAt([4.83, 12.56], %)
 | 
			
		||||
  |> startProfile(at = [4.83, 12.56])
 | 
			
		||||
  |> line(end = [15.1, 2.48])
 | 
			
		||||
  |> line(end = [3.15, -9.85], tag = $seg01)
 | 
			
		||||
  |> line(end = [-15.17, -4.1])
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
 | 
			
		||||
description: Result of unparsing angled_line.kcl
 | 
			
		||||
---
 | 
			
		||||
part001 = startSketchOn(XY)
 | 
			
		||||
  |> startProfileAt([4.83, 12.56], %)
 | 
			
		||||
  |> startProfile(at = [4.83, 12.56])
 | 
			
		||||
  |> line(end = [15.1, 2.48])
 | 
			
		||||
  |> line(end = [3.15, -9.85], tag = $seg01)
 | 
			
		||||
  |> line(end = [-15.17, -4.1])
 | 
			
		||||
 | 
			
		||||
@ -55,60 +55,63 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "elements": [
 | 
			
		||||
                      {
 | 
			
		||||
                        "argument": {
 | 
			
		||||
                    "type": "LabeledArg",
 | 
			
		||||
                    "label": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "name": "at",
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "Identifier"
 | 
			
		||||
                    },
 | 
			
		||||
                    "arg": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "elements": [
 | 
			
		||||
                        {
 | 
			
		||||
                          "argument": {
 | 
			
		||||
                            "commentStart": 0,
 | 
			
		||||
                            "end": 0,
 | 
			
		||||
                            "raw": "5",
 | 
			
		||||
                            "start": 0,
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "value": {
 | 
			
		||||
                              "value": 5.0,
 | 
			
		||||
                              "suffix": "None"
 | 
			
		||||
                            }
 | 
			
		||||
                          },
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "5",
 | 
			
		||||
                          "operator": "-",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 5.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                          "type": "UnaryExpression",
 | 
			
		||||
                          "type": "UnaryExpression"
 | 
			
		||||
                        },
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "operator": "-",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "UnaryExpression",
 | 
			
		||||
                        "type": "UnaryExpression"
 | 
			
		||||
                      },
 | 
			
		||||
                      {
 | 
			
		||||
                        "argument": {
 | 
			
		||||
                        {
 | 
			
		||||
                          "argument": {
 | 
			
		||||
                            "commentStart": 0,
 | 
			
		||||
                            "end": 0,
 | 
			
		||||
                            "raw": "5",
 | 
			
		||||
                            "start": 0,
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "value": {
 | 
			
		||||
                              "value": 5.0,
 | 
			
		||||
                              "suffix": "None"
 | 
			
		||||
                            }
 | 
			
		||||
                          },
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "5",
 | 
			
		||||
                          "operator": "-",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 5.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        },
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "operator": "-",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "UnaryExpression",
 | 
			
		||||
                        "type": "UnaryExpression"
 | 
			
		||||
                      }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "ArrayExpression",
 | 
			
		||||
                    "type": "ArrayExpression"
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "PipeSubstitution",
 | 
			
		||||
                    "type": "PipeSubstitution"
 | 
			
		||||
                          "type": "UnaryExpression",
 | 
			
		||||
                          "type": "UnaryExpression"
 | 
			
		||||
                        }
 | 
			
		||||
                      ],
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "ArrayExpression",
 | 
			
		||||
                      "type": "ArrayExpression"
 | 
			
		||||
                    }
 | 
			
		||||
                  }
 | 
			
		||||
                ],
 | 
			
		||||
                "callee": {
 | 
			
		||||
@ -118,7 +121,7 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
                  "name": {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "name": "startProfileAt",
 | 
			
		||||
                    "name": "startProfile",
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "Identifier"
 | 
			
		||||
                  },
 | 
			
		||||
@ -129,8 +132,9 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
                "commentStart": 0,
 | 
			
		||||
                "end": 0,
 | 
			
		||||
                "start": 0,
 | 
			
		||||
                "type": "CallExpression",
 | 
			
		||||
                "type": "CallExpression"
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "unlabeled": null
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
@ -790,60 +794,63 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "elements": [
 | 
			
		||||
                      {
 | 
			
		||||
                        "argument": {
 | 
			
		||||
                    "type": "LabeledArg",
 | 
			
		||||
                    "label": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "name": "at",
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "Identifier"
 | 
			
		||||
                    },
 | 
			
		||||
                    "arg": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "elements": [
 | 
			
		||||
                        {
 | 
			
		||||
                          "argument": {
 | 
			
		||||
                            "commentStart": 0,
 | 
			
		||||
                            "end": 0,
 | 
			
		||||
                            "raw": "2",
 | 
			
		||||
                            "start": 0,
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "value": {
 | 
			
		||||
                              "value": 2.0,
 | 
			
		||||
                              "suffix": "None"
 | 
			
		||||
                            }
 | 
			
		||||
                          },
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "2",
 | 
			
		||||
                          "operator": "-",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 2.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                          "type": "UnaryExpression",
 | 
			
		||||
                          "type": "UnaryExpression"
 | 
			
		||||
                        },
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "operator": "-",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "UnaryExpression",
 | 
			
		||||
                        "type": "UnaryExpression"
 | 
			
		||||
                      },
 | 
			
		||||
                      {
 | 
			
		||||
                        "argument": {
 | 
			
		||||
                        {
 | 
			
		||||
                          "argument": {
 | 
			
		||||
                            "commentStart": 0,
 | 
			
		||||
                            "end": 0,
 | 
			
		||||
                            "raw": "6",
 | 
			
		||||
                            "start": 0,
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "type": "Literal",
 | 
			
		||||
                            "value": {
 | 
			
		||||
                              "value": 6.0,
 | 
			
		||||
                              "suffix": "None"
 | 
			
		||||
                            }
 | 
			
		||||
                          },
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "6",
 | 
			
		||||
                          "operator": "-",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 6.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        },
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "operator": "-",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "UnaryExpression",
 | 
			
		||||
                        "type": "UnaryExpression"
 | 
			
		||||
                      }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "ArrayExpression",
 | 
			
		||||
                    "type": "ArrayExpression"
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "PipeSubstitution",
 | 
			
		||||
                    "type": "PipeSubstitution"
 | 
			
		||||
                          "type": "UnaryExpression",
 | 
			
		||||
                          "type": "UnaryExpression"
 | 
			
		||||
                        }
 | 
			
		||||
                      ],
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "ArrayExpression",
 | 
			
		||||
                      "type": "ArrayExpression"
 | 
			
		||||
                    }
 | 
			
		||||
                  }
 | 
			
		||||
                ],
 | 
			
		||||
                "callee": {
 | 
			
		||||
@ -853,7 +860,7 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
                  "name": {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "name": "startProfileAt",
 | 
			
		||||
                    "name": "startProfile",
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "Identifier"
 | 
			
		||||
                  },
 | 
			
		||||
@ -864,8 +871,9 @@ description: Result of parsing artifact_graph_example_code1.kcl
 | 
			
		||||
                "commentStart": 0,
 | 
			
		||||
                "end": 0,
 | 
			
		||||
                "start": 0,
 | 
			
		||||
                "type": "CallExpression",
 | 
			
		||||
                "type": "CallExpression"
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "unlabeled": null
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user