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

;title: Sheet Twisted-Tuck Cast-On (raw knitout)
; Casts on a sheet by knitting twisted tucks on all needles; slow!

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

;Bring in carrier:
inhook 3
;Set stitch table entry for cast-on:
x-stitch-number 101

;Use a twisted tuck to cast on every stitch.
;Note: this requires a new pass for every stitch, so is pretty slow!
;There are both faster and fancier cast-ons.
;On SWGN2 machines, carriers start on the right, so will start with rightmost needle.
;Miss the rightmost needle to ensure yarn inserting hook is parked to its right instead of left:
miss - f20 3
tuck + f20 3
tuck + f19 3
tuck + f18 3
tuck + f17 3
tuck + f16 3
tuck + f15 3
tuck + f14 3
tuck + f13 3
tuck + f12 3
tuck + f11 3
tuck + f10 3
tuck + f9 3
tuck + f8 3
tuck + f7 3
tuck + f6 3
tuck + f5 3
tuck + f4 3
tuck + f3 3
tuck + f2 3
tuck + f1 3
;Set stitch table entry for knitting:
x-stitch-number 105
;knit a plain row to bring the carrier back to the right:
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
;send out yarn inserting hook; it is no longer needed to hold the yarn in place:
releasehook 3

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