diff --git a/src/Add-on/Align.ts b/src/Add-on/Align.ts index 10a68cd95..f1af5a677 100644 --- a/src/Add-on/Align.ts +++ b/src/Add-on/Align.ts @@ -59,14 +59,14 @@ export class Align implements Command { let p3 = ptRes.Point; - let po3 = await this.getPoint("选择第三个目标点"); + let po3 = await this.getPoint("选择第三个目标点", p3); if (!po3) return; JigUtils.Draw(new Line(p3, po3)); let v13 = p3.clone().sub(p1).applyMatrix4(roInv); let vo13 = po3.clone().sub(po1).applyMatrix4(roInv); - let d1 = v13.cross(v12).normalize(); + let d1 = v13.cross(v12).normalize().applyMatrix4(roMtx); let d2 = vo13.cross(vo12).normalize(); if (!equalv3(d1, d2)) { diff --git a/src/DatabaseServices/Entity/Extrude.ts b/src/DatabaseServices/Entity/Extrude.ts index 0d0d7dc17..0c992b7ea 100644 --- a/src/DatabaseServices/Entity/Extrude.ts +++ b/src/DatabaseServices/Entity/Extrude.ts @@ -163,6 +163,8 @@ export class ExtrudeSolid extends Entity //由于修改矩阵会导致矩阵错误 this.csg = undefined; + if (!equaln(m.getMaxScaleOnAxis(), 1)) + this.Update(UpdateDraw.Geometry); return this; } protected ApplyScaleMatrix(m: Matrix4): this @@ -173,7 +175,6 @@ export class ExtrudeSolid extends Entity cu.ApplyMatrix(m); cu.ApplyMatrix(this.OCSInv); this.CheckContourCurve(); - this.Update(UpdateDraw.Geometry); return this; } get Position(): Vector3