Skip to content

Documentation / @geoverse/editor-libre / CloseHoleCommand

Class: CloseHoleCommand ​

Defined in: editor-core/dist/commands/closeHole.d.ts:8

面消洞(一键,1→1,仅 modified):把面外边界的**所有凹湾(缺口)**自动封回内环洞—— 与 FillHoleCommand(去掉所有内环)对称,是 OpenHoleCommand 的逆向能力。 无需交互(用凸包自动定凹湾);外边界为凸(无凹湾)时报 CLOSE_HOLE_NO_BAY。目标须为单面 Polygon。

Implements ​

  • Command

Constructors ​

Constructor ​

ts
new CloseHoleCommand(id, opts?): CloseHoleCommand;

Defined in: editor-core/dist/commands/closeHole.d.ts:13

Parameters ​

id ​

string

opts? ​

HoleBridgeOptions

Returns ​

CloseHoleCommand

Properties ​

appliesTo ​

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of ​

ts
Command.appliesTo

label ​

ts
readonly label: "面消洞" = "\u9762\u6D88\u6D1E";

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

Implementation of ​

ts
Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

Defined in: editor-core/dist/commands/closeHole.d.ts:14

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

ts
Command.plan