1
0
Fork 0

sparkles: Updated debug format to latest changes

This commit is contained in:
Joost De Cock 2018-12-21 19:00:52 +01:00
parent cb9216c737
commit c88ad243ab
3 changed files with 37 additions and 20 deletions

View file

@ -145,13 +145,19 @@ export default part => {
} while (Math.abs(delta) > 1 && options.brianFitCollar && run < 10);
delete paths.neckOpening;
if (options.brianFitCollar) {
debug(
{ style: "success", label: "🏁 Collar fitted" },
// prettier-ignore
`Target was ${units(target)}, delta of ${units(delta)} reached in ${run} attempts.`
);
debug({
style: "success",
label: "🏁 Collar fitted",
msg: `Target was ${units(target)}, delta of ${units(
delta
)} reached in ${run} attempts.`
});
} else
debug({ style: "warning", label: "🚫 Not fitting collar" }, "(in Brian)");
debug({
style: "warning",
label: "🚫 Not fittingcollar",
msg: "(in Brian)"
});
// Anchor point for sampling
points.gridAnchor = points.cbHem;

View file

@ -6,11 +6,16 @@ export default part => {
// Wrist
let top = paths.sleevecap.bbox().topLeft.y;
debug({ style: "info", label: "🗸 Sleevecap height" }, units(Math.abs(top)));
debug(
{ style: "info", label: "🗸 Sleevecap width" },
units(points.bicepsRight.x * 2)
);
debug({
style: "info",
label: "🗸 Sleevecap height",
msg: units(Math.abs(top))
});
debug({
style: "info",
label: "🗸 Sleevecap width",
msg: units(points.bicepsRight.x * 2)
});
points.centerWrist = new Point(
0,
top + measurements.shoulderToWrist * (1 + options.sleeveLengthBonus)

View file

@ -137,7 +137,11 @@ function draftSleevecap(part, run) {
let sleevecapEase = armholeLength * options.sleevecapEase;
store.set("sleevecapEase", sleevecapEase);
store.set("sleevecapTarget", armholeLength + sleevecapEase);
debug({ style: "info", label: "🗸 Sleevecap ease" }, units(sleevecapEase));
debug({
style: "info",
label: "🗸 Sleevecap ease",
msg: units(sleevecapEase)
});
// Uncomment this line to see all sleevecap iterations
//paths[run] = paths.sleevecap;
@ -162,17 +166,19 @@ export default part => {
Math.abs(sleevecapDelta(store)) > 2
);
if (options.brianFitSleeve) {
debug(
{ style: "success", label: "🏁 Sleevecap fitted" },
`Target was ${units(store.get("sleevecapTarget"))}, delta of ${units(
debug({
style: "success",
label: "🏁 Sleevecap fitted",
msg: `Target was ${units(store.get("sleevecapTarget"))}, delta of ${units(
delta
)} reached in ${run} attempts.`
);
});
} else
debug(
{ style: "warning", label: "🚫 Not fitting sleevecap" },
"(in Brian)"
);
debug({
style: "warning",
label: "🚫 Not fittingsleevecap",
msg: "(in Brian)"
});
// Paths
paths.sleevecap.attr("class", "fabric");