1
0
Fork 0

wrench: Tweaked options based on sample test

This commit is contained in:
Joost De Cock 2019-03-16 15:42:39 +01:00
parent f6905dcb1e
commit adebec8b4b
6 changed files with 38 additions and 31 deletions

View file

@ -77,7 +77,7 @@ export default {
armholeDepthFactor: { pct: 65, min: 50, max: 70 }, armholeDepthFactor: { pct: 65, min: 50, max: 70 },
backNeckCutout: { pct: 5, min: 2, max: 8 }, backNeckCutout: { pct: 5, min: 2, max: 8 },
bicepsEase: { pct: 20, min: 0, max: 50 }, bicepsEase: { pct: 20, min: 0, max: 50 },
chestEase: { pct: 8, min: -4, max: 20 }, chestEase: { pct: 10, min: 5, max: 20 },
collarEase: { pct: 3.5, min: 0, max: 10 }, collarEase: { pct: 3.5, min: 0, max: 10 },
cuffEase: { pct: 20, min: 0, max: 200 }, cuffEase: { pct: 20, min: 0, max: 200 },
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 }, frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 },
@ -103,14 +103,14 @@ export default {
pocketFoldover: { pct: 25, min: 15, max: 35 }, pocketFoldover: { pct: 25, min: 15, max: 35 },
waistEase: { pct: 10, min: 5, max: 20 }, waistEase: { pct: 14, min: 8, max: 25 },
hipsEase: { pct: 10, min: 5, max: 20 }, hipsEase: { pct: 12, min: 8, max: 20 },
centerBackDart: { pct: 0.5, min: 0, max: 1.5 }, centerBackDart: { pct: 0.5, min: 0, max: 1.5 },
centerFrontHemDrop: { pct: 2, min: 0, max: 4 }, centerFrontHemDrop: { pct: 2, min: 0, max: 4 },
backVent: { count: 2, min: 0, max: 2 }, backVent: { count: 1, min: 0, max: 2 },
backVentLength: { pct: 35, min: 15, max: 100 }, backVentLength: { pct: 35, min: 15, max: 100 },
frontCutawayAngle: {deg: 2.5, min: 1, max: 4}, frontCutawayAngle: {deg: 2.5, min: 1, max: 4},
@ -120,37 +120,35 @@ export default {
chestPocketDepth: { pct: 110, min: 70, max: 150 }, chestPocketDepth: { pct: 110, min: 70, max: 150 },
chestPocketWidth: { pct: 37, min: 30, max: 45 }, chestPocketWidth: { pct: 37, min: 30, max: 45 },
chestPocketPlacement: {pct: 52, min: 55, max: 65 }, chestPocketPlacement: {pct: 52, min: 40, max: 60 },
chestPocketAngle: { deg: 2.5, min: 0, max: 5 }, chestPocketAngle: { deg: 2.5, min: 0, max: 7 },
chestPocketWeltSize: { pct: 17.5, min: 10, max: 25 }, chestPocketWeltSize: { pct: 17.5, min: 10, max: 25 },
frontPocketPlacement: { pct: 75, min: 65, max: 85 }, frontPocketPlacement: { pct: 75, min: 65, max: 85 },
frontPocketWidth: { pct: 68, min: 55, max: 75 }, frontPocketWidth: { pct: 68, min: 55, max: 75 },
frontPocketDepth: { pct: 110, min: 80, max: 130 }, frontPocketDepth: { pct: 110, min: 80, max: 130 },
lapelStart: { pct: 35, min: 25, max: 45 }, lapelStart: { pct: 10, min: 0, max: 35 },
lapelReduction: { pct: 5, min: 0, max: 10 }, lapelReduction: { pct: 5, min: 0, max: 10 },
collarBend: { deg: 5, min: 0, max: 10 }, collarSpread: { deg: 13, min: 5, max: 35 },
collarSpread: { deg: 13, min: 5, max: 25 }, collarHeight: { pct: 9, min: 7, max: 10 },
collarHeight: { pct: 9, min: 7, max: 12 },
collarNotchDepth: { pct: 15, min: 15, max: 50 }, collarNotchDepth: { pct: 15, min: 15, max: 50 },
collarNotchAngle: { deg: 45, min: 30, max: 60 }, collarNotchAngle: { deg: 45, min: 30, max: 60 },
collarNotchReturn: { pct: 100, min: 50, max: 100 }, collarNotchReturn: { pct: 100, min: 50, max: 100 },
collarRoll: {mm: 2.5, min: 0, max: 5 }, collarRoll: {mm: 2.5, min: 0, max: 5 },
waistReductionRatioBack: { pct: 15, min: 0, max: 25 }, waistReductionRatioBack: { pct: 15, min: 10, max: 25 },
waistReductionRatioFront: { pct: 15, min: 10, max: 20 }, waistReductionRatioFront: { pct: 15, min: 10, max: 25 },
hipsReductionRatioBack: { pct: 25, min: 20, max: 30 }, hipsReductionRatioBack: { pct: 25, min: 20, max: 30 },
hipsReductionRatioFront: { pct: 25, min: 20, max: 30 }, hipsReductionRatioFront: { pct: 25, min: 20, max: 30 },
frontDartPlacement: { pct: 55, min: 45, max: 60 }, frontDartPlacement: { pct: 55, min: 45, max: 60 },
sideFrontPlacement: { pct: 90, min: 80, max: 100 }, sideFrontPlacement: { pct: 85, min: 80, max: 90 },
chestShaping: { pct: 30, min: 0, max: 100 }, chestShaping: { pct: 30, min: 0, max: 100 },
rollLineCollarHeight: { pct: 6, min: 5, max: 9 }, rollLineCollarHeight: { pct: 6, min: 5, max: 9 },
shoulderSlopeReduction: { pct: 2, min: 0, max: 5 }, shoulderSlopeReduction: { pct: 2, min: 0, max: 5 },
lapelBreak: { pct: 10, min: 0, max: 25 },
buttonLength: { pct: 30, min: 30, max: 60 }, buttonLength: { pct: 30, min: 30, max: 60 },
buttons: { count: 2, min: 1, max: 3 },
} }
}; };

