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

View file

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

View file

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