mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 01:13:27 +01:00
fix fillet
This commit is contained in:
parent
da18f09402
commit
d022e12e96
2 changed files with 3 additions and 3 deletions
|
|
@ -320,7 +320,7 @@ export const ConstraintDefinitions = {
|
|||
const a1 = segment1.params.ang.get();
|
||||
const a2 = segment2.params.ang.get();
|
||||
const ang = makeAngle0_360(a2 - a1);
|
||||
return Math.abs(180 - ang) > Math.min(Math.abs(360 - ang), Math.abs(0 - ang)) ? 0 : 180;
|
||||
return Math.abs(180 - ang) > Math.min(Math.abs(360 - ang), Math.abs(0 - ang)) ? 180 : 0;
|
||||
},
|
||||
transform: degree => degree * DEG_RAD
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ export class FilletTool extends Tool {
|
|||
const s1 = point1.parent;
|
||||
const s2 = point2.parent;
|
||||
|
||||
const inverted1 = Math.cos(s1.ang) * arc.c.x + Math.sin(s1.ang) * arc.c.y < s1.w;
|
||||
const inverted2 = Math.cos(s2.ang) * arc.c.x + Math.sin(s2.ang) * arc.c.y < s2.w;
|
||||
const inverted1 = s1.nx * arc.c.x + s1.ny * arc.c.y < s1.w;
|
||||
const inverted2 = s2.nx * arc.c.x + s2.ny * arc.c.y < s2.w;
|
||||
arc.stabilize(this.viewer);
|
||||
|
||||
pm.add(new AlgNumConstraint(ConstraintDefinitions.Fillet, [point1.parent, point2.parent, arc], {
|
||||
|
|
|
|||
Loading…
Reference in a new issue