@settings(defaultLengthUnit = in)
sketch001 = startSketchOn(XZ)
  |> 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)
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg02)
  |> close()
extrude001 = extrude(sketch001, length = 100)
chamf = chamfer(
  extrude001,
  length = 30,
  tags = [
    seg01,
    getNextAdjacentEdge(yo),
    getNextAdjacentEdge(seg02),
    getOppositeEdge(seg01)
  ]
)
