editor › Globals › ModelHierarchyGenerator
Class: ModelHierarchyGenerator
Hierarchy
- ModelHierarchyGenerator
Index
Constructors
Properties
Methods
- _addEachToHierarchy
- _chooseBasePlateGroupsForFrom
- _continueDisassembling
- _filterOutCompletelyRemovableComponents
- _getRankedBasePlateCandidates
- _isRoundingRemovable
- _plateGraphFor
- _removableSingleGroupsFromWith
- _removeFromComponent
- _step
- _stepNewBase
- compute
Constructors
constructor
+ new ModelHierarchyGenerator(model: Iterable‹PlateGroup›): ModelHierarchyGenerator
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:17
Parameters:
| Name | Type |
|---|---|
model |
Iterable‹PlateGroup› |
Returns: ModelHierarchyGenerator
Properties
Private facade
• facade: PlateGroupGraphFacade
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:17
Private Readonly model
• model: Set‹PlateGroup›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:15
Private modelHierarchy
• modelHierarchy: ModelHierarchy = null
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:16
Methods
Private _addEachToHierarchy
▸ _addEachToHierarchy(plateGroups: Iterable‹PlateGroup›, lastNode: ModelHierarchy, areGroupsAdjacent: boolean): Map‹PlateGroup, ModelHierarchy›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:393
Parameters:
| Name | Type | Default |
|---|---|---|
plateGroups |
Iterable‹PlateGroup› | - |
lastNode |
ModelHierarchy | - |
areGroupsAdjacent |
boolean | true |
Returns: Map‹PlateGroup, ModelHierarchy›
Private _chooseBasePlateGroupsForFrom
▸ _chooseBasePlateGroupsForFrom(components: Iterable‹Set‹PlateGroup››, candidates: Iterable‹PlateGroup›, returnNullIfNoneFound: boolean): Map‹Set‹PlateGroup›, PlateGroup› | null
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:218
Parameters:
| Name | Type | Default |
|---|---|---|
components |
Iterable‹Set‹PlateGroup›› | - |
candidates |
Iterable‹PlateGroup› | - |
returnNullIfNoneFound |
boolean | false |
Returns: Map‹Set‹PlateGroup›, PlateGroup› | null
Private _continueDisassembling
▸ _continueDisassembling(remainingSubmodel: Set‹PlateGroup›, lastNode: ModelHierarchy): Promise‹void›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:131
Tries to remove single PlateGroups and then split into separate components.
Parameters:
| Name | Type |
|---|---|
remainingSubmodel |
Set‹PlateGroup› |
lastNode |
ModelHierarchy |
Returns: Promise‹void›
Private _filterOutCompletelyRemovableComponents
▸ _filterOutCompletelyRemovableComponents(submodel: Set‹PlateGroup›, removableGroups: Iterable‹PlateGroup›): [Set‹PlateGroup›, Array‹Set‹PlateGroup››]
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:283
Parameters:
| Name | Type |
|---|---|
submodel |
Set‹PlateGroup› |
removableGroups |
Iterable‹PlateGroup› |
Returns: [Set‹PlateGroup›, Array‹Set‹PlateGroup››]
Private _getRankedBasePlateCandidates
▸ _getRankedBasePlateCandidates(component: Set‹PlateGroup›, candidates: Iterable‹Plate›): Plate[]
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:245
Parameters:
| Name | Type |
|---|---|
component |
Set‹PlateGroup› |
candidates |
Iterable‹Plate› |
Returns: Plate[]
Private _isRoundingRemovable
▸ _isRoundingRemovable(plateGroup: PlateGroup, plateGroupsInModel: Iterable‹PlateGroup›): Promise‹boolean›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:350
Parameters:
| Name | Type |
|---|---|
plateGroup |
PlateGroup |
plateGroupsInModel |
Iterable‹PlateGroup› |
Returns: Promise‹boolean›
Private _plateGraphFor
▸ _plateGraphFor(component: Iterable‹PlateGroup›): PlateGraph
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:418
Parameters:
| Name | Type |
|---|---|
component |
Iterable‹PlateGroup› |
Returns: PlateGraph
Private _removableSingleGroupsFromWith
▸ _removableSingleGroupsFromWith(component: Set‹PlateGroup›, lastBasePlateGroup?: PlateGroup, allowTilting: boolean, includeBasePlateInModel: boolean, allowIncrementalRoundingRemoval: boolean): Promise‹PlateGroup[]›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:307
Parameters:
| Name | Type | Default |
|---|---|---|
component |
Set‹PlateGroup› | - |
lastBasePlateGroup? |
PlateGroup | - |
allowTilting |
boolean | false |
includeBasePlateInModel |
boolean | false |
allowIncrementalRoundingRemoval |
boolean | false |
Returns: Promise‹PlateGroup[]›
Private _removeFromComponent
▸ _removeFromComponent(plateGroups: PlateGroup | Iterable‹PlateGroup›, component: Set‹PlateGroup›): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:408
Parameters:
| Name | Type |
|---|---|
plateGroups |
PlateGroup | Iterable‹PlateGroup› |
component |
Set‹PlateGroup› |
Returns: void
Private _step
▸ _step(remainingSubmodel: Set‹PlateGroup›, lastNode: ModelHierarchy): Promise‹void›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:101
Will either directly split into components, or try to disassemble.
Parameters:
| Name | Type | Description |
|---|---|---|
remainingSubmodel |
Set‹PlateGroup› | are the remaining plateGroups, without the base plate |
lastNode |
ModelHierarchy | is the hierarchy node of the parent |
Returns: Promise‹void›
Private _stepNewBase
▸ _stepNewBase(remainingSubmodel: Set‹PlateGroup›, lastNode: ModelHierarchy): Promise‹void›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:50
Will pick a base plate for the submodel that is connected to the base of the parent. Otherwise, the submodel is treated as completely detached from parent.
Parameters:
| Name | Type | Description |
|---|---|---|
remainingSubmodel |
Set‹PlateGroup› | are the remaining plateGroups, without the base plate |
lastNode |
ModelHierarchy | is the hierarchy node of the parentlastNode |
Returns: Promise‹void›
compute
▸ compute(): Promise‹ModelHierarchy›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/ModelHierarchyGenerator.ts:24
Returns: Promise‹ModelHierarchy›