From 7b01e228ff78fa5250811ab7244b6ce0e9ae6ec1 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Wed, 28 Nov 2018 20:23:00 -0800 Subject: [PATCH] fix nurbs to circle reconciliation for boundaries --- web/app/cad/sketch/sketchBoundaries.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/cad/sketch/sketchBoundaries.js b/web/app/cad/sketch/sketchBoundaries.js index aee14014..9b45c517 100644 --- a/web/app/cad/sketch/sketchBoundaries.js +++ b/web/app/cad/sketch/sketchBoundaries.js @@ -26,7 +26,8 @@ export function getSketchBoundaries(sceneFace) { let mA = vec.normalize(DA); if (veqXYZ(A[0], A[1], 0, B[0], B[1], 0)) { - let c = vec.mul(mA, arcRadius); + let centripetal = perpXY(vec.mul(mA, arcRadius)); + let c = vec._add(centripetal, A); boundary.circles.push({ c: {x: c[0], y: c[1]}, r: arcRadius @@ -231,4 +232,5 @@ function perpXY(v) { v[0] = - y; v[1] = x; + return v; } \ No newline at end of file