Skip to content

editorGlobalsEdgeJoint

Class: EdgeJoint

A Joint that connects two sections on edge.

Hierarchy

EdgeJoint

FingerJoint

CoplanarJoint

IntersectionAvoidanceCrossJoint

IntersectionAvoidanceEdgeJoint

Index

Constructors

Properties

Methods

Constructors

constructor

+ new EdgeJoint(jointPossibilityA?: JointPossibility, jointPossibilityB?: JointPossibility): EdgeJoint

Inherited from Joint.constructor

Defined in src/model/data/Joints/Joints/Joint.ts:72

Either supply joint possibilities in constructor, or defer it and do it later with assign()

Parameters:

Name Type
jointPossibilityA? JointPossibility
jointPossibilityB? JointPossibility

Returns: EdgeJoint

Properties

Protected Readonly destroyEventEmitter

destroyEventEmitter: EventEmitter‹void› = new EventEmitter()

Inherited from Joint.destroyEventEmitter

Defined in src/model/data/Joints/Joints/Joint.ts:72


Protected isDestroyed

isDestroyed: boolean = false

Inherited from Joint.isDestroyed

Defined in src/model/data/Joints/Joints/Joint.ts:71


Protected objectA

objectA: PhysicalObject

Inherited from Joint.objectA

Defined in src/model/data/Joints/Joints/Joint.ts:69


Protected objectB

objectB: PhysicalObject

Inherited from Joint.objectB

Defined in src/model/data/Joints/Joints/Joint.ts:70


Protected outlineSectionA

outlineSectionA: OutlineSection

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:168


Protected outlineSectionB

outlineSectionB: OutlineSection

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:169


unfoldingProperties

unfoldingProperties: IEdgeUnfoldingProperties = EdgeUnfoldingAnnotation.getDefaultUnfoldingProperties()

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:166

Methods

_ensureAssigned

_ensureAssigned(): void | never

Inherited from Joint._ensureAssigned

Defined in src/model/data/Joints/Joints/Joint.ts:122

Returns: void | never


Protected _mergeSections

_mergeSections(sectionA: OutlineSection, sectionB: OutlineSection): void

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:307

Performs actual joining logic by merging the vertices of two sections

Parameters:

Name Type
sectionA OutlineSection
sectionB OutlineSection

Returns: void


Protected _onObjectShapeChange

_onObjectShapeChange(changedObject: PhysicalObject): void

Inherited from Joint._onObjectShapeChange

Defined in src/model/data/Joints/Joints/Joint.ts:219

Method that is called when the shapes of one of the joined objects change. Can be overwritten in subclass.

Parameters:

Name Type
changedObject PhysicalObject

Returns: void


Protected _onObjectTransformsChange

_onObjectTransformsChange(changedObject: PhysicalObject): void

Inherited from Joint._onObjectTransformsChange

Defined in src/model/data/Joints/Joints/Joint.ts:211

Method that is called when the transforms of one of the joined objects change. Can be overwritten in subclass.

Parameters:

Name Type
changedObject PhysicalObject

Returns: void


areSectionsReversed

areSectionsReversed(): boolean | never

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:268

Returns: boolean | never


assign

assign(jointPossibilityA: any, jointPossibilityB: any): void

Overrides Joint.assign

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:171

Parameters:

Name Type
jointPossibilityA any
jointPossibilityB any

Returns: void


createTemporaryClone

createTemporaryClone(): Joint

Inherited from Joint.createTemporaryClone

Defined in src/model/data/Joints/Joints/Joint.ts:183

This method creates a new Joint with the two physicalObjects of this joint instance. This is useful for operations where you need a temporary joint to keep an assembly from falling apart (e.g. Joint.recreate).

Returns: Joint

the temporary joint


destroy

destroy(): void

Overrides Joint.destroy

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:234

Returns: void


determineJointDirection

determineJointDirection(section: OutlineSection): PlateSide

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:276

