Skip to content

editorGlobalsAssemblyMatcher

Class: AssemblyMatcher

Find joints and possible configurations that connect two assemblies.

Hierarchy

  • AssemblyMatcher

Index

Properties

Methods

Properties

Static Private hashMap

hashMap: JointHashStorage

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:18

Methods

Static Private _applySelectionDistanceBonus

_applySelectionDistanceBonus(selection: IAssembleSelection, matches: JointMatch[], useThisJoint: boolean, useSecondPlate: boolean): void

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:117

Parameters:

Name Type Default
selection IAssembleSelection -
matches JointMatch[] -
useThisJoint boolean -
useSecondPlate boolean false

Returns: void


Static Private _extractJoints

_extractJoints(originMeshes: IAssemblingSvgSurface[], destinationMeshes: IAssemblingSvgSurface[]): object

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:98

Parameters:

Name Type
originMeshes IAssemblingSvgSurface[]
destinationMeshes IAssemblingSvgSurface[]

Returns: object

  • destinationJoints: Joint‹AtomicPattern‹››[]

  • jointToMeshMap: Map‹string, IAssemblingSvgSurface

  • sourceJoints: Joint‹AtomicPattern‹››[]


Static getHash

getHash(): JointHashStorage‹›

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:20

Returns: JointHashStorage‹›


Static match

match(originMeshes: IAssemblingSvgSurface[], destinationMeshes: IAssemblingSvgSurface[], selection?: object, virtualize?: boolean): CombineOperation[]

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:36

Finds matches and their configurations. One match can have many configurations (flipped, rotated) depending on the joint type.

Parameters:

originMeshes: IAssemblingSvgSurface[]

-

destinationMeshes: IAssemblingSvgSurface[]

-

Optional selection: object

Is used to calculate a bonus for matches that were more likely intended based on the interaction location.

Name Type
destination IAssembleSelection
origin IAssembleSelection

Optional virtualize: boolean

Returns: CombineOperation[]


Static matchJoints

matchJoints(origin: Array‹Joint‹AtomicPattern››, destination: Array‹Joint‹AtomicPattern››): JointMatch[]

Defined in src/modules/kyub.core.plateImport/src/AssemblyMatcher.ts:82

Parameters:

Name Type
origin Array‹Joint‹AtomicPattern››
destination Array‹Joint‹AtomicPattern››

Returns: JointMatch[]