2022-09-05 19:05:02 -07:00
|
|
|
import { pluginBundle } from '@freesewing/plugin-bundle'
|
|
|
|
import { draftRibbing } from './shared.mjs'
|
2019-03-03 16:04:24 +01:00
|
|
|
|
2022-09-11 14:36:26 +02:00
|
|
|
function draftHueyWaistband({ complete, points, measurements, options, macro, part }) {
|
2019-08-03 15:03:33 +02:00
|
|
|
if (!options.ribbing) return part
|
2019-03-03 16:04:24 +01:00
|
|
|
|
2020-06-28 13:10:06 +02:00
|
|
|
draftRibbing(part, measurements.hips * (1 + options.hipsEase) * (1 - options.ribbingStretch))
|
2019-03-03 16:04:24 +01:00
|
|
|
|
|
|
|
// Complete pattern?
|
|
|
|
if (complete) {
|
2019-08-03 15:03:33 +02:00
|
|
|
macro('title', {
|
2019-03-03 16:04:24 +01:00
|
|
|
at: points.title,
|
|
|
|
nr: 6,
|
2021-04-24 10:16:31 +02:00
|
|
|
title: 'waistband',
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
2019-03-03 16:04:24 +01:00
|
|
|
}
|
2019-08-03 15:03:33 +02:00
|
|
|
return part
|
2019-03-03 16:04:24 +01:00
|
|
|
}
|
2022-09-05 19:05:02 -07:00
|
|
|
|
|
|
|
export const waistband = {
|
|
|
|
name: 'huey.waistband',
|
|
|
|
options: {
|
|
|
|
ribbingStretch: { pct: 15, min: 0, max: 30, menu: 'fit' },
|
|
|
|
},
|
2022-09-11 14:36:26 +02:00
|
|
|
plugins: [pluginBundle],
|
2022-09-05 19:05:02 -07:00
|
|
|
draft: draftHueyWaistband,
|
|
|
|
}
|