Returns "front" or "back" depending on where the other plate is joined to the passed plate.

Parameters:

Name Type
section OutlineSection

Returns: PlateSide


getDestroyEventEmitter

getDestroyEventEmitter(): IPublicEventEmitterInterface‹void›

Inherited from Joint.getDestroyEventEmitter

Defined in src/model/data/Joints/Joints/Joint.ts:86

Returns: IPublicEventEmitterInterface‹void›


getEnd

getEnd(): OutlinePoint | never

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:263

Returns: OutlinePoint | never


getIsAssigned

getIsAssigned(): boolean

Inherited from Joint.getIsAssigned

Defined in src/model/data/Joints/Joints/Joint.ts:118

Returns: boolean

true, if the joint has been assigned to two objects


getOtherPhysicalObject

getOtherPhysicalObject(thisPhysicalObject: PhysicalObject): PhysicalObject | never

Inherited from Joint.getOtherPhysicalObject

Defined in src/model/data/Joints/Joints/Joint.ts:131

Convenience function to get the 'other' physical object that is connected to this joint

Parameters:

Name Type
thisPhysicalObject PhysicalObject

Returns: PhysicalObject | never


getOtherSection

getOtherSection(section: OutlineSection): OutlineSection | never

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:222

Convenience Function to get the other OutlineSection

Parameters:

Name Type
section OutlineSection

Returns: OutlineSection | never


getOutlineSection

getOutlineSection(physicalObject: any): OutlineSection | never

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:197

Parameters:

Name Type
physicalObject any

Returns: OutlineSection | never

the outline section that is attached


getOutlineSections

getOutlineSections(): [OutlineSection, OutlineSection]

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:190

Returns: [OutlineSection, OutlineSection]

the two OutlineSections of this joint


getPhysicalObjects

getPhysicalObjects(): [PhysicalObject, PhysicalObject]

Inherited from Joint.getPhysicalObjects

Defined in src/model/data/Joints/Joints/Joint.ts:146

Returns: [PhysicalObject, PhysicalObject]


getRemovalDirection

getRemovalDirection(section: OutlineSection): IDirectionSpace

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:283

Parameters:

Name Type
section OutlineSection

Returns: IDirectionSpace


getStart

getStart(): OutlinePoint | never

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:258

Returns: OutlinePoint | never


hasOutlinePoint

hasOutlinePoint(outlinePoint: OutlinePoint): boolean

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:212

Parameters:

Name Type
outlinePoint OutlinePoint

Returns: boolean

if the given point is merged with this joint's first section


isPhysicallyConnected

isPhysicallyConnected(): boolean | never

Overrides Joint.isPhysicallyConnected

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:253

Checks if vertices of both sections are still merged/at the same position

Returns: boolean | never


recreate

recreate(): void

Inherited from Joint.recreate

Defined in src/model/data/Joints/Joints/Joint.ts:194

This method creates a new instance of this joint while destroying the old instance. The new instance is created with the same parameters as this one. This is used in cases where the underlying data changes, but the references are still valid. E.g. an outline section moves between physicalObjects and the joint needs to be recreated with the new objects. However the referenced outline section is still valid.

Returns: void


Static Private _getSectionsThatCanBeJoined

_getSectionsThatCanBeJoined(plateA: Plate, plateB: Plate, onlyConvex: boolean): Array‹[OutlineSection, OutlineSection]›

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:149

Parameters:

Name Type
plateA Plate
plateB Plate
onlyConvex boolean

Returns: Array‹[OutlineSection, OutlineSection]›


Static assignFromSections

assignFromSections(outlineSectionA: OutlineSection, outlineSectionB: OutlineSection, jointInstance: EdgeJoint): void

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:132

Parameters:

Name Type
outlineSectionA OutlineSection
outlineSectionB OutlineSection
jointInstance EdgeJoint

Returns: void


Static canBeJoined

canBeJoined(objectA: PhysicalObject, objectB: PhysicalObject, params: object): boolean

