Skip to content

Documentation / @geoverse/editor-core / CloseHoleCommand

Class: CloseHoleCommand

Defined in: packages/editor-core/src/commands/closeHole.ts:18

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

Implements

Constructors

Constructor

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

Defined in: packages/editor-core/src/commands/closeHole.ts:21

Parameters

id

string

opts?

HoleBridgeOptions

Returns

CloseHoleCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: packages/editor-core/src/commands/closeHole.ts:20

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

Implementation of

Command.appliesTo


label

ts
readonly label: "面消洞" = '面消洞';

Defined in: packages/editor-core/src/commands/closeHole.ts:19

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/closeHole.ts:26

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan