Skip to content

editorGlobalsUnfoldingGroup

Class: UnfoldingGroup

A composite nesting, that places Unfoldings or UnfoldingGroups in a common 2d space. New Unfoldings can be placed in relation to existing Unfoldings, based on common EdgeJoints.

Hierarchy

CompoundNestingUnfolding | UnfoldingGroup

UnfoldingGroup

Index

Constructors

Properties

Methods

Constructors

constructor

+ new UnfoldingGroup(allPlateGroups: PlateGroup[]): UnfoldingGroup

Inherited from CompoundNesting.constructor

Overrides Nesting.constructor

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:20

Parameters:

Name Type
allPlateGroups PlateGroup[]

Returns: UnfoldingGroup

Properties

Protected Readonly matrices

matrices: Map‹NestingElement, Matrix4‹›› = new Map()

Inherited from CompoundNesting.matrices

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:19


Protected Readonly nestings

nestings: Set‹NestingElement› = new Set()

Inherited from CompoundNesting.nestings

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:18


Protected Readonly plateGroupFacade

plateGroupFacade: PlateGroupGraphFacade

Inherited from Nesting.plateGroupFacade

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:28


Protected Readonly simpleNestingElements

simpleNestingElements: Map‹SimpleNestingElement‹›, Matrix4‹›› = new Map()

Inherited from Nesting.simpleNestingElements

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:29


Private stillAtomic

stillAtomic: boolean = true

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:27

an UnfoldingGroup is atomic, if all its Unfoldings were placed with disposition 0

Methods

Private _computeJointCentersAndJointNormals

_computeJointCentersAndJointNormals(edgeJoint: EdgeJoint, unfolding: Unfolding | UnfoldingGroup, coordinateSpace: "multi" | "unfolding"): [Vector3, Vector3, Vector3, Vector3]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:118

Parameters:

Name Type Default
edgeJoint EdgeJoint -
unfolding Unfolding | UnfoldingGroup -
coordinateSpace "multi" | "unfolding" "unfolding"

Returns: [Vector3, Vector3, Vector3, Vector3]


Protected _doesOverlap

_doesOverlap(polygonToAdd: Polygon): Promise‹boolean›

Inherited from CompoundNesting._doesOverlap

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:241

Parameters:

Name Type
polygonToAdd Polygon

Returns: Promise‹boolean›


Protected _getCenterOfPlateGroup

_getCenterOfPlateGroup(plateGroup: PlateGroup): Vector3

Inherited from Nesting._getCenterOfPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:277

Parameters:

Name Type
plateGroup PlateGroup

Returns: Vector3


Protected _getMatrixConsideringMirroring

_getMatrixConsideringMirroring(originalMatrix: Matrix4, originalCenter: Vector3, mirroringCenter: Vector3, mirroringDirection: Vector3, targetYAxis: Vector3): Matrix4

Inherited from Nesting._getMatrixConsideringMirroring

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:222

Creates a new positional matrix for an element within a Nesting when that Nesting should be mirrored in place.

Parameters:

Name Type Default Description
originalMatrix Matrix4 - is the original matrix of the element within the nesting
originalCenter Vector3 - is the original center of the element (with the matrix applied)
mirroringCenter Vector3 - is the point on which the mirroring should be oriented on
mirroringDirection Vector3 - is the direction that should be used to mirror on, mirroring in y-dir means flipping the y coordinates
targetYAxis Vector3 new Vector3(0, 1, 0) can be used to correct the rotation offset of a RO that was mirrored y-wise

Returns: Matrix4


Protected _getNestingForPlateGroup

_getNestingForPlateGroup(plateGroup: PlateGroup, errorOnNotFound: boolean): Unfolding | UnfoldingGroup

Inherited from CompoundNesting._getNestingForPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:214

This method uses a local cache and validates the entry of PlateGroup. If necessary, it rebuilds that entry

Parameters:

Name Type Default
plateGroup PlateGroup -
errorOnNotFound boolean true

Returns: Unfolding | UnfoldingGroup

Nesting that contains the PlateGroup, or null if none found and no error is thrown


Protected _getTransformationMatrix

_getTransformationMatrix(currentPosition: Vector3, currentNormal: Vector3, targetPosition: Vector3, targetNormal: Vector3): Matrix4

Inherited from Nesting._getTransformationMatrix

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:191

Constructs a matrix transforming current position and normal to the target

Parameters:

Name Type
currentPosition Vector3
currentNormal Vector3
targetPosition Vector3
targetNormal Vector3

Returns: Matrix4


Protected _mirrorRasterizedOutlines

_mirrorRasterizedOutlines(plateGroup: PlateGroup): Map‹Plate, RasterizedOutlineWithHoles

Inherited from Nesting._mirrorRasterizedOutlines

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:255

Mirror the rasterized outlines of the plateGroup in place, typically in y-wise direction (i.e. on x axis)

Parameters:

Name Type
plateGroup PlateGroup

Returns: Map‹Plate, RasterizedOutlineWithHoles


Protected _printCompareNestingWith

_printCompareNestingWith(otherNesting: Nesting): Promise‹void›

