asset picket_fence "Picket fence" complexity=2
// one 2 m run of garden fence: two chunky posts with ball caps, two rails, pointed pickets between;
// white by default, sometimes cream, sky or mint. Lines up end to end along a row.
let L = 2.0
let fenceC = white:4|cream:2|sky|mint
let PH = .78..0.86
box postL size=(.16, PH+.1, .16) at=(L*.5-.08, 0, 0) round=.04 color=fenceC
box postR size=(.16, PH+.1, .16) at=(-L*.5+.08, 0, 0) round=.04 color=fenceC
ball cap on=postL at=(0, PH+.14, 0) r=.1 color=fenceC segs=10 rings=6
ball capR on=postR at=(0, PH+.14, 0) r=.1 color=fenceC segs=10 rings=6
box rail x2 at=(0, PH*.55, -.05) row=(0, PH*.5-.06, 0) size=(L-.2, .1, .06) round=.025 color=fenceC*.93
slab picket x7 at=(0, .04, 0) row=(.25, 0, 0) pts=[-.055,0 .055,0 .055,PH-.08 0,PH .055*-1,PH-.08] t=.05 round=.015 color=fenceC