1
0
Fork 0

chore(teagan): Port to v3 stage 2

This commit is contained in:
joostdecock 2022-09-11 17:02:10 +02:00
parent dfe7ba6e8a
commit 674e80b591
3 changed files with 49 additions and 42 deletions

View file

@ -1,21 +1,20 @@
import { front } from './front.mjs' import { front } from './front.mjs'
function teaganBack(part) { function teaganBack({
const { store,
store, sa,
sa, Point,
Point, points,
points, Path,
Path, paths,
paths, options,
options, complete,
complete, paperless,
paperless, macro,
macro, utils,
utils, measurements,
measurements, part,
} = part.shorthand() }) {
// Adjust neckline // Adjust neckline
points.cbNeck = new Point(0, points.neck.y + options.backNeckCutout * measurements.neck) points.cbNeck = new Point(0, points.neck.y + options.backNeckCutout * measurements.neck)
points.cbNeckCp1 = points.cbNeck.shift(0, points.neck.x / 2) points.cbNeckCp1 = points.cbNeck.shift(0, points.neck.x / 2)

View file

@ -1,25 +1,24 @@
import { base } from '@freesewing/brian' import { base } from '@freesewing/brian'
function teaganFront(part) { function teaganFront({
const { utils,
utils, store,
store, sa,
sa, Point,
Point, points,
points, Path,
Path, paths,
paths, Snippet,
Snippet, snippets,
snippets, options,
options, measurements,
measurements, complete,
complete, paperless,
paperless, macro,
macro, log,
raise, units,
units, part,
} = part.shorthand() }) {
// Hide Brian paths // Hide Brian paths
for (let key of Object.keys(paths)) paths[key].render = false for (let key of Object.keys(paths)) paths[key].render = false
@ -58,8 +57,8 @@ function teaganFront(part) {
points.armholePitch.x points.armholePitch.x
) )
// Raise info for full length // Log info for full length
raise.info(['fullLengthFromHps', units(points.hps.dy(points.hem))]) log.info(['fullLengthFromHps', units(points.hps.dy(points.hem))])
// Draw seamline // Draw seamline
paths.hemBase = new Path().move(points.cfHem).line(points.hem).setRender(false) paths.hemBase = new Path().move(points.cfHem).line(points.hem).setRender(false)

View file

@ -1,9 +1,18 @@
import { sleevecap } from '@freesewing/brian' import { sleevecap } from '@freesewing/brian'
function teaganSleeve(part) { function teaganSleeve({
const { sa, Point, points, Path, paths, options, complete, paperless, macro, measurements } = sa,
part.shorthand() Point,
points,
Path,
paths,
options,
complete,
paperless,
macro,
measurements,
part,
}) {
let height = points.bicepsRight.x * options.sleeveLength let height = points.bicepsRight.x * options.sleeveLength
let width = measurements.biceps * (1 + options.bicepsEase) * (1 + options.sleeveEase) let width = measurements.biceps * (1 + options.bicepsEase) * (1 + options.sleeveEase)
if (width > points.bicepsRight.x * 2) width = points.bicepsRight.x * 2 if (width > points.bicepsRight.x * 2) width = points.bicepsRight.x * 2