Inherited from Nesting._printCompareNestingWith

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:287

Print both this nesting an the other nesting separately and combined

Parameters:

Name Type
otherNesting Nesting

Returns: Promise‹void›


Private _setStillAtomic

_setStillAtomic(value: boolean): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:153

This should usually not be used explicitly.

Parameters:

Name Type
value boolean

Returns: void


Protected _transformDirectionWithInverse

_transformDirectionWithInverse(direction: Vector3, matrix: Matrix4): Vector3

Inherited from Nesting._transformDirectionWithInverse

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:272

Parameters:

Name Type
direction Vector3
matrix Matrix4

Returns: Vector3


addArrow

addArrow(edgeJoint: EdgeJoint, newUnfolding: Unfolding | UnfoldingGroup, twist: boolean): Promise‹void›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:97

Parameters:

Name Type Default
edgeJoint EdgeJoint -
newUnfolding Unfolding | UnfoldingGroup -
twist boolean false

Returns: Promise‹void›


addLabelOnEdge

addLabelOnEdge(plateGroup: PlateGroup, edgeJoint: EdgeJoint, labelText: string, isReceiving: boolean): SymbolicLinkNestingElement

Inherited from Nesting.addLabelOnEdge

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:93

Parameters:

Name Type Default
plateGroup PlateGroup -
edgeJoint EdgeJoint -
labelText string -
isReceiving boolean false

Returns: SymbolicLinkNestingElement


addNestingWithMatrix

addNestingWithMatrix(nesting: Unfolding | UnfoldingGroup, placementMatrix: Matrix4): void

Inherited from CompoundNesting.addNestingWithMatrix

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:161

Parameters:

Name Type
nesting Unfolding | UnfoldingGroup
placementMatrix Matrix4

Returns: void


addOutlineAsNestingElement

addOutlineAsNestingElement(applyKerf: boolean): Promise‹void›

Inherited from Nesting.addOutlineAsNestingElement

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:87

Parameters:

Name Type Default
applyKerf boolean true

Returns: Promise‹void›


addRoadkillFrameAsNestingElement

addRoadkillFrameAsNestingElement(arrowReceivingPlateGroup: SetPlateGroup›): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:71

Parameters:

Name Type Default
arrowReceivingPlateGroup SetPlateGroup new Set()

Returns: void


cloneWithNewPlateGroups

cloneWithNewPlateGroups(oldToNewPlateGroups: Map‹PlateGroup, PlateGroup›): CompoundNesting

Inherited from CompoundNesting.cloneWithNewPlateGroups

Overrides Nesting.cloneWithNewPlateGroups

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:68

Parameters:

Name Type
oldToNewPlateGroups Map‹PlateGroup, PlateGroup

Returns: CompoundNesting


createMirroredCopy

createMirroredCopy(): Promise‹this›

Inherited from Nesting.createMirroredCopy

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:108

Creates a deep clone mirrored on AABB center y-wise (i.e. on x-axis)

Returns: Promise‹this›


createMirroredCopyInDirection

createMirroredCopyInDirection(direction: Vector3): Promise‹this›

Overrides CompoundNesting.createMirroredCopyInDirection

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:37

Parameters:

Name Type
direction Vector3

Returns: Promise‹this›


debugPrint

debugPrint(polygonToAdd: Polygon, debugLevel: DebugLevel‹›): void

Inherited from Nesting.debugPrint

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:156

Prints the current layout into the console

Parameters:

Name Type Default Description
polygonToAdd Polygon null an additional polygon that will be added to the current print
debugLevel DebugLevel‹› Nesting.defaultDebugLevel determines the visibility, to show the print with debugLevel nesting use flag #debug.nesting=0

Returns: void


getAABB

getAABB(): AABB

Inherited from CompoundNesting.getAABB

Overrides Nesting.getAABB

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:125

Returns: AABB


getArrows

