editor › Globals › CellDescriptorRealizer
Class: CellDescriptorRealizer
Responsible for the visualization in the Editor and for the Export to SVG of a CellDescriptor. Visualization is handled in realize and export in beforeExport
Hierarchy
- CellDescriptorRealizer
Implements
Index
Constructors
Properties
Methods
- _addNewMembranesIfNeeded
- _checkModelRealizable
- _needsMembraneUpdate
- _realizeUnfinishedMembranes
- _removeAllOrnaments
- _removeOrnamentFromSurface
- _removeUnusedMembranes
- _updateMembranesSize
- _updateOrnaments
- beforeExport
- checkValidityAndCleanUp
- findModelElement
- getAdditionalExportSvg
- getModelElement
- onRemove
- realize
- recreateWith
- setAssembly
- setPermanent
Constructors
constructor
+ new CellDescriptorRealizer(descriptor: CellDescriptor): CellDescriptorRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:32
Parameters:
| Name | Type |
|---|---|
descriptor |
CellDescriptor |
Returns: CellDescriptorRealizer
Properties
Private assembly
• assembly: Assembly
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:26
Private descriptor
• descriptor: CellDescriptor
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:34
Private surfaceToCellOrnament
• surfaceToCellOrnament: Map‹MeshSurfaceAnchor‹›, Ornament‹›› = new Map
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:32
Store Ornaments of surfaces for later use TODO sometimes ornaments are not correctly removed, maybe use OrnamentDescriptor?
Methods
Private _addNewMembranesIfNeeded
▸ _addNewMembranesIfNeeded(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:184
Adds membranes if model to big. If model needs cell in 3 axis, cell cannot be applied, and will be removed
Returns: void
Private _checkModelRealizable
▸ _checkModelRealizable(targets: RealizedList): boolean
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:142
Checks if model can be realized. If Cell cannot be applied to the model, it will be removed
Parameters:
| Name | Type |
|---|---|
targets |
RealizedList |
Returns: boolean
Private _needsMembraneUpdate
▸ _needsMembraneUpdate(membrane: CellMembrane): boolean
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:265
Parameters:
| Name | Type |
|---|---|
membrane |
CellMembrane |
Returns: boolean
Private _realizeUnfinishedMembranes
▸ _realizeUnfinishedMembranes(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:245
Adds a new SingleSurfaceDescriptor for the membrane to the cell
Returns: void
Private _removeAllOrnaments
▸ _removeAllOrnaments(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:128
Returns: void
Private _removeOrnamentFromSurface
▸ _removeOrnamentFromSurface(surface: MeshSurfaceAnchor): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:174
Parameters:
| Name | Type |
|---|---|
surface |
MeshSurfaceAnchor |
Returns: void
Private _removeUnusedMembranes
▸ _removeUnusedMembranes(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:166
Remove Membranes outside of the model.
Returns: void
Private _updateMembranesSize
▸ _updateMembranesSize(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:232
Push pull orthogonal to a membrane requires it to be resized, which happens here
Returns: void
Private _updateOrnaments
▸ _updateOrnaments(): Promise‹void›
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:204
Since plates might be re-realized we have to re-apply the ornaments. Also places new ornaments for newly created membranes
Returns: Promise‹void›
beforeExport
▸ beforeExport(): Promise‹void›
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:120
Splits the plates on membranes of a cell and connects the middle Plate with CellMembraneJoints and TeeJoints
Returns: Promise‹void›
checkValidityAndCleanUp
▸ checkValidityAndCleanUp(): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:52
Returns: void
findModelElement
▸ findModelElement‹DesiredType›(desiredType: any, interactionData: IInteractionData): FoundModelElements‹DesiredType›
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:36
Type parameters:
▪ DesiredType
Parameters:
| Name | Type |
|---|---|
desiredType |
any |
interactionData |
IInteractionData |
Returns: FoundModelElements‹DesiredType›
getAdditionalExportSvg
▸ getAdditionalExportSvg(): Promise‹string | null›
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:112
Returns: Promise‹string | null›
getModelElement
▸ getModelElement(): CellDescriptor
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:67
Returns: CellDescriptor
onRemove
▸ onRemove(): void
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:71
Returns: void
realize
▸ realize(targets: RealizedList): Promise‹void›
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:85
Updates the membranes to reflect changes on the assembly. see sub-methods for functionality
Parameters:
| Name | Type |
|---|---|
targets |
RealizedList |
Returns: Promise‹void›
recreateWith
▸ recreateWith(otherModelElement: CellDescriptor): IModelElementRealizer‹CellDescriptor›
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:104
Parameters:
| Name | Type |
|---|---|
otherModelElement |
CellDescriptor |
Returns: IModelElementRealizer‹CellDescriptor›
setAssembly
▸ setAssembly(assembly: Assembly): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:108
Parameters:
| Name | Type |
|---|---|
assembly |
Assembly |
Returns: void
setPermanent
▸ setPermanent(): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/CellDescriptorRealizer.ts:63
Returns: void