Skip to content

editorGlobalsHullPlateRealizer

Class: HullPlateRealizer

Realizes a mesh by transforming the surfaces 1:1 to plates

Hierarchy

  • HullPlateRealizer

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new HullPlateRealizer(mesh: Mesh, existingPlates: Plate[]): HullPlateRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:165

Parameters:

Name Type Default Description
mesh Mesh - the mesh that should be realized
existingPlates Plate[] [] if the mesh was created based on existing plates, you can specify them here. The realizer will take over ownership and will modify/delete them to adapt to the mesh, so you do not have to do this manually when creating a mesh from existing plates. The realizer assumes that the mesh's surfaces are in the same order as plates.

Returns: HullPlateRealizer

Properties

Private assembly

assembly: Assembly

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:155


Private compositeModel

compositeModel: CompositeModel

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:153


Private edgesToOutlineSections

edgesToOutlineSections: Map‹MeshHalfEdge, OutlineSection = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:161


Private lastTransforms

lastTransforms: Transforms

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:151


Protected materialType

materialType: string

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:149


Private mesh

mesh: Mesh

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:154


Private numberOfRealizedSurfaces

numberOfRealizedSurfaces: number = 0

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:157


Private outlineSectionsToEdges

outlineSectionsToEdges: Map‹OutlineSection, MeshHalfEdge = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:163


Private plateDirty

plateDirty: Map‹Plate, boolean› = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:164


Private plateRemoved

plateRemoved: Map‹Plate, boolean› = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:165


Private platesToSurfaces

platesToSurfaces: Map‹Plate, MeshSurface = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:162


Private realizedSurfaceNumbersOfPoints

realizedSurfaceNumbersOfPoints: number[] = []

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:158


Private surfacesToPlates

surfacesToPlates: Map‹MeshSurface, Plate = new Map()

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:160

Methods

Private _anythingRealized

_anythingRealized(): boolean

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:685

Returns: boolean


Private _clearPlateDependencies

