Skip to content

editorGlobalsAdjacencyStep

Class: AdjacencyStep

Currently does two things: it takes model hierarchy and creates the first nesting hierarchy out of it, parsing the constraints to set child types accordingly. It also already tries to merge nodes together using adjacency, which is the main responsibility.

Hierarchy

  • AdjacencyStep

Index

Constructors

Properties

Methods

Constructors

constructor

+ new AdjacencyStep(root: ModelHierarchy, rasterizedOutlineMap: Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles››): AdjacencyStep

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:23

Parameters:

Name Type
root ModelHierarchy
rasterizedOutlineMap Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles››

Returns: AdjacencyStep

Properties

Private Readonly facade

facade: PlateGroupGraphFacade

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:21


Private nestingHierarchy

nestingHierarchy: NestingHierarchyUnfolding = null

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:23


Private Readonly rasterizedOutlineMap

rasterizedOutlineMap: Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:20


Private Readonly rootNode

rootNode: ModelHierarchy

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:19

Methods

Private _startNestingHierarchy

_startNestingHierarchy(startNode: ModelHierarchy): NestingHierarchyUnfolding

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:140

Creates a new NestingHierarchy node with an unfolding containing startNode's plateGroup.

Parameters:

Name Type Description
startNode ModelHierarchy will be the assigned root node of the NestingHierarchy

Returns: NestingHierarchyUnfolding


Private _step

_step(node: ModelHierarchy, hierarchy: NestingHierarchyUnfolding›, hasBeenMirrored?: any): Promise‹void›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:63

Continue expanding a NestingHierarchy for all children of node.

Parameters:

Name Type Description
node ModelHierarchy a ModelHierarchy that is supposed to already be part of the NestingHierarchy
hierarchy NestingHierarchyUnfolding an incomplete NestingHierarchy
hasBeenMirrored? any -

Returns: Promise‹void›


Private _stepNew

_stepNew(node: ModelHierarchy): PromiseNestingHierarchyUnfolding››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:45

Start a new NestingHierarchy beginning with the given node and try to resolve adjacency in the subtree.

Parameters:

Name Type Description
node ModelHierarchy -

Returns: PromiseNestingHierarchyUnfolding››


Private _tryAddingAdjacently

_tryAddingAdjacently(node: ModelHierarchy, parentHierarchy: NestingHierarchyUnfolding›): Promise‹boolean›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:154

Tries to add the plateGroup of the node to the Unfolding of the parentHierarchy. Returns true if successful, false if not.

Parameters:

Name Type Description
node ModelHierarchy should be added to the parentHierarchy
parentHierarchy NestingHierarchyUnfolding already contains the immediate parent of node

Returns: Promise‹boolean›


compute

compute(): PromiseNestingHierarchyUnfolding››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/AdjacencyStep.ts:31

Returns: PromiseNestingHierarchyUnfolding››