Overrides Joint.canBeJoined

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:107

Parameters:

objectA: PhysicalObject

objectB: PhysicalObject

Default value params: object= { onlyConvex: false }

Name Type
onlyConvex boolean

Returns: boolean


Static canSectionsBeJoined

canSectionsBeJoined(sectionA: OutlineSection, sectionB: OutlineSection, onlyConvex: boolean, allowRejoin: boolean): boolean

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:41

Checks whether outlineSections are identical, already have joints to determine if they can be joined.

Parameters:

Name Type Default Description
sectionA OutlineSection - to be checked
sectionB OutlineSection - second outline section to be checked
onlyConvex boolean false (option) true if only convex edges should be considered, default is false
allowRejoin boolean false (option) true if already joined sections should be considered join-able as well, default is false

Returns: boolean

true if outlineSections can be joined


Static createFromPhysicalObjects

createFromPhysicalObjects(objectA: Plate, objectB: Plate, EdgeJointClass: any, __namedParameters: object): EdgeJoint[]

Overrides Joint.createFromPhysicalObjects

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:86

Parameters:

objectA: Plate

objectB: Plate

EdgeJointClass: any

Default value __namedParameters: object= {}

Name Type Default
onlyConvex boolean false

Returns: EdgeJoint[]


Static createFromSections

createFromSectionsJointType›(outlineSectionA: OutlineSection, outlineSectionB: OutlineSection, EdgeJointClass: Constructor‹JointType›, unfoldingProperties: IEdgeUnfoldingProperties): JointType

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:120

Creates an EdgeJoint instance based on two OutlineSections

Type parameters:

JointType: EdgeJoint

Parameters:

Name Type Default
outlineSectionA OutlineSection -
outlineSectionB OutlineSection -
EdgeJointClass Constructor‹JointType› -
unfoldingProperties IEdgeUnfoldingProperties EdgeUnfoldingAnnotation.getDefaultUnfoldingProperties()

Returns: JointType


Static getJointsBetween

getJointsBetweenT›(plateA: Plate, plateB: Plate, type: Constructor‹T›): T[]

Inherited from Joint.getJointsBetween

Defined in src/model/data/Joints/Joints/Joint.ts:11

Type parameters:

T: Joint

Parameters:

Name Type
plateA Plate
plateB Plate
type Constructor‹T›

Returns: T[]


Static getRequiredPossibilities

getRequiredPossibilities(): [JointPossibility, JointPossibility]

Inherited from Joint.getRequiredPossibilities

Defined in src/model/data/Joints/Joints/Joint.ts:21

Defines the required JointPossibilities in order to instantiate this kind of Joint. Override in subclass.

Returns: [JointPossibility, JointPossibility]

an array with exactly two JointPossibility (sub)classes.


Static getSpansAcrossAssemblies

getSpansAcrossAssemblies(): boolean

Inherited from Joint.getSpansAcrossAssemblies

Defined in src/model/data/Joints/Joints/Joint.ts:65

Returns: boolean

whether joints of this class span across assemblies. In that case, physical objects will be linked with physics constraints rather than merging assemblies during joining


Static isPointOnEdgeJoint

isPointOnEdgeJoint(point: OutlinePoint, type: Constructor‹EdgeJoint›): boolean

Defined in src/model/data/Joints/Joints/EdgeJoint.ts:25

Parameters:

Name Type Default
point OutlinePoint -
type Constructor‹EdgeJoint EdgeJoint

Returns: boolean


Static performPreJoinTransformation

performPreJoinTransformation(jointPossibilityA: JointPossibility, jointPossibilityB: JointPossibility): void

Inherited from Joint.performPreJoinTransformation

Defined in src/model/data/Joints/Joints/Joint.ts:29

Translates the objects in order to make sure they can be joined. Override in subclass with actual translation logic.

Parameters:

Name Type
jointPossibilityA JointPossibility
jointPossibilityB JointPossibility

Returns: void