editor › Globals › RoundEdgeDescriptorRealizer
Class: RoundEdgeDescriptorRealizer
Hierarchy
- RoundEdgeDescriptorRealizer
Implements
Index
Constructors
Properties
- assembly
- bendPlate
- edgesToOutlineSections
- isPolished
- material
- outlineSection
- outlineSectionsToEdges
- roundEdgeDescriptor
- roundEdgeImpossibleToRealize
- transforms
Methods
- _clearRoundEdge
- _createRoundEdge
- _ensureAllPlatesExist
- _getMinRadiusOfCurvature
- _isOutlineSectionSelfIntersecting
- _isRoundEdgeBuildable
- _repositionAtJoinedSectionsIfNecessary
- _updateRadius
- _updateRoundEdge
- _updateSurfaceAnnotations
- beforeExport
- checkValidityAndCleanUp
- findModelElement
- getAdditionalExportSvg
- getModelElement
- getRenderedRadius
- onRemove
- realize
- recreateWith
- setAssembly
- setPermanent
- _surfacesEnabled
- _traverseAroundEdge
- canEdgeBeBent
- canSectionBeBent
- wouldCreateLivingHingeLoop
Object literals
Constructors
constructor
+ new RoundEdgeDescriptorRealizer(edge: RoundEdgeDescriptor): RoundEdgeDescriptorRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:169
Parameters:
| Name | Type |
|---|---|
edge |
RoundEdgeDescriptor |
Returns: RoundEdgeDescriptorRealizer
Properties
Private assembly
• assembly: Assembly
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:162
Private bendPlate
• bendPlate: Plate = null
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:149
Private edgesToOutlineSections
• edgesToOutlineSections: Map‹MeshHalfEdge, OutlineSection›
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:157
Private isPolished
• isPolished: boolean | null = null
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:151
Private material
• material: IPlateMaterial | null = null
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:150
Private outlineSection
• outlineSection: OutlineSection = null
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:154
Private outlineSectionsToEdges
• outlineSectionsToEdges: Map‹OutlineSection, MeshHalfEdge›
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:156
Private roundEdgeDescriptor
• roundEdgeDescriptor: RoundEdgeDescriptor
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:146
Private roundEdgeImpossibleToRealize
• roundEdgeImpossibleToRealize: boolean = false
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:169
Set to true if the round edge cannot be realized (due to impossible model geometry) and thus will be removed on the next cleanup call
Private transforms
• transforms: IReadOnlyTransforms
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:160
Mesh transforms, needed to remove the round edge after the descriptor has been destroyed.
Methods
Private _clearRoundEdge
▸ _clearRoundEdge(): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:408
Returns: void
Private _createRoundEdge
▸ _createRoundEdge(section: OutlineSection): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:382
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: boolean
Private _ensureAllPlatesExist
▸ _ensureAllPlatesExist(section: OutlineSection): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:489
Check for expected plate configuration, in particular there should be exactly 3 plates at each end of the section.
Parameters:
| Name | Type | Description |
|---|---|---|
section |
OutlineSection | - |
Returns: boolean
Private _getMinRadiusOfCurvature
▸ _getMinRadiusOfCurvature(): number
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:562
Returns: number
Private _isOutlineSectionSelfIntersecting
▸ _isOutlineSectionSelfIntersecting(outlineSection: OutlineSection): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:536
Parameters:
| Name | Type |
|---|---|
outlineSection |
OutlineSection |
Returns: boolean
Private _isRoundEdgeBuildable
▸ _isRoundEdgeBuildable(): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:467
On a high level, the round edge may be valid, but not actually buildable. Reasons might be, that the curvature is higher than the material allows or the outline is self-intersecting.
Returns: boolean
Private _repositionAtJoinedSectionsIfNecessary
▸ _repositionAtJoinedSectionsIfNecessary(): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:502
Moves outline points of the bend plate to the positions of the points they should be merged with and merge them. Has to be done when the mesh realizer adapts to a transforms change without rebuilding it's plates.
Returns: void
Private _updateRadius
▸ _updateRadius(radius: number, startOrEnd: "start" | "end"): number
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:354
Parameters:
| Name | Type |
|---|---|
radius |
number |
startOrEnd |
"start" | "end" |
Returns: number
Private _updateRoundEdge
▸ _updateRoundEdge(): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:328
Returns: void
Private _updateSurfaceAnnotations
▸ _updateSurfaceAnnotations(): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:517
Returns: void
beforeExport
▸ beforeExport(): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:311
Returns: void
checkValidityAndCleanUp
▸ checkValidityAndCleanUp(): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:233
Returns: void
findModelElement
▸ findModelElement‹DesiredType›(desiredType: any, interactionData: IInteractionData, maxDistance: number, strategy: FindModelElementReturnStrategy): FoundModelElements‹DesiredType›
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:175
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/RoundEdgeDescriptorRealizer.ts:291
Returns: Promise‹string | null›
getModelElement
▸ getModelElement(): RoundEdgeDescriptor‹›
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:224
Returns: RoundEdgeDescriptor‹›
getRenderedRadius
▸ getRenderedRadius(startOrEnd: "start" | "end"): number
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:303
Parameters:
| Name | Type |
|---|---|
startOrEnd |
"start" | "end" |
Returns: number
onRemove
▸ onRemove(): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:228
Returns: void
realize
▸ realize(targets: Array‹object›, lastChangeEvent: IModelElementEvent, lastTransformsChangeEvent: ITransformsChangeEvent): void
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:241
Parameters:
| Name | Type |
|---|---|
targets |
Array‹object› |
lastChangeEvent |
IModelElementEvent |
lastTransformsChangeEvent |
ITransformsChangeEvent |
Returns: void
recreateWith
▸ recreateWith(otherModelElement: RoundEdgeDescriptor): IModelElementRealizer‹RoundEdgeDescriptor›
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:295
Parameters:
| Name | Type |
|---|---|
otherModelElement |
RoundEdgeDescriptor |
Returns: IModelElementRealizer‹RoundEdgeDescriptor›
setAssembly
▸ setAssembly(assembly: Assembly): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:299
Parameters:
| Name | Type |
|---|---|
assembly |
Assembly |
Returns: void
setPermanent
▸ setPermanent(): void
Implementation of IModelElementRealizer
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:315
Returns: void
Static Private _surfacesEnabled
▸ _surfacesEnabled(edge: MeshHalfEdge, mesh: Mesh): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:131
Parameters:
| Name | Type |
|---|---|
edge |
MeshHalfEdge |
mesh |
Mesh |
Returns: boolean
Static Private _traverseAroundEdge
▸ _traverseAroundEdge(edge: MeshHalfEdge): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:142
Parameters:
| Name | Type |
|---|---|
edge |
MeshHalfEdge |
Returns: boolean
Static canEdgeBeBent
▸ canEdgeBeBent(edge: MeshHalfEdge, mesh: Mesh): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:103
Check whether this edge can be rounded in the current geometry. We do not handle all cases yet, more precisely we can only handle three surfaces meeting at the ends of a round edge.
see https://gitlab.dev.kyub.io/laser-project/general-issues/issues/2578
Parameters:
| Name | Type | Description |
|---|---|---|
edge |
MeshHalfEdge | - |
mesh |
Mesh | - |
Returns: boolean
Static canSectionBeBent
▸ canSectionBeBent(section: OutlineSection): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:41
This checks whether a previously bent section is preventing the supplied section from being bent. TODO Handle the case if the adjacent plates are non-parallel. TODO Handle the case if there is more than one plate on either side. general-issues#546
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: boolean
Static wouldCreateLivingHingeLoop
▸ wouldCreateLivingHingeLoop(section: OutlineSection): boolean
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:111
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: boolean
Object literals
Private renderedRadius
▪ renderedRadius: object
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:163
end
• end: number = 0
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:163
start
• start: number = 0
Defined in src/model/data/Concepts/Realization/RoundEdgeDescriptorRealizer.ts:163