fn rect = (origin) => {
  return startSketchOn('XZ')
  |> startProfileAt(origin, %)
  |> angledLine([0, 191.26], %, $rectangleSegmentA001)
  |> angledLine([
       segAng(rectangleSegmentA001) - 90,
       196.99
     ], %, $rectangleSegmentB001)
  |> angledLine([
       segAng(rectangleSegmentA001),
       -segLen(rectangleSegmentA001)
     ], %, $rectangleSegmentC001)
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
  |> close()
}

rect([0, 0])
rect([20, 0])
