---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing subtract_doesnt_need_brackets.kcl
---
fn cube(pos, scale) {
  return startSketchOn(XY)
    |> startProfile(at = [pos[0] - scale, pos[1] - scale])
    |> line(endAbsolute = [pos[0] + scale, pos[1] - scale])
    |> line(endAbsolute = [pos[0] + scale, pos[1] + scale])
    |> line(endAbsolute = [pos[0] - scale, pos[1] + scale])
    |> close()
    |> extrude(length = 10)
}

part001 = cube(pos = [0, 0], scale = 10)
part002 = cube(pos = [7, 3], scale = 5)
  |> translate(z = 1)

subtractedPart = subtract(part001, tools = part002)