getArrows(): ArrowNestingElement[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:114

Returns: ArrowNestingElement[]


getJointCenterAndNormal

getJointCenterAndNormal(plateGroup: PlateGroup, edgeJoint: EdgeJoint): [Vector3, Vector3]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:47

Method needed to support adding UnfoldingGroups

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: [Vector3, Vector3]


getJointCenterAndNormalInPlateGroupCoordinates

getJointCenterAndNormalInPlateGroupCoordinates(plateGroup: PlateGroup, edgeJoint: EdgeJoint): [Vector3, Vector3]

Inherited from CompoundNesting.getJointCenterAndNormalInPlateGroupCoordinates

Overrides Nesting.getJointCenterAndNormalInPlateGroupCoordinates

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:81

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: [Vector3, Vector3]


getJointHintPosition

getJointHintPosition(plateGroup: PlateGroup, edgeJoint: EdgeJoint): [Vector3, number]

Inherited from Nesting.getJointHintPosition

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:181

Returns the center of the edgeJoint and the outward-facing direction as an angle in degrees.

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: [Vector3, number]


getMatrixFor

getMatrixFor(plateGroup: PlateGroup): Matrix4

Inherited from CompoundNesting.getMatrixFor

Overrides Nesting.getMatrixFor

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:60

Parameters:

Name Type
plateGroup PlateGroup

Returns: Matrix4


getMatrixForNesting

getMatrixForNesting(nesting: Unfolding | UnfoldingGroup): Matrix4

Inherited from CompoundNesting.getMatrixForNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:45

Parameters:

Name Type
nesting Unfolding | UnfoldingGroup

Returns: Matrix4


getNestings

getNestings(): SetNesting

Inherited from CompoundNesting.getNestings

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:30

Returns: SetNesting


getNewInstance

getNewInstance(): UnfoldingGroup

Overrides CompoundNesting.getNewInstance

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:33

Returns: UnfoldingGroup


getOutline

getOutline(): Promise‹Polygon›

Inherited from CompoundNesting.getOutline

Overrides Nesting.getOutline

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:93

Creates a polygon representing the outline of the first nesting for compound nestings with only one nesting, calculates a polygon representing the aabb otherwise.

Returns: Promise‹Polygon›


getOutlineForFrame

getOutlineForFrame(plateGroupsToIgnore: SetPlateGroup›): Promise‹Polygon›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:76

Parameters:

Name Type Default
plateGroupsToIgnore SetPlateGroup new Set()

Returns: Promise‹Polygon›


getOutlines

getOutlines(): Promise‹Polygon[]›

Inherited from CompoundNesting.getOutlines

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:112

Creates a list of polygons representing the outline for each nesting within this compound nesting.

Returns: Promise‹Polygon[]›


getPlateGroups

getPlateGroups(): PlateGroup[]

Inherited from CompoundNesting.getPlateGroups

Overrides Nesting.getPlateGroups

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:143

Returns: PlateGroup[]


getPositionAndRotationFor

getPositionAndRotationFor(plateGroup: PlateGroup): [Vector2, number]

Inherited from Nesting.getPositionAndRotationFor

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:139

Creates position + rotation from the transformation matrix that is used for internal representation

Parameters:

Name Type
plateGroup PlateGroup

Returns: [Vector2, number]


getPositionAndRotationForNesting

getPositionAndRotationForNesting(nesting: Unfolding | UnfoldingGroup): [Vector2, number]

Inherited from CompoundNesting.getPositionAndRotationForNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:50

Parameters:

Name Type
nesting Unfolding | UnfoldingGroup

Returns: [Vector2, number]


getRasterizedOutlinesForPlateGroup

getRasterizedOutlinesForPlateGroup(plateGroup: PlateGroup): Map‹Plate, RasterizedOutlineWithHoles

Inherited from CompoundNesting.getRasterizedOutlinesForPlateGroup

Overrides Nesting.getRasterizedOutlinesForPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:153

Parameters:

Name Type
plateGroup PlateGroup

Returns: Map‹Plate, RasterizedOutlineWithHoles


getSimpleNestingElementsWithPositions

getSimpleNestingElementsWithPositions(): Array‹[SimpleNestingElement, Matrix4]›

Inherited from CompoundNesting.getSimpleNestingElementsWithPositions

Overrides Nesting.getSimpleNestingElementsWithPositions

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:34

Returns: Array‹[SimpleNestingElement, Matrix4]›


hasPlateGroup

hasPlateGroup(plateGroup: PlateGroup): boolean

Inherited from CompoundNesting.hasPlateGroup

Overrides Nesting.hasPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:149

Parameters:

Name Type
plateGroup PlateGroup

Returns: boolean


isAtomic

isAtomic(): boolean

Overrides CompoundNesting.isAtomic

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:29

Returns: boolean


isOutsidePlateGroup

isOutsidePlateGroup(plateGroup: PlateGroup): boolean

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/UnfoldingGroup.ts:61

Checks whether the given PlateGroup is a leave within the Unfolding tree.

Parameters:

Name Type Description
plateGroup PlateGroup The PlateGroup to check.

Returns: boolean

True if the given PlateGroup is a leave within the Unfolding tree, false otherwise.


isPlateGroupMirrored

isPlateGroupMirrored(plateGroup: PlateGroup): boolean

Inherited from Nesting.isPlateGroupMirrored

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Nesting.ts:118

If this returns false, then the plateGroup outline and the plateGroup RasterizedOutline are in the same coordinate system. Otherwise, the RasterizedOutline was flipped once y-wise. (see RasterizedOutline)

Parameters:

Name Type
plateGroup PlateGroup

Returns: boolean


removeNesting

removeNesting(nesting: Unfolding | UnfoldingGroup): void

Inherited from CompoundNesting.removeNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:176

Parameters:

Name Type
nesting Unfolding | UnfoldingGroup

Returns: void


render

render(): Promise‹void›

Inherited from CompoundNesting.render

Overrides Nesting.render

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:204

Returns: Promise‹void›


setMatrixForNesting

setMatrixForNesting(nesting: Unfolding | UnfoldingGroup, matrix: Matrix4): void

Inherited from CompoundNesting.setMatrixForNesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/CompoundNesting.ts:55

Parameters:

Name Type
nesting Unfolding | UnfoldingGroup
matrix Matrix4

Returns: void