Skip to content

editorGlobalsArrowStep

Class: ArrowStep

A method object used to resolve possible arrow connections in a NestingHierarchy or replace them with possible numeric symbol connections (degrade).

Hierarchy

  • ArrowStep

Index

Constructors

Properties

Methods

Constructors

constructor

+ new ArrowStep(root: NestingHierarchyUnfolding›): ArrowStep

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:35

Parameters:

Name Type
root NestingHierarchyUnfolding

Returns: ArrowStep

Properties

Private edgeToSubassemblies

edgeToSubassemblies: Map‹EdgeJoint‹›, object› = new Map< EdgeJoint, { parent: NestingHierarchy; child: NestingHierarchy }

()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:29


Private Readonly facade

facade: PlateGroupGraphFacade

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


Private hierarchyToReceivingGroup

hierarchyToReceivingGroup: Map‹NestingHierarchyUnfolding‹››, PlateGroup‹›› = new Map, PlateGroup>()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:26


Private nestingHierarchyWithArrows

nestingHierarchyWithArrows: NestingHierarchyNesting = null

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:35


Private Readonly rootNode

rootNode: NestingHierarchyUnfolding

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


Private subassemblyToChildren

subassemblyToChildren: Map‹Unfolding‹›[], Unfolding‹›[][]› = new Map()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:24


Private subassemblyToHierarchy

subassemblyToHierarchy: Map‹Unfolding‹›[], NestingHierarchyUnfolding‹››› = new Map>()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:25


Private unfoldingToArrowEdges

unfoldingToArrowEdges: Map‹Unfolding‹›, EdgeJoint‹›[]› = new Map()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:28


Private unfoldingToHierarchy

unfoldingToHierarchy: Map‹Unfolding, NestingHierarchyUnfolding››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:27

Methods

Private _createNestingsFromHierarchy

_createNestingsFromHierarchy(unfoldingToArrowEdges: Map‹Unfolding, EdgeJoint[]›, hierachy: NestingHierarchyUnfolding›): Promise‹[Nesting[], EdgeJoint[]]›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:68

Will be called in such a way, that the Unfoldings in the map form a strongly connected graph (i.e. subassembly) through the EdgeJoints. The result should be all Nestings (ideally 1, worst case all Unfoldings) and every EdgeJoint that could not be resolved.

Parameters:

Name Type Description
unfoldingToArrowEdges Map‹Unfolding, EdgeJoint[]› are the edges where arrows are needed. There should be (num of Unfoldings - 1) distinct edges, but each edge appears twice.
hierachy NestingHierarchyUnfolding -

Returns: Promise‹[Nesting[], EdgeJoint[]]›


Private _createNode

_createNode(oldNode: NestingHierarchyUnfolding›, newChildren: Array‹[NestingHierarchyNesting›, PlateGroup]›, nesting: Nesting): NestingHierarchyNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:229

Will create a new NestingHierarchy node that is representing the same subtree that oldNode represented previously.

Parameters:

Name Type Description
oldNode NestingHierarchyUnfolding only used to salvage the ModelHierarchy node that the NestingHierarchy node is bound to
newChildren Array‹[NestingHierarchyNesting›, PlateGroup]› are children nodes and the receiving group (i.e. used to connect the child nesting to the parent nesting)
nesting Nesting the nesting of the new node

Returns: NestingHierarchyNesting


Private _findArrowEdgesAndFillMaps

_findArrowEdgesAndFillMaps(node: NestingHierarchyUnfolding›): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:260

Parameters:

Name Type
node NestingHierarchyUnfolding

Returns: void


Private _findSubassembliesAndFillMaps

_findSubassembliesAndFillMaps(node: NestingHierarchyUnfolding›, parentSubassembly: Unfolding[], addToParent: boolean): Unfolding[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:297

Parameters:

Name Type
node NestingHierarchyUnfolding
parentSubassembly Unfolding[]
addToParent boolean

Returns: Unfolding[]


Private _getAllNeededChildren

_getAllNeededChildren(node: NestingHierarchyUnfolding›, separateChildTrees: SetNestingHierarchyUnfolding››, completedChildTrees: Map‹NestingHierarchyUnfolding›, [NestingHierarchyNesting›, PlateGroup]›, hierarchyToNesting: Map‹NestingHierarchyUnfolding›, Nesting›): Array‹[NestingHierarchyNesting›, PlateGroup]›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:190

Collects all immediate child trees needed to create a new version of the node. Will collect and create new nodes for separateChildTrees or just collect the completedChildTree Nodes.

Parameters:

Name Type
node NestingHierarchyUnfolding
separateChildTrees SetNestingHierarchyUnfolding››
completedChildTrees Map‹NestingHierarchyUnfolding›, [NestingHierarchyNesting›, PlateGroup]›
hierarchyToNesting Map‹NestingHierarchyUnfolding›, Nesting

Returns: Array‹[NestingHierarchyNesting›, PlateGroup]›


Private _getUnfoldingToHierarchyMap

_getUnfoldingToHierarchyMap(node: NestingHierarchyUnfolding›, map?: Map‹Unfolding, NestingHierarchyUnfolding››): Map‹Unfolding, NestingHierarchyUnfolding››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:243

Parameters:

Name Type
node NestingHierarchyUnfolding
map? Map‹Unfolding, NestingHierarchyUnfolding››

Returns: Map‹Unfolding, NestingHierarchyUnfolding››


Private _recreateNestingHierarchy

_recreateNestingHierarchy(hierarchy: NestingHierarchyUnfolding›, completedChildren: Array‹[NestingHierarchyUnfolding›, [NestingHierarchyNesting›, PlateGroup]]›, nestings: Nesting[], subassembly: Iterable‹Unfolding›, unresolvedEdges: EdgeJoint[]): NestingHierarchyNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:144

Takes an existing NestingHierarchy and (implicitly) edges that were used to merge nodes of that NestingHierarchy. It then forms a new nesting hierarchy that contains the merged nodes and is otherwise equal.

Parameters:

Name Type Description
hierarchy NestingHierarchyUnfolding the existing, original NestingHierarchy
completedChildren Array‹[NestingHierarchyUnfolding›, [NestingHierarchyNesting›, PlateGroup]]› mapping of the root NestingHierarchy node of each children to the complete reconstructed subtree
nestings Nesting[] the nestings that contain all PlateGroups of this subassembly
subassembly Iterable‹Unfolding the original Unfoldings (before merging) of the subassembly
unresolvedEdges EdgeJoint[] the edges that were not resolved, i.e. the inverse of the needed information 'resolved edges'

Returns: NestingHierarchyNesting


Private _step

_step(subassembly: Unfolding[], originalHierarchy: NestingHierarchyUnfolding›, receivingPlateGroup: PlateGroup): Promise‹[NestingHierarchyNesting›, PlateGroup]›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:101

Will solve this subassembly and create a new NestingHierarchy for both this subassembly and its children.

Parameters:

Name Type Default Description
subassembly Unfolding[] - are a group of Unfoldings, that were connected in the NestingHierarchy through possible arrows
originalHierarchy NestingHierarchyUnfolding - the nesting hierarchy that was solved for adjacency
receivingPlateGroup PlateGroup null the immediate parent of the root node of the subassembly

Returns: Promise‹[NestingHierarchyNesting›, PlateGroup]›


compute

compute(): PromiseNestingHierarchyNesting››

Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:42

Returns: PromiseNestingHierarchyNesting››