editor › Globals › EmbedJoint
Class: EmbedJoint
Joint that aligns objectA to objectB Updates the transforms of objectA based on objectB's transforms and the alignments specified.
Hierarchy
↳ EmbedJoint
Index
Constructors
Properties
- additions
- alignmentSystem
- cutouts
- cutoutsFilename
- destroyEventEmitter
- isDestroyed
- objectA
- objectB
- ornament
- plateSide
Methods
- _addOrnament
- _alignObject
- _ensureAssigned
- _onObjectShapeChange
- _onObjectTransformsChange
- assign
- createTemporaryClone
- destroy
- getAdditions
- getAlignmentSystem
- getCutouts
- getCutoutsFilename
- getDestroyEventEmitter
- getExternalObject
- getIsAssigned
- getOrnament
- getOtherPhysicalObject
- getPhysicalObjects
- getPlateSide
- isPhysicallyConnected
- recreate
- setOrnament
- canBeJoined
- createFromPhysicalObjects
- getJointsBetween
- getRequiredPossibilities
- getSpansAcrossAssemblies
- performPreJoinTransformation
Constructors
constructor
+ new EmbedJoint(jointPossibilityA?: JointPossibility, jointPossibilityB?: JointPossibility): EmbedJoint
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: EmbedJoint
Properties
Protected additions
• additions: any[]
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:81
Protected alignmentSystem
• alignmentSystem: AlignmentSystem
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:79
Protected cutouts
• cutouts: any[]
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:80
Protected cutoutsFilename
• cutoutsFilename: string
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:82
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
Defined in src/model/data/Joints/Joints/Joint.ts:69
Protected objectB
• objectB: PhysicalObject
Defined in src/model/data/Joints/Joints/Joint.ts:70
Protected ornament
• ornament: Ornament
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:84
Protected plateSide
• plateSide: PlateSide
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:83
Methods
Private _addOrnament
▸ _addOrnament(cutoutsFilename: string, engravingsFilename: string, kindOfResource: string, resourceName: string, objectAPosition: ReadonlyVector3, objectARotation: ReadonlyQuaternion): void
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:242
Parameters:
| Name | Type |
|---|---|
cutoutsFilename |
string |
engravingsFilename |
string |
kindOfResource |
string |
resourceName |
string |
objectAPosition |
ReadonlyVector3 |
objectARotation |
ReadonlyQuaternion |
Returns: void
Private _alignObject
▸ _alignObject(targetObject: PhysicalObject): void
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:310
Parameters:
| Name | Type |
|---|---|
targetObject |
PhysicalObject |
Returns: void
_ensureAssigned
▸ _ensureAssigned(): void | never
Inherited from Joint._ensureAssigned
Defined in src/model/data/Joints/Joints/Joint.ts:122
Returns: void | never
Protected _onObjectShapeChange
▸ _onObjectShapeChange(changedObject: PhysicalObject): void
Overrides Joint._onObjectShapeChange
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:238
Parameters:
| Name | Type |
|---|---|
changedObject |
PhysicalObject |
Returns: void
Protected _onObjectTransformsChange
▸ _onObjectTransformsChange(changedObject: PhysicalObject): void
Overrides Joint._onObjectTransformsChange
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:203
Updates the transforms of objectA based on objectB's transforms and the specified alignments
Parameters:
| Name | Type |
|---|---|
changedObject |
PhysicalObject |
Returns: void
assign
▸ assign(jointPossibilityA: PointJointPossibility, jointPossibilityB: SurfaceJointPossibility, alignmentSystem?: AlignmentSystem): void
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:90
optional: Stores position and rotation for this joint through a list of alignments. will be created if not supplied
Parameters:
| Name | Type |
|---|---|
jointPossibilityA |
PointJointPossibility |
jointPossibilityB |
SurfaceJointPossibility |
alignmentSystem? |
AlignmentSystem |
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 | never
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:159
Returns: void | never
getAdditions
▸ getAdditions(): any[]
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:151
Returns: any[]
getAlignmentSystem
▸ getAlignmentSystem(): AlignmentSystem
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:196
Returns: AlignmentSystem
getCutouts
▸ getCutouts(): any[]
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:147
Returns: any[]
getCutoutsFilename
▸ getCutoutsFilename(): string
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:177
Returns: string
file name of a SVG file that defines the necessary cutouts to embed objectA
getDestroyEventEmitter
▸ getDestroyEventEmitter(): IPublicEventEmitterInterface‹void›
Inherited from Joint.getDestroyEventEmitter
Defined in src/model/data/Joints/Joints/Joint.ts:86
Returns: IPublicEventEmitterInterface‹void›
getExternalObject
▸ getExternalObject(): PhysicalObject
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:181
Returns: PhysicalObject
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
getOrnament
▸ getOrnament(): Ornament
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:155
Returns: Ornament
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
getPhysicalObjects
▸ getPhysicalObjects(): [PhysicalObject, PhysicalObject]
Inherited from Joint.getPhysicalObjects
Defined in src/model/data/Joints/Joints/Joint.ts:146
Returns: [PhysicalObject, PhysicalObject]
getPlateSide
▸ getPlateSide(): PlateSide
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:188
Returns: PlateSide
either 'front' or 'back', depending on which side the joint is attached to
isPhysicallyConnected
▸ isPhysicallyConnected(): boolean
Overrides Joint.isPhysicallyConnected
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:169
Returns: boolean
recreate
▸ recreate(): void
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
setOrnament
▸ setOrnament(ornament: Ornament | null): void
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:192
Parameters:
| Name | Type |
|---|---|
ornament |
Ornament | null |
Returns: void
Static canBeJoined
▸ canBeJoined(physicalObjectA: PhysicalObject, physicalObjectB: PhysicalObject): boolean
Overrides Joint.canBeJoined
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:75
Parameters:
| Name | Type |
|---|---|
physicalObjectA |
PhysicalObject |
physicalObjectB |
PhysicalObject |
Returns: boolean
Static createFromPhysicalObjects
▸ createFromPhysicalObjects(physicalObjectA: any, physicalObjectB: any): EmbedJoint[]
Overrides Joint.createFromPhysicalObjects
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:46
Parameters:
| Name | Type |
|---|---|
physicalObjectA |
any |
physicalObjectB |
any |
Returns: EmbedJoint[]
Static getJointsBetween
▸ getJointsBetween‹T›(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(): [PointJointPossibility, SurfaceJointPossibility]
Overrides Joint.getRequiredPossibilities
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:31
See Joint.getRequiredPossibilities Based on Embed Joint functionality (Point + Surface JointPossibilities)
Returns: [PointJointPossibility, SurfaceJointPossibility]
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 performPreJoinTransformation
▸ performPreJoinTransformation(): void
Overrides Joint.performPreJoinTransformation
Defined in src/model/data/Joints/Joints/EmbedJoint.ts:40
No pre-join translation necessary for joints that are aligned by constraints ToDo: Perform preJoinTranslation only for joints not aligned by constraints; then remove this method See general-issues#245
Returns: void