mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
solve system on changing ellipse radius
This commit is contained in:
parent
1b2c2d65df
commit
f3409df80c
1 changed files with 10 additions and 1 deletions
|
|
@ -75,9 +75,18 @@ export class EllipseTool extends Tool {
|
|||
const v = new Vector(this.ellipse.ep2.x - p.x, this.ellipse.ep2.y - p.y);
|
||||
minorRadius = Math.abs(projAxis.dot(v));
|
||||
}
|
||||
this.ellipse.r.value = minorRadius;
|
||||
this.ellipse.r.set(minorRadius);
|
||||
if (!Tool.dumbMode(e)) {
|
||||
this.solveRequest(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
this.viewer.refresh();
|
||||
}
|
||||
|
||||
solveRequest(rough) {
|
||||
this.solver = this.viewer.parametricManager.prepare([this.ellipse.r]);
|
||||
this.solver.solve(rough, 1);
|
||||
this.solver.sync();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue