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'
function teaganBack(part) {
const {
store,
sa,
Point,
points,
Path,
paths,
options,
complete,
paperless,
macro,
utils,
measurements,
} = part.shorthand()
function teaganBack({
store,
sa,
Point,
points,
Path,
paths,
options,
complete,
paperless,
macro,
utils,
measurements,
part,
}) {
// Adjust neckline
points.cbNeck = new Point(0, points.neck.y + options.backNeckCutout * measurements.neck)
points.cbNeckCp1 = points.cbNeck.shift(0, points.neck.x / 2)

View file

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

View file

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