;!knitout-2
;;Machine: SWGN2
;;Carriers: 1 2 3 4 5 6 7 8 9 10

;title: Tube Cast-On (raw knitout)

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

;Bring in carrier:
inhook 3

;On SWGN2 machines, carriers start on the right,
;so will start tucking onto needles right-to-left:
tuck - f20 3
tuck - f18 3
tuck - f16 3
tuck - f14 3
tuck - f12 3
tuck - f10 3
tuck - f8 3
tuck - f6 3
tuck - f4 3
tuck - f2 3

;...continue clockwise around the tube to the back bed:
tuck + b1 3
tuck + b3 3
tuck + b5 3
tuck + b7 3
tuck + b9 3
tuck + b11 3
tuck + b13 3
tuck + b15 3
tuck + b17 3
tuck + b19 3

;...continue clockwise around the tube to the front bed and fill in needles missed the first time:
tuck - f19 3
tuck - f17 3
tuck - f15 3
tuck - f13 3
tuck - f11 3
tuck - f9 3
tuck - f7 3
tuck - f5 3
tuck - f3 3
tuck - f1 3

;...finally, fill in the rest of the back bed:
tuck + b2 3
tuck + b4 3
tuck + b6 3
tuck + b8 3
tuck + b10 3
tuck + b12 3
tuck + b14 3
tuck + b16 3
tuck + b18 3
tuck + b20 3

;now knit a row of plain knitting to let the cast-on stitches relax:
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
;send the yarn inserting hook out -- yarn should be well-enough held by the needles at this point.
releasehook 3
;finish the back of the row of plain knitting:
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

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