2019-08-03 15:03:33 +02:00
|
|
|
import * as shared from './shared'
|
2018-07-24 10:16:31 +00:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
export default part => {
|
2019-05-10 13:14:31 +02:00
|
|
|
let {
|
|
|
|
store,
|
|
|
|
sa,
|
|
|
|
points,
|
|
|
|
Path,
|
|
|
|
paths,
|
|
|
|
Snippet,
|
|
|
|
snippets,
|
|
|
|
complete,
|
|
|
|
paperless,
|
|
|
|
macro
|
2019-08-03 15:03:33 +02:00
|
|
|
} = part.shorthand()
|
2018-08-03 17:44:55 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Seamline
|
2019-08-03 15:03:33 +02:00
|
|
|
paths.saBase = shared.saBase('back', points, Path)
|
2018-12-17 14:42:28 +01:00
|
|
|
paths.seam = new Path()
|
|
|
|
.move(points.cbNeck)
|
|
|
|
.line(points.cbHips)
|
|
|
|
.join(paths.saBase)
|
2019-08-03 15:03:33 +02:00
|
|
|
.attr('class', 'fabric')
|
2018-08-06 16:19:12 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Store lengths to fit sleeve
|
2019-08-03 15:03:33 +02:00
|
|
|
store.set('backArmholeLength', shared.armholeLength(points, Path))
|
|
|
|
store.set('backShoulderToArmholePitch', shared.shoulderToArmholePitch(points, Path))
|
2018-07-19 14:43:27 +00:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Complete pattern?
|
|
|
|
if (complete) {
|
2019-08-03 15:03:33 +02:00
|
|
|
macro('cutonfold', {
|
2018-12-17 14:42:28 +01:00
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.cbHips,
|
|
|
|
grainline: true
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
2018-08-06 16:19:12 +02:00
|
|
|
|
2019-08-03 15:03:33 +02:00
|
|
|
macro('title', { at: points.title, nr: 2, title: 'back' })
|
|
|
|
snippets.armholePitchNotch = new Snippet('bnotch', points.armholePitch)
|
2018-12-17 14:42:28 +01:00
|
|
|
if (sa) {
|
|
|
|
paths.sa = paths.saBase
|
|
|
|
.offset(sa)
|
2019-08-03 15:03:33 +02:00
|
|
|
.attr('class', 'fabric sa')
|
2018-12-17 14:42:28 +01:00
|
|
|
.line(points.cbNeck)
|
2019-08-03 15:03:33 +02:00
|
|
|
.move(points.cbHips)
|
|
|
|
paths.sa.line(paths.sa.start())
|
2018-07-19 14:43:27 +00:00
|
|
|
}
|
2018-12-17 14:42:28 +01:00
|
|
|
}
|
2018-08-03 17:44:55 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Paperless?
|
|
|
|
if (paperless) {
|
2019-08-03 15:03:33 +02:00
|
|
|
shared.dimensions(macro, points, Path, sa)
|
|
|
|
macro('hd', {
|
2018-12-17 14:42:28 +01:00
|
|
|
from: points.cbHips,
|
|
|
|
to: points.hips,
|
|
|
|
y: points.hips.y + sa + 15
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
|
|
|
macro('vd', {
|
2018-12-17 14:42:28 +01:00
|
|
|
from: points.cbHips,
|
|
|
|
to: points.cbNeck,
|
|
|
|
x: points.cbHips.x - sa - 15
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
|
|
|
macro('hd', {
|
2018-12-17 14:42:28 +01:00
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.neck,
|
|
|
|
y: points.neck.y - sa - 15
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
|
|
|
macro('hd', {
|
2018-12-17 14:42:28 +01:00
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.shoulder,
|
|
|
|
y: points.neck.y - sa - 30
|
2019-08-03 15:03:33 +02:00
|
|
|
})
|
2018-07-19 13:14:50 +00:00
|
|
|
}
|
|
|
|
|
2019-08-03 15:03:33 +02:00
|
|
|
return part
|
|
|
|
}
|