Skip to content

editor › Globals › AdjacencyStep

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: NestingHierarchy‹Unfolding› = 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): NestingHierarchy‹Unfolding›

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: NestingHierarchy‹Unfolding›


Private _step

▸ _step(node: ModelHierarchy, hierarchy: NestingHierarchy‹Unfolding›, 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 NestingHierarchy‹Unfolding› an incomplete NestingHierarchy
hasBeenMirrored? any -

Returns: Promise‹void›


Private _stepNew

▸ _stepNew(node: ModelHierarchy): Promise‹NestingHierarchy‹Unfolding››

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: Promise‹NestingHierarchy‹Unfolding››


Private _tryAddingAdjacently

▸ _tryAddingAdjacently(node: ModelHierarchy, parentHierarchy: NestingHierarchy‹Unfolding›): 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 NestingHierarchy‹Unfolding› already contains the immediate parent of node

Returns: Promise‹boolean›


compute

▸ compute(): Promise‹NestingHierarchy‹Unfolding››

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

Returns: Promise‹NestingHierarchy‹Unfolding››