mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 10:25:36 +01:00
fix circle auto detection from NURBS
This commit is contained in:
parent
b2ddee5aef
commit
4883b44895
1 changed files with 2 additions and 14 deletions
|
|
@ -35,22 +35,10 @@ export function getSketchBoundaries(sceneFace) {
|
|||
|
||||
let orient = mA[0] * mmA[1] - mA[1] * mmA[0];
|
||||
|
||||
if (orient < 0) {
|
||||
let t;
|
||||
|
||||
t = B;
|
||||
B = A;
|
||||
A = t;
|
||||
|
||||
t = DB;
|
||||
DB = DA;
|
||||
DA = t;
|
||||
|
||||
mA = vec.normalize(DA);
|
||||
}
|
||||
let k = orient < 0 ? -1 : 1;
|
||||
|
||||
if (veqXYZ(A[0], A[1], 0, B[0], B[1], 0)) {
|
||||
let centripetal = perpXY(vec.mul(mA, arcRadius));
|
||||
let centripetal = perpXY(vec.mul(mA, k * arcRadius));
|
||||
let c = vec._add(centripetal, A);
|
||||
boundary.circles.push({
|
||||
id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue