editor › Globals › CellMembraneJoint
Class: CellMembraneJoint
This Joint connects 2 plates split by a CellMembrane. The plates are stored in objectA and objectB and their OutlineSections in outlineSectionA and outlineSectionB middleSection contains the section from the connected membrane which is needed for the correct placement of Shape Changes
3d-Sketch:
______________ ____________
/ / / /
/ A / / B /
/ / / /
/ / / /
------------- ||------------
|| /
|| / <-- Middle
||/
Hierarchy
↳ CellMembraneJoint
Index
Constructors
Properties
- destroyEventEmitter
- isDestroyed
- middleSection
- objectA
- objectB
- outlineSectionA
- outlineSectionB
- unfoldingProperties
Methods
- _ensureAssigned
- _mergeSections
- _onObjectShapeChange
- _onObjectTransformsChange
- areSectionsReversed
- assign
- createTemporaryClone
- destroy
- determineJointDirection
- getCutoutPriorityPlate
- getDestroyEventEmitter
- getEnd
- getIsAssigned
- getJoinedSection
- getJoinedSurfacePlate
- getMasterPlate
- getMiddleSection
- getOtherPhysicalObject
- getOtherSection
- getOutlineSection
- getOutlineSections
- getPhysicalObjects
- getPlate
- getPlates
- getRemovalDirection
- getSafetyMargin
- getStart
- getStrictlyEnforceMargin
- getWidth
- hasFingerInCorner
- hasOutlinePoint
- isPhysicallyConnected
- isValid
- recreate
- recreateWithDifferentObject
- sameDirectionWithA
- setCutoutPriorityPlate
- setMasterPlate
- setMiddleSection
- setSafetyMargin
- setStrictlyEnforceMargin
- _checkLengthTolerance
- assignFromSections
- canBeJoined
- canSectionsBeJoined
- createFromPhysicalObjects
- createFromSections
- createFromSectionsWithMiddle
- getJointsBetween
- getRequiredPossibilities
- getSpansAcrossAssemblies
- isPointOnEdgeJoint
- performPreJoinTransformation
Constructors
constructor
+ new CellMembraneJoint(jointPossibilityA?: JointPossibility, jointPossibilityB?: JointPossibility): CellMembraneJoint
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: CellMembraneJoint
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
Private middleSection
• middleSection: OutlineSection
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:48
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 outlineSectionA
• outlineSectionA: OutlineSection
Inherited from EdgeJoint.outlineSectionA
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:168
Protected outlineSectionB
• outlineSectionB: OutlineSection
Inherited from EdgeJoint.outlineSectionB
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:169
unfoldingProperties
• unfoldingProperties: IEdgeUnfoldingProperties = EdgeUnfoldingAnnotation.getDefaultUnfoldingProperties()
Inherited from EdgeJoint.unfoldingProperties
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
Inherited from EdgeJoint._mergeSections
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(): void
Inherited from FingerJoint._onObjectShapeChange
Overrides Joint._onObjectShapeChange
Defined in src/model/data/Joints/Joints/FingerJoint.ts:251
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
Inherited from EdgeJoint.areSectionsReversed
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:268
Returns: boolean | never
assign
▸ assign(jointPossibilityA: any, jointPossibilityB: any): void
Inherited from EdgeJoint.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
Inherited from EdgeJoint.destroy
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:234
Returns: void
determineJointDirection
▸ determineJointDirection(section: OutlineSection): PlateSide
Inherited from EdgeJoint.determineJointDirection
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
getCutoutPriorityPlate
▸ getCutoutPriorityPlate(outlinePoint: OutlinePoint): Plate | never
Inherited from FingerJoint.getCutoutPriorityPlate
Defined in src/model/data/Joints/Joints/FingerJoint.ts:153
Get the plate which gets a cutout when two collide near the corner determined by outlinePoint
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | corner in which the master plate will be updated |
Returns: Plate | never
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
Inherited from EdgeJoint.getEnd
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
getJoinedSection
▸ getJoinedSection(): OutlineSection
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:128
Returns: OutlineSection
getJoinedSurfacePlate
▸ getJoinedSurfacePlate(): PhysicalObject
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:132
Returns: PhysicalObject
getMasterPlate
▸ getMasterPlate(outlinePoint: OutlinePoint): Plate | never
Inherited from FingerJoint.getMasterPlate
Defined in src/model/data/Joints/Joints/FingerJoint.ts:134
Get the plate which gets two fingers in the corner determined by outlinePoint
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | corner in which the master plate will be retrieved |
Returns: Plate | never
master plate in this corner or null
getMiddleSection
▸ getMiddleSection(): OutlineSection
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:50
Returns: OutlineSection
getOtherPhysicalObject
▸ getOtherPhysicalObject(thisPhysicalObject: PhysicalObject): PhysicalObject
Overrides Joint.getOtherPhysicalObject
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:86
Parameters:
| Name | Type |
|---|---|
thisPhysicalObject |
PhysicalObject |
Returns: PhysicalObject
getOtherSection
▸ getOtherSection(section: any): OutlineSection
Overrides EdgeJoint.getOtherSection
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:94
Parameters:
| Name | Type |
|---|---|
section |
any |
Returns: OutlineSection
getOutlineSection
▸ getOutlineSection(physicalObject: Plate): OutlineSection
Overrides EdgeJoint.getOutlineSection
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:61
Parameters:
| Name | Type |
|---|---|
physicalObject |
Plate |
Returns: OutlineSection
getOutlineSections
▸ getOutlineSections(): [OutlineSection, OutlineSection]
Inherited from EdgeJoint.getOutlineSections
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:190
Returns: [OutlineSection, OutlineSection]
the two OutlineSections of this joint
getPhysicalObjects
▸ getPhysicalObjects(): [Plate, Plate]
Inherited from FingerJoint.getPhysicalObjects
Overrides Joint.getPhysicalObjects
Defined in src/model/data/Joints/Joints/FingerJoint.ts:125
getPlate
▸ getPlate(section: OutlineSection): Plate
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:69
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: Plate
getPlates
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:108
getRemovalDirection
▸ getRemovalDirection(section: OutlineSection): IDirectionSpace
Inherited from EdgeJoint.getRemovalDirection
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:283
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: IDirectionSpace
getSafetyMargin
▸ getSafetyMargin(outlinePoint: OutlinePoint): number | never
Inherited from FingerJoint.getSafetyMargin
Defined in src/model/data/Joints/Joints/FingerJoint.ts:185
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | point representing one end of the joint |
Returns: number | never
the safety margin at this end of the joint
getStart
▸ getStart(): OutlinePoint | never
Inherited from EdgeJoint.getStart
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:258
Returns: OutlinePoint | never
getStrictlyEnforceMargin
▸ getStrictlyEnforceMargin(outlinePoint: OutlinePoint): boolean | never
Inherited from FingerJoint.getStrictlyEnforceMargin
Defined in src/model/data/Joints/Joints/FingerJoint.ts:199
Parameters:
| Name | Type |
|---|---|
outlinePoint |
OutlinePoint |
Returns: boolean | never
getWidth
▸ getWidth(): number
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:81
Returns: number
hasFingerInCorner
▸ hasFingerInCorner(outlinePoint: OutlinePoint, plate: Plate): boolean | never
Inherited from FingerJoint.hasFingerInCorner
Defined in src/model/data/Joints/Joints/FingerJoint.ts:164
Check whether the joint has a finger on the given plate in the corner of outlinePoint
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | point representing one end of the joint |
plate |
Plate | determines which plate's side of the joint is checked |
Returns: boolean | never
whether there is a finger (true) or a cutout (false)
hasOutlinePoint
▸ hasOutlinePoint(outlinePoint: OutlinePoint): boolean
Inherited from EdgeJoint.hasOutlinePoint
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
Inherited from EdgeJoint.isPhysicallyConnected
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
isValid
▸ isValid(): boolean | never
Inherited from FingerJoint.isValid
Defined in src/model/data/Joints/Joints/FingerJoint.ts:207
Returns: boolean | never
whether this joint's OutlinePoints are properly merged
recreate
▸ recreate(): CellMembraneJoint
Overrides FingerJoint.recreate
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:115
Destroys this CellMembraneJoint and instantiates a new CellMembraneJoint with the same outline sections.
Returns: CellMembraneJoint
recreateWithDifferentObject
▸ recreateWithDifferentObject(objectToBeReplaced: Plate, newObject: Plate): FingerJoint | never
Inherited from FingerJoint.recreateWithDifferentObject
Defined in src/model/data/Joints/Joints/FingerJoint.ts:231
Destroys this FingerJoint and instantiates a new FingerJoint with a different object at the same outline section.
Parameters:
| Name | Type |
|---|---|
objectToBeReplaced |
Plate |
newObject |
Plate |
Returns: FingerJoint | never
sameDirectionWithA
▸ sameDirectionWithA(section: OutlineSection): boolean
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:101
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
Returns: boolean
setCutoutPriorityPlate
▸ setCutoutPriorityPlate(outlinePoint: OutlinePoint, priorityPlate: Plate): void | never
Inherited from FingerJoint.setCutoutPriorityPlate
Defined in src/model/data/Joints/Joints/FingerJoint.ts:144
Set the plate which gets a cutout when two collide near the corner determined by outlinePoint
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | corner in which the master plate will be updated |
priorityPlate |
Plate | will be set as new cutout priority plate |
Returns: void | never
setMasterPlate
▸ setMasterPlate(outlinePoint: OutlinePoint, masterPlate: Plate): void | never
Inherited from FingerJoint.setMasterPlate
Defined in src/model/data/Joints/Joints/FingerJoint.ts:120
Set the plate which gets two fingers in the corner determined by outlinePoint
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | corner in which the master plate will be updated |
masterPlate |
Plate | will be set as new master |
Returns: void | never
setMiddleSection
▸ setMiddleSection(middleSection: OutlineSection): void
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:54
Parameters:
| Name | Type |
|---|---|
middleSection |
OutlineSection |
Returns: void
setSafetyMargin
▸ setSafetyMargin(outlinePoint: OutlinePoint, margin: number): void | never
Inherited from FingerJoint.setSafetyMargin
Defined in src/model/data/Joints/Joints/FingerJoint.ts:175
Set the safety margin for this joint in the given corner
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | point representing one end of the joint |
margin |
number | the margin to set |
Returns: void | never
setStrictlyEnforceMargin
▸ setStrictlyEnforceMargin(outlinePoint: OutlinePoint, strictlyEnforceMargin: boolean): void | never
Inherited from FingerJoint.setStrictlyEnforceMargin
Defined in src/model/data/Joints/Joints/FingerJoint.ts:194
Parameters:
| Name | Type | Description |
|---|---|---|
outlinePoint |
OutlinePoint | point representing one end of the joint |
strictlyEnforceMargin |
boolean | Whether both plates need to have cutouts at this end |
Returns: void | never
Static _checkLengthTolerance
▸ _checkLengthTolerance(sectionA: OutlineSection, sectionB: OutlineSection): void | never
Inherited from FingerJoint._checkLengthTolerance
Defined in src/model/data/Joints/Joints/FingerJoint.ts:60
Checks if both sections have the same length in order to be joined. Throws an error if not
Parameters:
| Name | Type |
|---|---|
sectionA |
OutlineSection |
sectionB |
OutlineSection |
Returns: void | never
Static assignFromSections
▸ assignFromSections(outlineSectionA: OutlineSection, outlineSectionB: OutlineSection, jointInstance: EdgeJoint): void
Inherited from EdgeJoint.assignFromSections
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
Inherited from EdgeJoint.canBeJoined
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
Inherited from EdgeJoint.canSectionsBeJoined
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, JointClass: FingerJoint): EdgeJoint‹›[]
Inherited from FingerJoint.createFromPhysicalObjects
Overrides EdgeJoint.createFromPhysicalObjects
Defined in src/model/data/Joints/Joints/FingerJoint.ts:29
Parameters:
| Name | Type | Default |
|---|---|---|
objectA |
Plate | - |
objectB |
Plate | - |
JointClass |
FingerJoint | FingerJoint |
Returns: EdgeJoint‹›[]
Static createFromSections
▸ createFromSections(outlineSectionA: OutlineSection, outlineSectionB: OutlineSection): CellMembraneJoint
Overrides FingerJoint.createFromSections
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:41
Parameters:
| Name | Type |
|---|---|
outlineSectionA |
OutlineSection |
outlineSectionB |
OutlineSection |
Returns: CellMembraneJoint
Static createFromSectionsWithMiddle
▸ createFromSectionsWithMiddle(outlineSectionA: OutlineSection, outlineSectionB: OutlineSection, middleSection: OutlineSection): CellMembraneJoint
Defined in src/model/data/Joints/Joints/CellMembraneJoint.ts:29
Parameters:
| Name | Type |
|---|---|
outlineSectionA |
OutlineSection |
outlineSectionB |
OutlineSection |
middleSection |
OutlineSection |
Returns: CellMembraneJoint
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(): [EdgeJointPossibility, EdgeJointPossibility]
Inherited from FingerJoint.getRequiredPossibilities
Overrides Joint.getRequiredPossibilities
Defined in src/model/data/Joints/Joints/FingerJoint.ts:33
Returns: [EdgeJointPossibility, EdgeJointPossibility]
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
Inherited from EdgeJoint.isPointOnEdgeJoint
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: any, jointPossibilityB: any): void
Inherited from FingerJoint.performPreJoinTransformation
Overrides Joint.performPreJoinTransformation
Defined in src/model/data/Joints/Joints/FingerJoint.ts:41
Moves object A onto object B so that their edge matches and both objects have a 90° edge angle to each other
Parameters:
| Name | Type |
|---|---|
jointPossibilityA |
any |
jointPossibilityB |
any |
Returns: void