1
0
Fork 0

fix(snapseries): Add imperial zipper lengths

This commit is contained in:
Benjamin Fan 2023-05-26 12:43:25 -07:00
parent 9542b192f7
commit ab8273e532

View file

@ -1,9 +1,24 @@
const inchesToMm = (i) => (Array.isArray(i) ? i.map((x) => x * 25.4) : i * 25.4)
// Common width for elastics // Common width for elastics
export const elastics = { export const elastics = {
metric: [3.5, 5, 10, 12, 20, 25, 30, 40, 50, 60, 80, 100, 120], metric: [3.5, 5, 10, 12, 20, 25, 30, 40, 50, 60, 80, 100, 120],
imperial: [ imperial: inchesToMm([
3.175, 6.35, 9.525, 12.7, 15.875, 19.05, 25.4, 31.75, 38.1, 44.45, 50.8, 76.2, 101.6, 127, 1 / 8,
], 1 / 4,
3 / 8,
1 / 2,
5 / 8,
3 / 4,
1,
1 + 1 / 4,
1 + 1 / 2,
1 + 3 / 4,
2,
3,
4,
5,
]),
} }
// Common length for zippers // Common length for zippers
@ -12,7 +27,9 @@ export const zippers = {
80, 100, 120, 140, 150, 160, 180, 200, 220, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 80, 100, 120, 140, 150, 160, 180, 200, 220, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700,
750, 800, 900, 1000, 1100, 1200, 750, 800, 900, 1000, 1100, 1200,
], ],
imperial: 25.4, imperial: inchesToMm([
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 28, 30, 36, 42, 48, 60, 80,
]),
} }
// Snap to small steps (~1mm) // Snap to small steps (~1mm)