You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These variables enable what seems to be somewhat questionable behavior, need to review this code to understand what is being fixed and whether the fix is working.
The text was updated successfully, but these errors were encountered:
I added this as a fix for the following carrier placement issues:
If more than 4 carriers are parked on a given side and carrierSpacing = 1, the carriers push/scrape against each other when moved.
When a carrier is more than 8 spaces away from the edge-most needle on a given side (which happens quite easily when carrierSpacing = 2), it will frequently drop the edge stitches when picked up again to knit (due to too much slack and not enough security for the yarn).
My solution was to allow for x-carrier-spacing N to be equal to non-whole numbers in increments of 0.5, which tells the backend to alternate between: bumpAdd = Math.floor(N) and bumpAdd = Math.ceil(N) each time it bumps a carrier on a given side.
So if x-carrier-spacing 1.5 is specified in the knitout, if (Math.abs(add) % 1 === 0.5) returns true, and the boolean leftFloor or rightFloor (depending on whether add < 0 [meaning we're dealing with carriers on the left side] or vice versa) is toggled betweentrue (for that pass, the working carrier will be bumped 1 —> Math.floor(1.5)), and false (in the next pass, the working carrier will be bumped 2 —> Math.ceil(1.5)). But if N is a whole number, the carrierSpacing is consistently equal to that number.
I've found this to be really helpful for situations where I'm using 5 or 6 carriers and a pattern that causes a lot of carrier stacking, but it is still definitely a quick fix and could be replaced with something more clear and sophisticated.
These variables enable what seems to be somewhat questionable behavior, need to review this code to understand what is being fixed and whether the fix is working.
The text was updated successfully, but these errors were encountered: