From cb6bd247e4ea5152a8b2bc6e79225d577ca56f26 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 11 Sep 2022 18:12:08 +0200 Subject: [PATCH] fix(cornelius): Raise is not log --- designs/cornelius/src/back.mjs | 8 ++++---- designs/cornelius/src/frontpoints.mjs | 6 +++--- designs/cornelius/src/legband.mjs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/designs/cornelius/src/back.mjs b/designs/cornelius/src/back.mjs index af320d5dd1c..d9b25bf177c 100644 --- a/designs/cornelius/src/back.mjs +++ b/designs/cornelius/src/back.mjs @@ -2,7 +2,7 @@ import { frontpoints } from './frontpoints.mjs' import { front } from './front.mjs' function rotateDistanceForP3(part, point, distance, center) { - let { options, Path, points, paths, store, raise } = part.shorthand() + let { options, Path, points, paths, store, log } = part.shorthand() let length = store.get('insideSeam') @@ -60,12 +60,12 @@ function rotateDistanceForP3(part, point, distance, center) { } while ((dOffset > 0.1 || dOffset < -0.1 || dLength < -0.1 || dLength > 0.1) && iteration < 100) if (iteration >= 100) { - raise.error('Could not find a point for "3" within 100 iterations') + log.error('Could not find a point for "3" within 100 iterations') } } function rotateDistanceForP4(part, point, distance, center, origin) { - let { options, Path, points, paths, store, raise } = part.shorthand() + let { options, Path, points, paths, store, log } = part.shorthand() let aCPu, aCPj, @@ -171,7 +171,7 @@ function rotateDistanceForP4(part, point, distance, center, origin) { } while ((dOffset > 0.1 || dOffset < -0.1 || dLength > 0.1 || dLength < -0.1) && iteration < 100) if (iteration >= 100) { - raise.error('Could not find a point for "4" within 100 iterations') + log.error('Could not find a point for "4" within 100 iterations') } } diff --git a/designs/cornelius/src/frontpoints.mjs b/designs/cornelius/src/frontpoints.mjs index ed483fe220e..b1979fd2323 100644 --- a/designs/cornelius/src/frontpoints.mjs +++ b/designs/cornelius/src/frontpoints.mjs @@ -6,7 +6,7 @@ function draftCorneliusFrontpoints({ points, paths, store, - raise, + log, part, }) { let halfInch = measurements.waistToKnee / 48 @@ -48,14 +48,14 @@ function draftCorneliusFrontpoints({ if (null != tPoints && tPoints.length > 0) { points.pS = tPoints[0].clone() } else { - raise.error('Something is not quite right here!') + log.error('Something is not quite right here!') } tPath = new Path().move(points.pG).line(points.pX) tPoints = tPath.intersectsY(points.pT.y) if (null != tPoints && tPoints.length > 0) { points.pZ = tPoints[0].clone() } else { - raise.error('Could not find an intersection to create the crotch point Z') + log.error('Could not find an intersection to create the crotch point Z') } points.pP = points.pE.shift(180, seat / 3) diff --git a/designs/cornelius/src/legband.mjs b/designs/cornelius/src/legband.mjs index e27f6cd3d9d..6c8999a5d2d 100644 --- a/designs/cornelius/src/legband.mjs +++ b/designs/cornelius/src/legband.mjs @@ -2,7 +2,7 @@ import { front } from './front.mjs' import { back } from './back.mjs' function findR(part, height, arcLength) { - let { raise } = part.shorthand() + let { log } = part.shorthand() let iter = 0 let a = 0.5 @@ -19,7 +19,7 @@ function findR(part, height, arcLength) { //console.log( {iter, diff, a} ); } while ((diff < -1 || diff > 1) && iter < 50) if (iter >= 500) { - raise.error('Could not find the radius for the legband within 500 iterations') + log.error('Could not find the radius for the legband within 500 iterations') } return a * (180 / Math.PI)