Skip to content

Documentation / @geoverse/editor-ol / OpenHoleCommand

Class: OpenHoleCommand

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

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

Implements

  • Command

Constructors

Constructor

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

Defined in: editor-core/dist/commands/openHole.d.ts:16

Parameters

id

string

cut

LineString

opts?

HoleBridgeOptions

Returns

OpenHoleCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: editor-core/dist/commands/openHole.d.ts:15

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

Implementation of

ts
Command.appliesTo

label

ts
readonly label: "面开洞" = "\u9762\u5F00\u6D1E";

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

Implementation of

ts
Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: editor-core/dist/commands/openHole.d.ts:17

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

ts
Command.plan