!3059 优化:双击多段线功能栏增加简化多段线

pull/3060/MERGE
林三 4 weeks ago committed by ChenX
parent bed18c4c75
commit f83e45e12a

@ -28,6 +28,12 @@ export class Command_SimplifyPolyline implements Command
if (ssRes.Status !== PromptStatus.OK) return; if (ssRes.Status !== PromptStatus.OK) return;
let pls = ssRes.SelectSet.SelectEntityList as Polyline[]; let pls = ssRes.SelectSet.SelectEntityList as Polyline[];
SimplifyPolyline(pls);
}
}
export function SimplifyPolyline(pls: Polyline[])
{
let count = 0; let count = 0;
for (let pl of pls) for (let pl of pls)
{ {
@ -43,5 +49,4 @@ export class Command_SimplifyPolyline implements Command
} }
Log(`成功简化了${count}条多段线!`); Log(`成功简化了${count}条多段线!`);
}
} }

@ -1,3 +1,4 @@
import { SimplifyPolyline } from "../../Add-on/testEntity/TestPolyline2PointsPolyline";
import { app } from "../../ApplicationServices/Application"; import { app } from "../../ApplicationServices/Application";
import { arraySortByNumber } from "../../Common/ArrayExt"; import { arraySortByNumber } from "../../Common/ArrayExt";
import { curveLinkGroup } from "../../Common/CurveUtils"; import { curveLinkGroup } from "../../Common/CurveUtils";
@ -30,7 +31,7 @@ export class DBClickPolyline extends Singleton
{ key: "J", msg: "合并" }, { key: "J", msg: "合并" },
{ key: "E", msg: "编辑顶点" }, { key: "E", msg: "编辑顶点" },
// { key: "F", msg: "拟合" }, // { key: "F", msg: "拟合" },
// { key: "S", msg: "样条曲线" }, { key: "S", msg: "简化多段线" },
{ key: "D", msg: "非曲线化" }, { key: "D", msg: "非曲线化" },
{ key: "R", msg: "反转" }, { key: "R", msg: "反转" },
{ key: "U", msg: "放弃" } { key: "U", msg: "放弃" }
@ -76,6 +77,9 @@ export class DBClickPolyline extends Singleton
execStatus = await this.EditorVertex(); execStatus = await this.EditorVertex();
JigUtils.Destroy(); JigUtils.Destroy();
break; break;
case "S": //简化多段线
SimplifyPolyline([pl]);
return;
case "D": //非曲线化 case "D": //非曲线化
this.TransfromNonCurve(); this.TransfromNonCurve();
break; break;

Loading…
Cancel
Save