editor › Globals › SubassemblyInstruction
Class: SubassemblyInstruction
A subassembly instruction represents a subassembly, which is a connected part of the object that should be assembled in a row. When disassembling an objects, subassemblies can occur if the objects divides into multiple parts or if there is a part of an object that can be removed from the rest of the object by just pulling. A subassembly instruction contains multiple instructions that should be followed in the given order. These instruction can be other SubassemblyInstructions or PlateInstructions. If a SubassemblyInstruction has Plates in the neighbours member, it should be attached to them after it is assembled. SubassemblyInstructions don't always have to be attached to a parent assembly, but can also be the toplevel assembly.
Hierarchy
- SubassemblyInstruction
Implements
Index
Constructors
Properties
Methods
- addInstruction
- addInstructions
- assignIds
- assignPlateIds
- collapseInstructionSteps
- forEachPlate
- forEachSubassembly
- generateInstructions
- generateOrderedInstructionSteps
- getAllPlates
- getAssembly
- getCurrentConnectingPlates
- getGroupId
- getGroupIdByGroup
- getName
- getPenalty
- getPlateCount
- getPlateInstruction
- removePlate
- setName
- setStartNumber
Constructors
constructor
+ new SubassemblyInstruction(neighbours: Plate[]): SubassemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:32
Parameters:
| Name | Type | Default |
|---|---|---|
neighbours |
Plate[] | [] |
Returns: SubassemblyInstruction
Properties
instructions
• instructions: IAssemblyInstruction[] = []
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:23
isPart
• isPart: boolean = true
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:26
isStartingPoint
• isStartingPoint: boolean = false
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:27
Private name
• name: string
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:32
Private Readonly neighbours
• neighbours: Plate[]
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:31
rotation
• rotation: Quaternion
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:29
startingPointNumber
• startingPointNumber: number
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:28
valid
• valid: boolean = true
Implementation of IAssemblyInstruction.valid
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:25
Methods
addInstruction
▸ addInstruction(instruction: IAssemblyInstruction): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:78
Parameters:
| Name | Type |
|---|---|
instruction |
IAssemblyInstruction |
Returns: void
addInstructions
▸ addInstructions(instructions: IAssemblyInstruction[]): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:72
Parameters:
| Name | Type |
|---|---|
instructions |
IAssemblyInstruction[] |
Returns: void
assignIds
▸ assignIds(plateGroupMap: Map‹Plate, PlateGroup›): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:202
Parameters:
| Name | Type |
|---|---|
plateGroupMap |
Map‹Plate, PlateGroup› |
Returns: void
assignPlateIds
▸ assignPlateIds(startIndex: number): Map‹Plate, number›
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:46
Parameters:
| Name | Type | Default |
|---|---|---|
startIndex |
number | 0 |
Returns: Map‹Plate, number›
collapseInstructionSteps
▸ collapseInstructionSteps(steps: InstructionStep[]): InstructionStep[]
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:134
Omits steps that want to be skipped, and merges steps that can be merged. See shouldBeSkipped and shouldMerge for details.
Parameters:
| Name | Type | Description |
|---|---|---|
steps |
InstructionStep[] | unfiltered steps |
Returns: InstructionStep[]
forEachPlate
▸ forEachPlate(handler: function): Promise‹void›
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:86
Parameters:
▪ handler: function
▸ (plateInstruction: PlateInstruction): void
Parameters:
| Name | Type |
|---|---|
plateInstruction |
PlateInstruction |
Returns: Promise‹void›
forEachSubassembly
▸ forEachSubassembly(handler: function): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:92
Parameters:
▪ handler: function
▸ (subassemblyInstruction: SubassemblyInstruction): void
Parameters:
| Name | Type |
|---|---|
subassemblyInstruction |
SubassemblyInstruction |
Returns: void
generateInstructions
▸ generateInstructions(objectNumber: number, usedPlates: Plate[]): SubassemblyBookletStep[]
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:105
Parameters:
| Name | Type |
|---|---|
objectNumber |
number |
usedPlates |
Plate[] |
Returns: SubassemblyBookletStep[]
generateOrderedInstructionSteps
▸ generateOrderedInstructionSteps(steps: Array‹object›): InstructionStep
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:154
iterate all the instruction steps implied by this object and its children
Parameters:
| Name | Type |
|---|---|
steps |
Array‹object› |
Returns: InstructionStep
getAllPlates
▸ getAllPlates(): Plate[]
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:82
Returns: Plate[]
getAssembly
▸ getAssembly(): Assembly
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:42
Returns: Assembly
getCurrentConnectingPlates
▸ getCurrentConnectingPlates(): Plate[]
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:68
Returns: Plate[]
getGroupId
▸ getGroupId(plate: Plate): number
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:194
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
Returns: number
getGroupIdByGroup
▸ getGroupIdByGroup(group: PlateGroup): number
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:198
Parameters:
| Name | Type |
|---|---|
group |
PlateGroup |
Returns: number
getName
▸ getName(): string
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:225
Returns: string
getPenalty
▸ getPenalty(): number
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:38
Returns: number
getPlateCount
▸ getPlateCount(): number
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:101
Returns: number
getPlateInstruction
▸ getPlateInstruction(plate: Plate): PlateInstruction
Implementation of IAssemblyInstruction
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:58
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
Returns: PlateInstruction
removePlate
▸ removePlate(plate: Plate): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:182
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
Returns: void
setName
▸ setName(name: string): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:221
Parameters:
| Name | Type |
|---|---|
name |
string |
Returns: void
setStartNumber
▸ setStartNumber(startingPoint: number): void
Defined in src/modules/kyub.core.svgObjExporter/src/export/assemblyInstructions/SubassemblyInstruction.ts:229
Parameters:
| Name | Type |
|---|---|
startingPoint |
number |
Returns: void