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

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