editor › Globals › NestingGenerator
Class: NestingGenerator
A method object that can realize a ModelHierarchy into actual nestings. If parameters change, create a new NestingGenerator instead of re-computing.
The NestingGenerator acts essentially as a pipeline, calling different steps and piping the data from one to the next.
Hierarchy
- NestingGenerator
Index
Constructors
Properties
Methods
Constructors
constructor
+ new NestingGenerator(hierarchy: ModelHierarchy, rasterizedOutlineMap: Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles››): NestingGenerator
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:99
Parameters:
| Name | Type |
|---|---|
hierarchy |
ModelHierarchy |
rasterizedOutlineMap |
Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles›› |
Returns: NestingGenerator
Properties
Private Readonly hierarchy
• hierarchy: ModelHierarchy
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:96
Private nestings
• nestings: Nesting[] = null
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:99
Private Readonly rasterizedOutlineMap
• rasterizedOutlineMap: Map‹PlateGroup, Map‹Plate, RasterizedOutlineWithHoles››
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:97
Methods
compute
▸ compute(): Promise‹Nesting[]›
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:109
Static addLabelsToSubassembly
▸ addLabelsToSubassembly(nestedSubassemblies: Nesting[], subassemblies: Plate[][], plateGraph: PlateGraph, facade: PlateGroupGraphFacade, symbolPrefix: string, startingNumber: number): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/Roadkill/NestingGenerator.ts:31
This method will add a numeric symbol between each of the subassemblies given as parameter. It assumes, that the subassemblies are all connected. That is, the inter-subassembly connection graph has only one connected component.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
nestedSubassemblies |
Nesting[] | - | - |
subassemblies |
Plate[][] | - | are a bunch of Plates forming multiple subassemblies |
plateGraph |
PlateGraph | - | - |
facade |
PlateGroupGraphFacade | - | - |
symbolPrefix |
string | "T" | will be added in front of the number to the symbols to distinguish the symbols |
startingNumber |
number | 1 | could be used to start counting at a higher number |
Returns: void