Skip to content

Documentation / @geoverse/editor-core / OpenHoleCommand

Class: OpenHoleCommand ​

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

面开洞(1→1,仅 modified):一条切割线从外边界进入某个内环(洞), 把该洞经一条细通道连通到外边界,洞环并入外环成「凹湾」——面仍是 1 块、少一个内环。 「非分离切」,是 CloseHoleCommand 的逆操作。目标须为含洞的单面 Polygon。 与「面切分」的区别:切割线不贯穿到对侧外边界(贯穿会切成多块,属面切分)。

Implements ​

Constructors ​

Constructor ​

ts
new OpenHoleCommand(
   id, 
   cut, 
   opts?): OpenHoleCommand;

Defined in: packages/editor-core/src/commands/openHole.ts:23

Parameters ​

id ​

string

cut ​

LineString

opts? ​

HoleBridgeOptions

Returns ​

OpenHoleCommand

Properties ​

appliesTo ​

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: packages/editor-core/src/commands/openHole.ts:22

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

Implementation of ​

Command.appliesTo


label ​

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

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

Implementation of ​

Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/openHole.ts:29

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

Command.plan