回归板件缩放的代码,对Scale命令进行限制,避免缩放比例为0

pull/246/MERGE
ChenX 6 years ago
parent fc89f1888f
commit 87884d2f68

@ -4,6 +4,7 @@ import { matrixScale } from "../Common/Matrix4Utils";
import { Command } from "../Editor/CommandMachine";
import { JigUtils } from "../Editor/JigUtils";
import { PromptStatus } from "../Editor/PromptResult";
import { equaln } from "../Geometry/GeUtils";
export class Command_Scale implements Command
{
@ -32,6 +33,7 @@ export class Command_Scale implements Command
Msg: "请输入缩放比例:",
Callback: (sc) =>
{
if (equaln(sc, 0)) return;
JigUtils.Restore();
let scMat = matrixScale(sc, ptRes.Point);
for (let en of jigEns)

@ -458,10 +458,10 @@ export class Board extends ExtureSolid
protected ApplyScaleMatrix(m: Matrix4): this
{
this.WriteAllObjectRecord();
// let cu = this.m_Shape.Outline.Curve;
// cu.ApplyMatrix(this.OCS);
// cu.ApplyMatrix(m);
// cu.ApplyMatrix(this.OCSInv);
let cu = this.ContourCurve;
cu.ApplyMatrix(this.OCS);
cu.ApplyMatrix(m);
cu.ApplyMatrix(this.OCSInv);
this.Update(UpdateDraw.Geometry);
return this;

Loading…
Cancel
Save