View file

@ -58,7 +58,7 @@
pattern.use(freesewing.plugins.designer); pattern.use(freesewing.plugins.designer);
pattern.use(freesewing.plugins.validate); pattern.use(freesewing.plugins.validate);
//pattern.draft(); //pattern.draft();
pattern.sampleOption("waistEase"); pattern.sampleOption("buttonLength");
document.getElementById("svg1").innerHTML = pattern.render(); document.getElementById("svg1").innerHTML = pattern.render();
function pointHover(evt) { function pointHover(evt) {

View file

@ -87,9 +87,10 @@ export default function(part) {
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch) .curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder) .curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
.line(points.neck) .line(points.neck)
.curve_(points.neckCp2, points.cbNeck) .curve_(points.neckCp2, points.cbNeck);
._curve(points.cbChestCp1, points.cbChest) if (options.centerBackDart > 0) paths.saBase = paths.saBase._curve(points.cbChestCp1, points.cbChest);
.curve(points.cbChestCp2, points.cbWaistCp1, points.cbWaist) else paths.saBase = paths.saBase.line(points.cbChest);
paths.saBase = paths.saBase.curve(points.cbChestCp2, points.cbWaistCp1, points.cbWaist);
if (options.backVent === 1) { if (options.backVent === 1) {
paths.saBase = paths.saBase paths.saBase = paths.saBase
.join( .join(

View file

@ -74,7 +74,7 @@ export default function(part) {
// Lapel break point and cutaway point // Lapel break point and cutaway point
points.lapelBreakPoint = new Point( points.lapelBreakPoint = new Point(
points.hemEdge.x, points.hemEdge.x,
points.dartTop.y * (1 + options.lapelBreak) points.dartTop.y * (1 + options.lapelStart)
); );
points.cutawayPoint = points.lapelBreakPoint.shift( points.cutawayPoint = points.lapelBreakPoint.shift(
-90, -90,
@ -346,6 +346,13 @@ export default function(part) {
.close() .close()
.attr("class", "fabric"); .attr("class", "fabric");
paths.frontPocket = new Path()
.move(points.frontPocketTopEnd)
.line(points.frontPocketTopLeft)
.line(points.frontPocketBottomLeft)
.line(points.frontPocketBottomEnd)
.attr("class", "help");
if (complete) { if (complete) {
if (sa) { if (sa) {

View file

@ -131,13 +131,18 @@ export default function(part) {
store.set("pocketWidth", width); store.set("pocketWidth", width);
store.set("pocketDepth", depth); store.set("pocketDepth", depth);
paths.frontPocket = new Path() points.frontPocketTopEnd = utils.curveIntersectsY(
.move(points.frontPocketTopRight) points.waist,
.line(points.frontPocketTopLeft) points.waistCp1,
.line(points.frontPocketBottomLeft) points.hipsCp2,
.line(points.frontPocketBottomRight) points.hips,
.line(points.frontPocketTopRight) points.frontPocketTopLeft.y
.close() );
points.frontPocketBottomEnd = utils.beamIntersectsY(
points.hips,
points.hem,
points.frontPocketBottomLeft.y
);
paths.dart = new Path() paths.dart = new Path()
.move(points.dartRight) .move(points.dartRight)

View file

@ -4,8 +4,6 @@
export const calculateRatios = part => { export const calculateRatios = part => {
let { store, measurements, options } = part.shorthand(); let { store, measurements, options } = part.shorthand();
if (store.get("ratiosCalculated")) return true;
// Make sure collar height makes sense // Make sure collar height makes sense
if (options.collarHeight * 2 < options.rollLineCollarHeight) options.rollLineCollarHeight = options.collarHeight * 2; if (options.collarHeight * 2 < options.rollLineCollarHeight) options.rollLineCollarHeight = options.collarHeight * 2;
@ -25,8 +23,6 @@ export const calculateRatios = part => {
store.set("hipsReductionFront", store.get("hipsReduction") * options.hipsReductionRatioFront); store.set("hipsReductionFront", store.get("hipsReduction") * options.hipsReductionRatioFront);
store.set("hipsReductionSide", store.get("hipsReduction") * (1 - options.hipsReductionRatioFront - options.hipsReductionRatioBack)); store.set("hipsReductionSide", store.get("hipsReduction") * (1 - options.hipsReductionRatioFront - options.hipsReductionRatioBack));
store.set("ratiosCalculated", true);
// FIXME: Still needed? // FIXME: Still needed?
// Prevent chest shaping from being 0, because that will get read as 360 degrees // Prevent chest shaping from being 0, because that will get read as 360 degrees
// if($this->o('chestShaping') == 0) $this->setOptionIfUnset('chestShaping', 0.0001); // if($this->o('chestShaping') == 0) $this->setOptionIfUnset('chestShaping', 0.0001);