Skip to content

editor › Globals › PlateGrouper

Class: PlateGrouper

This class groups plates according to the connectedness with CoplanarJoints. These plates have to be exported together, as if they were one plate.

Hierarchy

  • PlateGrouper

Index

Methods

Methods

Static Private _getPlateGroup

▸ _getPlateGroup(plate: Plate, platesMap: Map‹Plate, RasterizedOutlineWithHoles›): PlateGroup

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:51

Parameters:

Name Type
plate Plate
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: PlateGroup


Static Private _getPlateMatrix

▸ _getPlateMatrix(plate: Plate, coplanarJoint: CoplanarJoint, side: PlateSide, group: PlateGroup, platesMap: Map‹Plate, RasterizedOutlineWithHoles›): Matrix4

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:85

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

Parameters:

Name Type
plate Plate
coplanarJoint CoplanarJoint
side PlateSide
group PlateGroup
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: Matrix4


Static Private _getPointsFromOutlineSection

▸ _getPointsFromOutlineSection(plate: Plate, section: OutlineSection, platesMap: Map‹Plate, RasterizedOutlineWithHoles›): Vector3[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:170

Parameters:

Name Type
plate Plate
section OutlineSection
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: Vector3[]


Static Private _getSectionCenter

▸ _getSectionCenter(plate: Plate, section: OutlineSection, platesMap: Map‹Plate, RasterizedOutlineWithHoles›): Vector3

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:72

Parameters:

Name Type
plate Plate
section OutlineSection
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: Vector3


Static Private _getSectionNormal

▸ _getSectionNormal(plate: Plate, section: OutlineSection, platesMap: Map‹Plate, RasterizedOutlineWithHoles›): Vector3

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:159

Parameters:

Name Type
plate Plate
section OutlineSection
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: Vector3


Static Private _traverseAlongCoplanarJoints

▸ _traverseAlongCoplanarJoints(plate: Plate, callback: function): void

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:133

This performs a DFS through the graph of plates. Only CoplanarJoints are considered edges in this case. For each new plate found, callback is invoked with the plate and the CoplanarJoint.

Parameters:

▪ plate: Plate

Plate to start from

▪ callback: function

Callback to invoke for each plate. Not invoked for the passed plate.

▸ (plate: Plate, coplanarJoint: CoplanarJoint): void

Parameters:

Name Type
plate Plate
coplanarJoint CoplanarJoint

Returns: void


Static getEnlargedRasterizedOutlines

▸ getEnlargedRasterizedOutlines(plates: Plate[], extendBy: number, fabricationConfig: FabricationConfig, ignoreNegativeOffset: boolean): Map‹Plate, RasterizedOutlineWithHoles›

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:31

Parameters:

Name Type Default
plates Plate[] -
extendBy number -
fabricationConfig FabricationConfig -
ignoreNegativeOffset boolean false

Returns: Map‹Plate, RasterizedOutlineWithHoles›


Static group

▸ group(platesMap: Map‹Plate, RasterizedOutlineWithHoles›): PlateGroup[]

Defined in src/modules/kyub.core.svgObjExporter/src/export/PlateGrouper.ts:16

Parameters:

Name Type
platesMap Map‹Plate, RasterizedOutlineWithHoles›

Returns: PlateGroup[]