chore(holmes) Removed circumference suffix from measurements
This commit is contained in:
parent
3136379589
commit
f1681cb45c
4 changed files with 27 additions and 30 deletions
|
@ -1,38 +1,38 @@
|
||||||
import { version } from "../package.json";
|
import { version } from '../package.json'
|
||||||
|
|
||||||
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
// ?? 🤔 ?? --> https://en.freesewing.dev/packages/core/config
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "holmes",
|
name: 'holmes',
|
||||||
version,
|
version,
|
||||||
design: "AlfaLyr",
|
design: 'AlfaLyr',
|
||||||
code: "AlfaLyr",
|
code: 'AlfaLyr',
|
||||||
department: "accessories",
|
department: 'accessories',
|
||||||
type: "pattern",
|
type: 'pattern',
|
||||||
difficulty: 3,
|
difficulty: 3,
|
||||||
tags: [
|
tags: [
|
||||||
"freesewing",
|
'freesewing',
|
||||||
"design",
|
'design',
|
||||||
"diy",
|
'diy',
|
||||||
"fashion",
|
'fashion',
|
||||||
"made to measure",
|
'made to measure',
|
||||||
"parametric design",
|
'parametric design',
|
||||||
"pattern",
|
'pattern',
|
||||||
"sewing",
|
'sewing',
|
||||||
"sewing pattern"
|
'sewing pattern'
|
||||||
],
|
],
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
style: ["lengthRatio", "goreNumber", "brimAngle", "brimWidth"]
|
style: ['lengthRatio', 'goreNumber', 'brimAngle', 'brimWidth']
|
||||||
},
|
},
|
||||||
measurements: ["headCircumference"],
|
measurements: ['head'],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
inject: {},
|
inject: {},
|
||||||
hide: [],
|
hide: [],
|
||||||
parts: ["gore", "brim", "ear"],
|
parts: ['gore', 'brim', 'ear'],
|
||||||
options: {
|
options: {
|
||||||
lengthRatio: { pct: 55, min: 40, max: 60 },
|
lengthRatio: { pct: 55, min: 40, max: 60 },
|
||||||
goreNumber: { count: 6, min: 4, max: 20 },
|
goreNumber: { count: 6, min: 4, max: 20 },
|
||||||
brimAngle: { deg: 45, min: 10, max:90 },
|
brimAngle: { deg: 45, min: 10, max: 90 },
|
||||||
brimWidth: { mm: 30, min: 5, max: 100 }
|
brimWidth: { mm: 30, min: 5, max: 100 }
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
Point,
|
Point,
|
||||||
points,
|
points,
|
||||||
|
@ -12,7 +12,7 @@ export default function(part) {
|
||||||
macro
|
macro
|
||||||
} = part.shorthand()
|
} = part.shorthand()
|
||||||
|
|
||||||
let headRadius = measurements.headCircumference / 2 / Math.PI
|
let headRadius = measurements.head / 2 / Math.PI
|
||||||
let brimRadius = headRadius / Math.sin((options.brimAngle * Math.PI) / 180)
|
let brimRadius = headRadius / Math.sin((options.brimAngle * Math.PI) / 180)
|
||||||
let sectorAngle = Math.PI / 3
|
let sectorAngle = Math.PI / 3
|
||||||
let brimSectorAngle = (sectorAngle * headRadius) / brimRadius
|
let brimSectorAngle = (sectorAngle * headRadius) / brimRadius
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
Point,
|
Point,
|
||||||
points,
|
points,
|
||||||
|
@ -17,10 +17,7 @@ export default function(part) {
|
||||||
// Design pattern here
|
// Design pattern here
|
||||||
|
|
||||||
points.top = new Point(0, 0)
|
points.top = new Point(0, 0)
|
||||||
points.bottom = new Point(
|
points.bottom = new Point(measurements.head / 12, (options.lengthRatio * measurements.head) / 2)
|
||||||
measurements.headCircumference / 12,
|
|
||||||
(options.lengthRatio * measurements.headCircumference) / 2
|
|
||||||
)
|
|
||||||
points.topC = points.top.shift(0, points.bottom.x)
|
points.topC = points.top.shift(0, points.bottom.x)
|
||||||
points.bottomC = points.bottom.shift(90, points.bottom.y - points.bottom.x)
|
points.bottomC = points.bottom.shift(90, points.bottom.y - points.bottom.x)
|
||||||
points.topCFlipped = points.topC.flipX()
|
points.topCFlipped = points.topC.flipX()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
Point,
|
Point,
|
||||||
points,
|
points,
|
||||||
|
@ -15,7 +15,7 @@ export default function(part) {
|
||||||
// Design pattern here
|
// Design pattern here
|
||||||
|
|
||||||
//Radius of the head
|
//Radius of the head
|
||||||
let headRadius = measurements.headCircumference / 2 / Math.PI
|
let headRadius = measurements.head / 2 / Math.PI
|
||||||
|
|
||||||
points.p0 = new Point(0, 0)
|
points.p0 = new Point(0, 0)
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ export default function(part) {
|
||||||
from: points.p0,
|
from: points.p0,
|
||||||
radius: headRadius,
|
radius: headRadius,
|
||||||
goreNumber: options.goreNumber,
|
goreNumber: options.goreNumber,
|
||||||
extraLength: ((options.lengthRatio - 0.5) * measurements.headCircumference) / 2,
|
extraLength: ((options.lengthRatio - 0.5) * measurements.head) / 2,
|
||||||
prefix: 'gore_',
|
prefix: 'gore_',
|
||||||
render: true
|
render: true
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue