Skip to content

editor › Globals › Unfolding

Class: Unfolding

This class is a leaf of the Nesting Tree Structure. It holds a number of PlateGroups that are positioned adjacent to each other (on shared EdgeJoints).

Hierarchy

↳ Unfolding

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Unfolding(startPlateGroup: PlateGroup, startPlateGroupRasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›, allPlateGroups: PlateGroup[], matrix: Matrix4): Unfolding

Overrides Nesting.constructor

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:43

Parameters:

Name Type Default
startPlateGroup PlateGroup -
startPlateGroupRasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles› -
allPlateGroups PlateGroup[] -
matrix Matrix4 new Matrix4()

Returns: Unfolding

Properties

Private cachedOutline

• cachedOutline: Polygon | null = null

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:43


Private Readonly joints

• joints: Map‹PlateGroup‹›, EdgeJoint‹›› = new Map()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:40


Private Readonly matrices

• matrices: Map‹PlateGroup‹›, Matrix4‹›› = new Map()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:39


Protected Readonly plateGroupFacade

• plateGroupFacade: PlateGroupGraphFacade

Inherited from Nesting.plateGroupFacade

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


Private Readonly plateGroupToRasterizedOutlines

• plateGroupToRasterizedOutlines: Map‹PlateGroup‹›, Map‹Plate‹›, Pick‹[RasterizedOutline‹›, RasterizedOutline‹›[]], number | "sort" | "0" | "1" | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "shift" | "slice" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "find" | "findIndex" | "fill" | "copyWithin" | "entries" | "keys" | "values" | "includes" | "flatMap" | "flat"››› = new Map>()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:38


Private Readonly plateGroups

• plateGroups: Set‹PlateGroup‹›› = new Set()

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


Private Readonly reverseJoints

• reverseJoints: Map‹PlateGroup‹›, Set‹EdgeJoint‹››› = new Map>()

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:41


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

Methods

Private _cleanup

▸ _cleanup(): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:1039

Returns: void


Private _createNewRasterizedOutlines

▸ _createNewRasterizedOutlines(oldOutlines: Map‹Plate, RasterizedOutlineWithHoles›, oldToNewPlates: Map‹Plate, Plate›): Map‹Plate, RasterizedOutlineWithHoles›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:995

Parameters:

Name Type
oldOutlines Map‹Plate, RasterizedOutlineWithHoles›
oldToNewPlates Map‹Plate, Plate›

Returns: Map‹Plate, RasterizedOutlineWithHoles›


Private _doesOverlap

▸ _doesOverlap(polygonToAdd: Polygon): Promise‹PlateGroup›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:805

Parameters:

Name Type
polygonToAdd Polygon

Returns: Promise‹PlateGroup›


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


Private _getMatrixForPlateGroupOnJoint

▸ _getMatrixForPlateGroupOnJoint(plateGroup: PlateGroup, edgeJoint: EdgeJoint): Matrix4

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:836

This constructs a matrix transforming plate so that the edge shared by plate and another plate in platesMap match.

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: Matrix4


Private _getOverlappingPolygons

▸ _getOverlappingPolygons(overlap: number, plateGroupsToIgnore: Set‹PlateGroup›, precision: number): MultiPolygon

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:973

Creates a multi polygon from every plate's outline within this unfolding. Optionally enlarges the outlines along their connecting joins to create overlapping polygons.

Parameters:

Name Type Default
overlap number -
plateGroupsToIgnore Set‹PlateGroup› new Set()
precision number 0.0001

Returns: MultiPolygon


Private _getPointsFromOutlineSection

