From 5247851584b98654ae249318990942335ef78852 Mon Sep 17 00:00:00 2001 From: whatwareweb <59752545+whatwareweb@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:38:34 -0500 Subject: [PATCH] Update toolkit.js remove extra whitespace --- src/drawingToolkit/toolkit.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/drawingToolkit/toolkit.js b/src/drawingToolkit/toolkit.js index 0056f8754..30eb3dc14 100644 --- a/src/drawingToolkit/toolkit.js +++ b/src/drawingToolkit/toolkit.js @@ -65,34 +65,34 @@ export const toolkit = { if (boundary === "closed" && points.length > 3) { points.pop(); }; - + var curve = nurbs({ points, degree, boundary }); - + const pl = []; const domain = curve.domain[0]; const range = domain[1] - domain[0]; const stepSize = range/steps; - + let i = domain[0]; while (i <= domain[1]) { - + const pt = curve.evaluate([], i); pl.push(pt); - + i += stepSize; } - + if (i !== domain[1]) { const pt = curve.evaluate([], domain[1]); pl.push(pt); } - + return pl; - + function isClosed(polyline, epsilon = 1e-3) { let start = polyline[0] let end = polyline[polyline.length - 1] @@ -124,12 +124,12 @@ export const toolkit = { polylines.forEach(pl => { const newPl = simplifyPolyline(pl, tolerance, hq) while (pl.length > 0) pl.pop() - + while (newPl.length > 0) { pl.push(newPl.shift()) } }) - + return polylines; }, trim: trimPolylines, @@ -221,13 +221,13 @@ export const toolkit = { const [first, ...rest] = arguments; if (!first) return []; if (!rest) return first; - + rest.forEach(pls => { pls.forEach(pl => { first.push(pl); }) }); - + return first; }, copy(obj) {