;!knitout-2
;;Machine: Kniterate
;;Carriers: 1 2 3 4 5 6

;title: Sheet All-Needle Cast-On (raw knitout)
; Casts on a sheet by knitting all needles and then stacking front and back stitches to produce a decorative welt.

;Parameters:
; min = 1 -- needle number of left edge
; max = 20 -- needle number of right edge
; carrier = "3" -- carrier name

;Bring in carrier:
in 3

;On Kniterate machines, carriers start on the left,
;so will start by tucking all needles left-to-right,
;and will be sure to tuck the rightmost back-bed needle last.

;Need to use quarter-pitch racking to tuck all needles in one pass:
rack 0.5

tuck + f1 3
tuck + b1 3
tuck + f2 3
tuck + b2 3
tuck + f3 3
tuck + b3 3
tuck + f4 3
tuck + b4 3
tuck + f5 3
tuck + b5 3
tuck + f6 3
tuck + b6 3
tuck + f7 3
tuck + b7 3
tuck + f8 3
tuck + b8 3
tuck + f9 3
tuck + b9 3
tuck + f10 3
tuck + b10 3
tuck + f11 3
tuck + b11 3
tuck + f12 3
tuck + b12 3
tuck + f13 3
tuck + b13 3
tuck + f14 3
tuck + b14 3
tuck + f15 3
tuck + b15 3
tuck + f16 3
tuck + b16 3
tuck + f17 3
tuck + b17 3
tuck + f18 3
tuck + b18 3
tuck + f19 3
tuck + b19 3
tuck + f20 3
tuck + b20 3

;Return to aligned racking:
rack 0

;Do a row of plain knitting on the front and back:
knit - f20 3
knit - f19 3
knit - f18 3
knit - f17 3
knit - f16 3
knit - f15 3
knit - f14 3
knit - f13 3
knit - f12 3
knit - f11 3
knit - f10 3
knit - f9 3
knit - f8 3
knit - f7 3
knit - f6 3
knit - f5 3
knit - f4 3
knit - f3 3
knit - f2 3
knit - f1 3
knit + b1 3
knit + b2 3
knit + b3 3
knit + b4 3
knit + b5 3
knit + b6 3
knit + b7 3
knit + b8 3
knit + b9 3
knit + b10 3
knit + b11 3
knit + b12 3
knit + b13 3
knit + b14 3
knit + b15 3
knit + b16 3
knit + b17 3
knit + b18 3
knit + b19 3
knit + b20 3
;One can knit more on the front or back beds here to make a larger "welt" at the edge.

;Stack back-bed stitches with front-bed stitches:
xfer b1 f1
xfer b2 f2
xfer b3 f3
xfer b4 f4
xfer b5 f5
xfer b6 f6
xfer b7 f7
xfer b8 f8
xfer b9 f9
xfer b10 f10
xfer b11 f11
xfer b12 f12
xfer b13 f13
xfer b14 f14
xfer b15 f15
xfer b16 f16
xfer b17 f17
xfer b18 f18
xfer b19 f19
xfer b20 f20

;knit two plain rows through the stacked stitches to return carrier to the right edge:
knit - f20 3
knit - f19 3
knit - f18 3
knit - f17 3
knit - f16 3
knit - f15 3
knit - f14 3
knit - f13 3
knit - f12 3
knit - f11 3
knit - f10 3
knit - f9 3
knit - f8 3
knit - f7 3
knit - f6 3
knit - f5 3
knit - f4 3
knit - f3 3
knit - f2 3
knit - f1 3
knit + f1 3
knit + f2 3
knit + f3 3
knit + f4 3
knit + f5 3
knit + f6 3
knit + f7 3
knit + f8 3
knit + f9 3
knit + f10 3
knit + f11 3
knit + f12 3
knit + f13 3
knit + f14 3
knit + f15 3
knit + f16 3
knit + f17 3
knit + f18 3
knit + f19 3
knit + f20 3


;...now can knit on [min,max].
