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
- edgeToSubassemblies
- facade
- hierarchyToReceivingGroup
- nestingHierarchyWithArrows
- rootNode
- subassemblyToChildren
- subassemblyToHierarchy
- unfoldingToArrowEdges
- unfoldingToHierarchy
Methods
- _createNestingsFromHierarchy
- _createNode
- _findArrowEdgesAndFillMaps
- _findSubassembliesAndFillMaps
- _getAllNeededChildren
- _getUnfoldingToHierarchyMap
- _recreateNestingHierarchy
- _step
- compute
Constructors
constructor
+ new ArrowStep(root: NestingHierarchy‹Unfolding›): ArrowStep
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:35
Parameters:
| Name | Type |
|---|---|
root |
NestingHierarchy‹Unfolding› |
Returns: ArrowStep
Properties
Private edgeToSubassemblies
• edgeToSubassemblies: Map‹EdgeJoint‹›, object› = new Map<
EdgeJoint,
{ parent: 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‹NestingHierarchy‹Unfolding‹››, PlateGroup‹›› = new Map
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:26
Private nestingHierarchyWithArrows
• nestingHierarchyWithArrows: NestingHierarchy‹Nesting› = null
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:35
Private Readonly rootNode
• rootNode: NestingHierarchy‹Unfolding›
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‹›[], NestingHierarchy‹Unfolding‹››› = 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, NestingHierarchy‹Unfolding››
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:27
Methods
Private _createNestingsFromHierarchy
▸ _createNestingsFromHierarchy(unfoldingToArrowEdges: Map‹Unfolding, EdgeJoint[]›, hierachy: NestingHierarchy‹Unfolding›): 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 |
NestingHierarchy‹Unfolding› | - |
Returns: Promise‹[Nesting[], EdgeJoint[]]›
Private _createNode
▸ _createNode(oldNode: NestingHierarchy‹Unfolding›, newChildren: Array‹[NestingHierarchy‹Nesting›, PlateGroup]›, nesting: Nesting): NestingHierarchy‹Nesting›
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 |
NestingHierarchy‹Unfolding› | only used to salvage the ModelHierarchy node that the NestingHierarchy node is bound to |
newChildren |
Array‹[NestingHierarchy‹Nesting›, 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: NestingHierarchy‹Nesting›
Private _findArrowEdgesAndFillMaps
▸ _findArrowEdgesAndFillMaps(node: NestingHierarchy‹Unfolding›): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:260
Parameters:
| Name | Type |
|---|---|
node |
NestingHierarchy‹Unfolding› |
Returns: void
Private _findSubassembliesAndFillMaps
▸ _findSubassembliesAndFillMaps(node: NestingHierarchy‹Unfolding›, parentSubassembly: Unfolding[], addToParent: boolean): Unfolding[]
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:297
Parameters:
| Name | Type |
|---|---|
node |
NestingHierarchy‹Unfolding› |
parentSubassembly |
Unfolding[] |
addToParent |
boolean |
Returns: Unfolding[]
Private _getAllNeededChildren
▸ _getAllNeededChildren(node: NestingHierarchy‹Unfolding›, separateChildTrees: Set‹NestingHierarchy‹Unfolding››, completedChildTrees: Map‹NestingHierarchy‹Unfolding›, [NestingHierarchy‹Nesting›, PlateGroup]›, hierarchyToNesting: Map‹NestingHierarchy‹Unfolding›, Nesting›): Array‹[NestingHierarchy‹Nesting›, 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 |
NestingHierarchy‹Unfolding› |
separateChildTrees |
Set‹NestingHierarchy‹Unfolding›› |
completedChildTrees |
Map‹NestingHierarchy‹Unfolding›, [NestingHierarchy‹Nesting›, PlateGroup]› |
hierarchyToNesting |
Map‹NestingHierarchy‹Unfolding›, Nesting› |
Returns: Array‹[NestingHierarchy‹Nesting›, PlateGroup]›
Private _getUnfoldingToHierarchyMap
▸ _getUnfoldingToHierarchyMap(node: NestingHierarchy‹Unfolding›, map?: Map‹Unfolding, NestingHierarchy‹Unfolding››): Map‹Unfolding, NestingHierarchy‹Unfolding››
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:243
Parameters:
| Name | Type |
|---|---|
node |
NestingHierarchy‹Unfolding› |
map? |
Map‹Unfolding, NestingHierarchy‹Unfolding›› |
Returns: Map‹Unfolding, NestingHierarchy‹Unfolding››
Private _recreateNestingHierarchy
▸ _recreateNestingHierarchy(hierarchy: NestingHierarchy‹Unfolding›, completedChildren: Array‹[NestingHierarchy‹Unfolding›, [NestingHierarchy‹Nesting›, PlateGroup]]›, nestings: Nesting[], subassembly: Iterable‹Unfolding›, unresolvedEdges: EdgeJoint[]): NestingHierarchy‹Nesting›
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 |
NestingHierarchy‹Unfolding› | the existing, original NestingHierarchy |
completedChildren |
Array‹[NestingHierarchy‹Unfolding›, [NestingHierarchy‹Nesting›, 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: NestingHierarchy‹Nesting›
Private _step
▸ _step(subassembly: Unfolding[], originalHierarchy: NestingHierarchy‹Unfolding›, receivingPlateGroup: PlateGroup): Promise‹[NestingHierarchy‹Nesting›, 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 |
NestingHierarchy‹Unfolding› | - | the nesting hierarchy that was solved for adjacency |
receivingPlateGroup |
PlateGroup | null | the immediate parent of the root node of the subassembly |
Returns: Promise‹[NestingHierarchy‹Nesting›, PlateGroup]›
compute
▸ compute(): Promise‹NestingHierarchy‹Nesting››
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ArrowStep.ts:42
Returns: Promise‹NestingHierarchy‹Nesting››