fn triangle = (len) => {
  return startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> angledLine({angle: 60, length: len}, %, 'a')
  |> angledLine({angle: 180, length: len}, %, 'b')
  |> angledLine({angle: 300, length: len}, %, 'c')
}

let triangleHeight = 200
let plumbusLen = 100
let radius = 80
let circ = {angle_start: 0, angle_end: 360, radius: radius}

let triangleLen = 500
const p = triangle(triangleLen)
  |> extrude(triangleHeight, %)

fn circl = (x, tag) => {
return startSketchOn(p, tag)
  |> startProfileAt([x + radius, triangleHeight/2], %)
  |> arc(circ, %, 'arc-' + tag)
  |> close(%)
}

const plumbus1 = 
  circl(-200, 'c')
  |> extrude(plumbusLen, %)
  |> fillet({
       radius: 5,
       tags: ['arc-c', getOppositeEdge('arc-c', %)]
     }, %)

const plumbus0 = 
  circl(200, 'a')
  |> extrude(plumbusLen, %)
  |> fillet({
       radius: 5,
       tags: ['arc-a', getOppositeEdge('arc-a', %)]
     }, %)