▸ _getPointsFromOutlineSection(plateGroup: PlateGroup, section: OutlineSection): Vector3[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:885

Returns the (cloned) start and end point of the given outline section.

Parameters:

Name Type
plateGroup PlateGroup
section OutlineSection

Returns: Vector3[]


Private _getSectionCenter

▸ _getSectionCenter(plateGroup: PlateGroup, section: OutlineSection, sectionLocal: boolean): Vector3

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:870

Retrieve section center in nesting space.

Parameters:

Name Type Default
plateGroup PlateGroup -
section OutlineSection -
sectionLocal boolean false

Returns: Vector3


Private _getSectionNormal

▸ _getSectionNormal(plateGroup: PlateGroup, section: OutlineSection, sectionLocal: boolean): Vector3

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:854

Retrieves section normal in nesting space.

Parameters:

Name Type Default
plateGroup PlateGroup -
section OutlineSection -
sectionLocal boolean false

Returns: Vector3


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›


Private _overlappingOutlineForPlate

▸ _overlappingOutlineForPlate(plate: Plate, plateGroup: PlateGroup, overlap: number, spacing: number): RasterizedOutlineWithHoles

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:937

Creates an extended RasterizedOutline for the passed Plate within the passed PlateGroup by taking the unfolding connectedness into account. Sections that are connected will be extended to create an overlap, not connected ones will be shrunk, creating a safety spacing (to prevent an accidental overlap).

Parameters:

Name Type Description
plate Plate the Plate the Outline should be created from
plateGroup PlateGroup the PlateGroup this plate belogns to
overlap number the overlap that will be created at connected joints in mm
spacing number the safety padding that will be created at not connected joints in mm

Returns: 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 _putPlateGroupsIntoNewUnfolding

▸ _putPlateGroupsIntoNewUnfolding(startPlateGroup: PlateGroup, platesOfNewUnfolding: Array‹[PlateGroup, EdgeJoint]›): Unfolding‹›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:785

Parameters:

Name Type
startPlateGroup PlateGroup
platesOfNewUnfolding Array‹[PlateGroup, EdgeJoint]›

Returns: Unfolding‹›


Private _registerPlateGroupInUnfolding

▸ _registerPlateGroupInUnfolding(plateGroup: PlateGroup, matrix: Matrix4, joint: EdgeJoint): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:898

Parameters:

Name Type Default
plateGroup PlateGroup -
matrix Matrix4 -
joint EdgeJoint null

Returns: void


Private _registerRasterizedOutlines

▸ _registerRasterizedOutlines(plateGroup: PlateGroup, rasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:916

Parameters:

Name Type
plateGroup PlateGroup
rasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles›

Returns: void


Private _resetCache

▸ _resetCache(): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:960

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


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


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›


addPlateGroupToUnfolding

▸ addPlateGroupToUnfolding(plateGroup: PlateGroup, rasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›, edgeJoint: EdgeJoint): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:252

Parameters:

Name Type
plateGroup PlateGroup
rasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles›
edgeJoint EdgeJoint

Returns: void


addRoadkillFrameAsNestingElement

▸ addRoadkillFrameAsNestingElement(): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:493

Returns: void


cloneWithNewPlateGroups

▸ cloneWithNewPlateGroups(oldToNewPlateGroups: Map‹PlateGroup, PlateGroup›): Unfolding

Overrides Nesting.cloneWithNewPlateGroups

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:336

Parameters:

Name Type
oldToNewPlateGroups Map‹PlateGroup, PlateGroup›

Returns: Unfolding


createCopy

▸ createCopy(): Nesting

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:263

Returns: Nesting


createJointCreases

▸ createJointCreases(): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:481

Returns: void


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 Nesting.createMirroredCopyInDirection

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:289

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

Overrides Nesting.getAABB

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:451

Returns: AABB


getAllJointsBetweenPlateGroups

▸ getAllJointsBetweenPlateGroups(plateGroupA: PlateGroup, plateGroupB: PlateGroup, jointToIgnore?: EdgeJoint): EdgeJoint[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:704

Parameters:

Name Type
plateGroupA PlateGroup
plateGroupB PlateGroup
jointToIgnore? EdgeJoint

Returns: EdgeJoint[]


getBasePlate

▸ getBasePlate(): PlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:239

Returns: PlateGroup


getDebugUnfoldingPolygon

▸ getDebugUnfoldingPolygon(): MultiPolygon

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:458

Creates a Multipolygon of every polygon that is contained in this unfolding.

Returns: MultiPolygon


getJoint

▸ getJoint(plateGroup: PlateGroup): EdgeJoint

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:243

Parameters:

Name Type
plateGroup PlateGroup

Returns: EdgeJoint


getJointCenterAndNormal

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

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:742

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: [Vector3, Vector3]

section center and normal in unfolding coordinates


getJointCenterAndNormalInPlateGroupCoordinates

▸ getJointCenterAndNormalInPlateGroupCoordinates(plateGroup: any, edgeJoint: EdgeJoint): [Vector3, Vector3]

Overrides Nesting.getJointCenterAndNormalInPlateGroupCoordinates

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:725

Parameters:

Name Type
plateGroup any
edgeJoint EdgeJoint

Returns: [Vector3, Vector3]


getJointHintPosition

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

Overrides Nesting.getJointHintPosition

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:322

Parameters:

Name Type
plateGroup PlateGroup
edgeJoint EdgeJoint

Returns: [Vector3, number]


getMatrixFor

▸ getMatrixFor(plateGroup: PlateGroup): Matrix4

Overrides Nesting.getMatrixFor

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:64

Parameters:

Name Type
plateGroup PlateGroup

Returns: Matrix4


getMatrixForAligningUnfoldingOnJoint

▸ getMatrixForAligningUnfoldingOnJoint(plateGroup: PlateGroup, section: OutlineSection, otherUnfolding: Unfolding, otherPlateGroup: PlateGroup, otherSection: OutlineSection): Matrix4

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:508

Calculates a matrix which aligns the passed unfolding with this unfolding at the given sections.

Parameters:

Name Type Description
plateGroup PlateGroup PlateGroup (part of this unfolding) where unfoldings should be aligned.
section OutlineSection Section (part of this nesting) that should be aligned.
otherUnfolding Unfolding Unfolding which should be aligned with this unfolding.
otherPlateGroup PlateGroup PlateGroup (part of the other unfolding) where unfoldings should be aligned.
otherSection OutlineSection Section (part of the other unfolding) that should be aligned.

Returns: Matrix4

Matrix which aligns the passed unfolding with this unfolding at the given sections.


getOutline

▸ getOutline(plateGroupsToIgnore: Set‹PlateGroup›): Promise‹Polygon›

Overrides Nesting.getOutline

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:430

Creates a polygon which outlines the unfolding by unionizing every polygon that is contained in this unfolding.

Parameters:

Name Type Default
plateGroupsToIgnore Set‹PlateGroup› new Set()

Returns: Promise‹Polygon›


getOutlineForFrame

▸ getOutlineForFrame(plateGroupsToIgnore: Set‹PlateGroup›): Promise‹Polygon›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:407

Parameters:

Name Type Default
plateGroupsToIgnore Set‹PlateGroup› new Set()

Returns: Promise‹Polygon›


getPlateGroups

▸ getPlateGroups(): PlateGroup[]

Overrides Nesting.getPlateGroups

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:86

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]


getRasterizedOutlinesForPlateGroup

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

Overrides Nesting.getRasterizedOutlinesForPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:79

Parameters:

Name Type
plateGroup PlateGroup

Returns: Map‹Plate, RasterizedOutlineWithHoles›


getReverseJoints

▸ getReverseJoints(plateGroup: PlateGroup): Set‹EdgeJoint›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:248

Parameters:

Name Type
plateGroup PlateGroup

Returns: Set‹EdgeJoint›


getSimpleNestingElementsWithPositions

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

Overrides Nesting.getSimpleNestingElementsWithPositions

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

Returns: Array‹[SimpleNestingElement, Matrix4]›


getUnconnectedJoints

▸ getUnconnectedJoints(): EdgeJoint[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:761

Returns: EdgeJoint[]


hasPlateGroup

▸ hasPlateGroup(plateGroup: PlateGroup): boolean

Overrides Nesting.hasPlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:90

Parameters:

Name Type
plateGroup PlateGroup

Returns: boolean


isAtomic

▸ isAtomic(): boolean

Overrides Nesting.isAtomic

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:56

Returns: boolean


isOutsidePlateGroup

▸ isOutsidePlateGroup(plateGroup: PlateGroup): boolean

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:756

Checks wether the given PlateGroup is a leave within this Unfolding's tree structure (when the base plate is considered the root) i.e. no other PlateGroup is connected through it.

Parameters:

Name Type Description
plateGroup PlateGroup The PlateGroup to check.

Returns: boolean

True if the given PlateGroup is a leave within this Unfolding's tree structure.


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


joinNestingAtJoint

▸ joinNestingAtJoint(sourceUnfolding: Unfolding, jointToJoinAt: EdgeJoint, parentNesting?: CompoundNesting): boolean

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:203

Adds all PlateGroups contained in another unfolding to this unfolding at the given joint.

Parameters:

Name Type Description
sourceUnfolding Unfolding The unfolding whose PlateGroups should be added to this unfolding.
jointToJoinAt EdgeJoint The joint specifying the where the PlateGroups should be added.
parentNesting? CompoundNesting An optional parent compound nesting to register the changes in.

Returns: boolean


overlappingPlateGroups

▸ overlappingPlateGroups(plateGroup: PlateGroup, rasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›, edgeJoint: EdgeJoint): Promise‹PlateGroup[]›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:643

Parameters:

Name Type
plateGroup PlateGroup
rasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles›
edgeJoint EdgeJoint

Returns: Promise‹PlateGroup[]›


polygonForPlateGroup

▸ polygonForPlateGroup(plateGroup: PlateGroup, rasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›, edgeJoint: EdgeJoint): Polygon[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:675

Parameters:

Name Type
plateGroup PlateGroup
rasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles›
edgeJoint EdgeJoint

Returns: Polygon[]


removePlateGroup

▸ removePlateGroup(plateGroup: PlateGroup): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:94

Parameters:

Name Type
plateGroup PlateGroup

Returns: void


render

▸ render(): Promise‹void›

Overrides Nesting.render

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:773

Returns: Promise‹void›


setMatrixFor

▸ setMatrixFor(plateGroup: PlateGroup, matrix: Matrix4): void

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

Parameters:

Name Type
plateGroup PlateGroup
matrix Matrix4

Returns: void


splitAtPlateGroup

▸ splitAtPlateGroup(splitJoint: EdgeJoint, parentNesting?: CompoundNesting): Unfolding

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:132

Split the given unfolding by creating a new one containing the PlateGroup connected by the given joint and all its connected plateGroups.

Parameters:

Name Type Description
splitJoint EdgeJoint The joint to split the unfolding at.
parentNesting? CompoundNesting An optional parent compound nesting to register the changes in.

Returns: Unfolding

the new, split-off unfolding.

TODO: This is currently used by ManualNesting and implemented for FoamCoreNester and not for eg RoadkillNester (eg SimpleNestingElements)


wouldThisOverlapWithPolygons

▸ wouldThisOverlapWithPolygons(polygons: Polygon[]): Promise‹boolean›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:633

Parameters:

Name Type
polygons Polygon[]

Returns: Promise‹boolean›


wouldThisPlateGroupOverlap

▸ wouldThisPlateGroupOverlap(plateGroup: PlateGroup, rasterizedOutlines: Map‹Plate, RasterizedOutlineWithHoles›, edgeJoint: EdgeJoint): Promise‹boolean›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:599

Parameters:

Name Type
plateGroup PlateGroup
rasterizedOutlines Map‹Plate, RasterizedOutlineWithHoles›
edgeJoint EdgeJoint

Returns: Promise‹boolean›


wouldThisUnfoldingOverlap

▸ wouldThisUnfoldingOverlap(otherUnfolding: Unfolding, jointToJoinAt: EdgeJoint): Promise‹boolean›

Defined in src/modules/kyub.core.svgObjExporter/src/export/Nestings/Unfolding.ts:544

Checks whether the passed unfolding would overlap with this unfolding if it was aligned at the given joint. Note: does not validate whether both unfoldings are really connected via the passed joint.

Parameters:

Name Type Description
otherUnfolding Unfolding The unfolding to check for overlapping.
jointToJoinAt EdgeJoint The joint which connects both unfoldings.

Returns: Promise‹boolean›

True if the unfoldings would overlap, false otherwise.