Skip to content

Documentation / @geoverse/editor-ol / DifferencePolygonsCommand

Class: DifferencePolygonsCommand ​

Defined in: editor-core/dist/commands/differencePolygons.d.ts:7

面差集(2→1,布尔 A−B):第一个选中的面减去第二个(JSTS difference)。 B 跨边界则在 A 上切出缺口、B 完全在内部则成洞、B 覆盖 A 则结果为空(抛错)。 A、B 均被移除,结果继承 A 的属性。

Implements ​

  • Command

Constructors ​

Constructor ​

ts
new DifferencePolygonsCommand(ids): DifferencePolygonsCommand;

Defined in: editor-core/dist/commands/differencePolygons.d.ts:11

Parameters ​

ids ​

string[]

Returns ​

DifferencePolygonsCommand

Properties ​

appliesTo ​

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: editor-core/dist/commands/differencePolygons.d.ts:10

适用的几何类型(声明式);命令在 plan() 开头用 assertApplicable 据此硬拦截。

Implementation of ​

ts
Command.appliesTo

label ​

ts
readonly label: "面差集" = "\u9762\u5DEE\u96C6";

Defined in: editor-core/dist/commands/differencePolygons.d.ts:9

Implementation of ​

ts
Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

Defined in: editor-core/dist/commands/differencePolygons.d.ts:12

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

ts
Command.plan