1
0
Fork 0

fix(simon): Support undetailed paperless draft. See #1280

This commit is contained in:
joostdecock 2021-09-05 09:55:24 +02:00
parent e0fe1c7e5f
commit f9c95b448b
6 changed files with 92 additions and 76 deletions

View file

@ -148,15 +148,17 @@ export default (part) => {
to: points.armhole,
y: points.placketTopEdge.y - offset - sa - 45,
})
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x - 15,
})
if (complete) {
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x - 15,
})
}
}
macro('vd', {
from: points.placketBottomEdge,

View file

@ -81,15 +81,17 @@ export default (part) => {
to: points.armhole,
y: points.s3CollarSplit.y - 45 - sa,
})
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x - 15,
})
if (complete) {
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x - 15,
})
}
}
macro('vd', {
from: points.placketBottomEdge,

View file

@ -93,15 +93,17 @@ export default (part) => {
to: points.placketTopEdge,
y: points.s3CollarSplit.y - 45 - sa,
})
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x + 15 + sa,
})
if (complete) {
points.button0 = points.placketTopEdge
let j
for (let i = 0; i < options.buttons; i++) {
j = i + 1
macro('vd', {
from: points['button' + j],
to: points['button' + i],
x: points.placketTopEdge.x + 15 + sa,
})
}
}
macro('vd', {
from: points.placketBottomEdge,

View file

@ -141,12 +141,14 @@ export const decorateFrenchCuff = (part) => {
}
export const paperlessBarrelCuff = (part) => {
let { sa, macro, points, options } = part.shorthand()
macro('hd', {
from: points.buttonhole1,
to: points.button1,
y: points.bottomLeft.y + 15 + sa,
})
let { sa, macro, points, options, complete } = part.shorthand()
if (complete) {
macro('hd', {
from: points.buttonhole1,
to: points.button1,
y: points.bottomLeft.y + 15 + sa,
})
}
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
@ -157,14 +159,14 @@ export const paperlessBarrelCuff = (part) => {
to: points.topLeft.shift(0, 40),
x: points.bottomLeft.x - 15 - sa,
})
if (options.barrelCuffNarrowButton) {
if (complete && options.barrelCuffNarrowButton) {
macro('hd', {
from: points.narrowButton1,
to: points.button1,
y: points.topRight.y - 15 - sa,
})
}
if (options.cuffButtonRows === 2) {
if (complete && options.cuffButtonRows === 2) {
macro('vd', {
from: points.button2,
to: points.button1,
@ -176,22 +178,24 @@ export const paperlessBarrelCuff = (part) => {
}
export const paperlessFrenchCuff = (part) => {
let { sa, macro, points } = part.shorthand()
macro('hd', {
from: points.button4,
to: points.button2,
y: points.bottomLeft.y + 15 + sa,
})
let { sa, macro, points, complete } = part.shorthand()
if (complete) {
macro('hd', {
from: points.button4,
to: points.button2,
y: points.bottomLeft.y + 15 + sa,
})
macro('vd', {
from: points.button2,
to: points.button1,
x: points.topRight.x + 15 + sa,
})
}
macro('hd', {
from: points.midLeft,
to: points.midRight,
y: points.bottomLeft.y + 30 + sa,
})
macro('vd', {
from: points.button2,
to: points.button1,
x: points.topRight.x + 15 + sa,
})
macro('vd', {
from: points.bottomRight.shift(180, 40),
to: points.topRight.shift(180, 40),

View file

@ -161,16 +161,18 @@ export default (part) => {
// Paperless?
if (paperless) {
macro('hd', {
from: points.backNotch,
to: points.sleeveTip,
y: points.sleeveTip.y - 15 - sa * options.ffsa,
})
macro('hd', {
from: points.sleeveTip,
to: points.frontNotch,
y: points.sleeveTip.y - 15 - sa * options.ffsa,
})
if (complete) {
macro('hd', {
from: points.backNotch,
to: points.sleeveTip,
y: points.sleeveTip.y - 15 - sa * options.ffsa,
})
macro('hd', {
from: points.sleeveTip,
to: points.frontNotch,
y: points.sleeveTip.y - 15 - sa * options.ffsa,
})
}
macro('hd', {
from: points.bicepsLeft,
to: points.sleeveTip,
@ -202,26 +204,28 @@ export default (part) => {
to: points.bicepsRight,
x: points.bicepsRight.x + 15 + sa * options.ffsa,
})
macro('vd', {
from: points.bicepsRight,
to: points.frontNotch,
x: points.bicepsRight.x + 15 + sa * options.ffsa,
})
if (complete) {
macro('vd', {
from: points.bicepsRight,
to: points.frontNotch,
x: points.bicepsRight.x + 15 + sa * options.ffsa,
})
macro('vd', {
from: points.bicepsLeft,
to: points.backNotch,
x: points.bicepsLeft.x - 15 - sa,
})
macro('vd', {
from: points.cuffLeftCusp,
to: points.placketEnd,
x: points.placketEnd.x - 15,
})
}
macro('vd', {
from: points.bicepsRight,
to: points.sleeveTip,
x: points.bicepsRight.x + 30 + sa * options.ffsa,
})
macro('vd', {
from: points.bicepsLeft,
to: points.backNotch,
x: points.bicepsLeft.x - 15 - sa,
})
macro('vd', {
from: points.cuffLeftCusp,
to: points.placketEnd,
x: points.placketEnd.x - 15,
})
macro('hd', {
from: points.wristLeft,
to: points.wristRight,

View file

@ -83,11 +83,13 @@ export default (part) => {
to: points.topRight,
x: points.topRight.x + 30,
})
macro('hd', {
from: points.bottomLeft,
to: points.button,
y: points.bottomRight.y + 15,
})
if (complete) {
macro('hd', {
from: points.bottomLeft,
to: points.button,
y: points.bottomRight.y + 15,
})
}
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,