_clearPlateDependencies(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:698

Returns: void


Protected _createFingerJoints

_createFingerJoints(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:484

Returns: void


Private _createPlate

_createPlate(outline: Outline, holes: Outline[]): Plate‹›

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:556

Parameters:

Name Type
outline Outline
holes Outline[]

Returns: Plate‹›


Private _createPlates

_createPlates(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:707

Returns: void


Private _ensureCachesAreValid

_ensureCachesAreValid(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:564

If mapping from surfaces to plates is not bijective, throw an Error.

Returns: void


Private _findSurfaceDisplayAnnotationFromPlanarSurfaces

_findSurfaceDisplayAnnotationFromPlanarSurfaces(surface: MeshSurface, meshTransforms: IReadOnlyTransforms, otherMeshAnalyzers: MeshSurfaceAnalyzer[]): SurfaceDisplayAnnotation‹›

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:941

We try to find a SurfaceDisplayAnnotation for surfaces laying in the same plane. The according plates of these will (with high probably) get merged, and so the texture offsets should align, so that in the unmerged version, where the plates just lay next to each other, they already look merged.

Parameters:

Name Type Description
surface MeshSurface -
meshTransforms IReadOnlyTransforms -
otherMeshAnalyzers MeshSurfaceAnalyzer[] -

Returns: SurfaceDisplayAnnotation‹›


Private _getDimensionConception

_getDimensionConception(): DimensionConception

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:1030

Returns: DimensionConception


Private _insertComponentsIfNecessary

_insertComponentsIfNecessary(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:858

Returns: void


Private _isSurfaceDisabled

_isSurfaceDisabled(surface: MeshSurface): boolean

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:547

Parameters:

Name Type
surface MeshSurface

Returns: boolean


Private _onAssemblyChange

_onAssemblyChange(__namedParameters: object): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:215

Registered on the the assembly

Parameters:

__namedParameters: object

Name Type
newCompositeModel CompositeModel‹›

Returns: void


_onObjectRemove

_onObjectRemove(object: PhysicalObject): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:462

Called by the compositeModel when a physical Object is removed. (f.e. by the PlateMergingComponent)

Parameters:

Name Type
object PhysicalObject

Returns: void


Private _onShapeChange

_onShapeChange(plate: Plate): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:869

Parameters:

Name Type
plate Plate

Returns: void


Private _plateFromSurface

_plateFromSurface(surface: MeshSurface, mesh: Mesh): Plate

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:800

Parameters:

Name Type
surface MeshSurface
mesh Mesh

Returns: Plate


Private _realizeFromScratch

_realizeFromScratch(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:579

Returns: void


Private _removePhysicalObjects

_removePhysicalObjects(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:689

Returns: void


Private _requiresPlateRegeneration

_requiresPlateRegeneration(): boolean

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:637

todo: we didn't find a case where this fail but it is possible that is requires something more strict. Evaluates whether we can reuse the already realized plates because the mesh did not change dramatically. It could be possible that by just swapping out a mesh implementation the identity of surfaces changes and we need to regenerate anyways because we then cannot map the new surfaces to the old plates.

Returns: boolean


Private _setPolishFlagOnAssembly

_setPolishFlagOnAssembly(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:591

Although "isPolished" can be set per surface display annotation, the current export data structure sets this once per assembly (general-issues#2255). So, iterate over all annotations and polish the assembly if one is set to true.

Returns: void


Private _storePlateInternally

_storePlateInternally(surface: MeshSurface, plate: Plate): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:873

Parameters:

Name Type
surface MeshSurface
plate Plate

Returns: void


Private _syncSurfaceAnnotationsWithPlanarSurfaces

_syncSurfaceAnnotationsWithPlanarSurfaces(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:511

Returns: void


Private _updatePlates

_updatePlates(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:732

We can update the plates by just adjusting their OutlinePoints to the positions of the halfEdges because we know that the mesh did not change "dramatically". Useful in pushPull. This is optimized to reduce the amount of vector waste.

Returns: void


Private _updatePlatesTransforms

_updatePlatesTransforms(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:899

Returns: void


Private _updateSurfaceIdentifiers

_updateSurfaceIdentifiers(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:615

Counts the numbers of numbers of points of a surface. (this is not a typo)

Returns: void


Private _updateSurfaceRef

_updateSurfaceRef(newSurface: MeshSurface): boolean

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:984

Tries to update references to a MeshSurface to a new instance.

Parameters:

Name Type Description
newSurface MeshSurface The new identity of the surface, that should replace old references

Returns: boolean


addPlateMergingComponentIfNotPresent

addPlateMergingComponentIfNotPresent(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:279

Returns: void


addReinforcementComponentIfNotPresent

addReinforcementComponentIfNotPresent(): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:471

Returns: void


beforeExport

beforeExport(): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:370

Returns: void


checkValidityAndCleanUp

checkValidityAndCleanUp(): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:223

Returns: void


destroy

destroy(): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:455

Returns: void


findModelElement

findModelElementDesiredType›(desiredType: any, interactionData: IInteractionData, maxDistance: number, strategy: FindModelElementReturnStrategy): FoundModelElements‹DesiredType›

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:374

Type parameters:

DesiredType

Parameters:

Name Type Default
desiredType any -
interactionData IInteractionData -
maxDistance number 20
strategy FindModelElementReturnStrategy FindModelElementReturnStrategy.FIRST

Returns: FoundModelElements‹DesiredType›


getAdditionalExportSvg

getAdditionalExportSvg(): Promise‹string | null›

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:302

Returns: Promise‹string | null›


getAssembly

getAssembly(): Assembly‹›

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:195

Returns: Assembly‹›


getEdgesToOutlineSections

getEdgesToOutlineSections(): Map‹MeshHalfEdge, OutlineSection

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:330

Returns: Map‹MeshHalfEdge, OutlineSection


getModelElement

getModelElement(): Mesh

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:207

Returns: Mesh


getOutlineSectionsToEdges

getOutlineSectionsToEdges(): Map‹OutlineSection, MeshHalfEdge

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:326

Returns: Map‹OutlineSection, MeshHalfEdge


getSurfaceFromPlate

getSurfaceFromPlate(plate: Plate): MeshSurface

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:309

Parameters:

Name Type Description
plate Plate which has been realized by this instance (output of realize)

Returns: MeshSurface


getSurfacesToPlates

getSurfacesToPlates(): Map‹MeshSurface, Plate

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:219

Returns: Map‹MeshSurface, Plate


initializeWithExistingPlates

initializeWithExistingPlates(existingPlates: Plate[]): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:339

Assuming the existing plates would equal the result of the hull plate realizer's realization, this assigns a binding in order to not have to re-create all plates from scratch, if this mesh was created based on existing plates.

Parameters:

Name Type
existingPlates Plate[]

Returns: void


onRemove

onRemove(removePhysicalObjects: boolean): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:291

Parameters:

Name Type Default
removePhysicalObjects boolean true

Returns: void


realize

realize(targets: Array‹object›, lastChangeEvent: IModelElementEvent, lastTransformsChangeEvent: ITransformsChangeEvent): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:237

Parameters:

Name Type
targets Array‹object›
lastChangeEvent IModelElementEvent
lastTransformsChangeEvent ITransformsChangeEvent

Returns: void


recreateWith

recreateWith(otherModelElement: Mesh): HullPlateRealizer‹›

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:322

Parameters:

Name Type
otherModelElement Mesh

Returns: HullPlateRealizer‹›


setAssembly

setAssembly(assembly: Assembly): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:183

Parameters:

Name Type
assembly Assembly

Returns: void


setCompositeModel

setCompositeModel(compositeModel: CompositeModel): void

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:199

Parameters:

Name Type
compositeModel CompositeModel

Returns: void


setPermanent

setPermanent(): void

Implementation of IModelElementRealizer

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:233

Returns: void


Static getEdgeUnfoldingAnnotation

getEdgeUnfoldingAnnotation(edge: MeshHalfEdge, mesh: Mesh): EdgeUnfoldingAnnotation

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:121

Returns a EdgeUnfoldingAnnotation or generates it based on the edges current values.

Parameters:

Name Type Description
edge MeshHalfEdge the edge to annotate
mesh Mesh the mesh that the edge is part of

Returns: EdgeUnfoldingAnnotation


Static getSurfaceDisplayAnnotation

getSurfaceDisplayAnnotation(surface: MeshSurface, mesh: Mesh, plate?: Plate): SurfaceDisplayAnnotation

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:65

Returns a SurfaceDisplayAnnotation or generates it based on the plate's current values.

Parameters:

Name Type Description
surface MeshSurface the surface to annotate
mesh Mesh the mesh that the surface is part of
plate? Plate the plate to copy values from (e.g. material and thickness)

Returns: SurfaceDisplayAnnotation


Static isSurfaceDisabled

isSurfaceDisabled(surface: MeshSurface, mesh: any): boolean

Defined in src/model/data/Concepts/Realization/HullPlateRealizer.ts:55

Parameters:

Name Type
surface MeshSurface
mesh any

Returns: boolean