editor › Globals › IntersectionAvoidanceEdgeJoint
Class: IntersectionAvoidanceEdgeJoint
This joint ensures that two plates with joint edges do not intersect. To achieve this, objectA is extended and objectB is cut off.
Hierarchy
↳ IntersectionAvoidanceEdgeJoint
Index
Constructors
Properties
Methods
- _ensureAssigned
- _mergeSections
- _onObjectShapeChange
- _onObjectTransformsChange
- areSectionsReversed
- assign
- createTemporaryClone
- destroy
- determineJointDirection
- getDestroyEventEmitter
- getEnd
- getIsAssigned
- getOtherPhysicalObject
- getOtherSection
- getOutlineSection
- getOutlineSections
- getPhysicalObjects
- getRemovalDirection
- getStart
- hasOutlinePoint
- isPhysicallyConnected
- recreate
- assignFromSections
- canBeJoined
- canSectionsBeJoined
- createFromPhysicalObjects
- createFromSections
- getJointsBetween
- getRequiredPossibilities
- getSpansAcrossAssemblies
- isPointOnEdgeJoint
- performPreJoinTransformation
Constructors
constructor
+ new IntersectionAvoidanceEdgeJoint(jointPossibilityA?: JointPossibility, jointPossibilityB?: JointPossibility): IntersectionAvoidanceEdgeJoint
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: IntersectionAvoidanceEdgeJoint
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
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(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
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
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
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
Inherited from EdgeJoint.getOtherSection
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
Inherited from EdgeJoint.getOutlineSection
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]
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(): [PhysicalObject, PhysicalObject]
Inherited from Joint.getPhysicalObjects
Defined in src/model/data/Joints/Joints/Joint.ts:146
Returns: [PhysicalObject, PhysicalObject]
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
getStart
▸ getStart(): OutlinePoint | never
Inherited from EdgeJoint.getStart
Defined in src/model/data/Joints/Joints/EdgeJoint.ts:258
Returns: OutlinePoint | never
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
recreate
▸ recreate(): IntersectionAvoidanceEdgeJoint | never
Defined in src/model/data/Joints/Joints/IntersectionAvoidanceEdgeJoint.ts:29
Returns: IntersectionAvoidanceEdgeJoint | 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: any, objectB: any): EdgeJoint[]
Overrides EdgeJoint.createFromPhysicalObjects
Defined in src/model/data/Joints/Joints/IntersectionAvoidanceEdgeJoint.ts:9
Parameters:
| Name | Type |
|---|---|
objectA |
any |
objectB |
any |
Returns: EdgeJoint[]
Static createFromSections
▸ createFromSections‹JointType›(sectionA: OutlineSection, sectionB: OutlineSection): IntersectionAvoidanceEdgeJoint
Overrides EdgeJoint.createFromSections
Defined in src/model/data/Joints/Joints/IntersectionAvoidanceEdgeJoint.ts:13
Type parameters:
▪ JointType: IntersectionAvoidanceEdgeJoint
Parameters:
| Name | Type |
|---|---|
sectionA |
OutlineSection |
sectionB |
OutlineSection |
Returns: IntersectionAvoidanceEdgeJoint
▸ createFromSections‹JointType›(sectionA: OutlineSection, sectionB: OutlineSection, IntersectionAvoidanceEdgeJointClass?: Constructor‹JointType›): JointType
Overrides EdgeJoint.createFromSections
Defined in src/model/data/Joints/Joints/IntersectionAvoidanceEdgeJoint.ts:17
Type parameters:
▪ JointType: IntersectionAvoidanceEdgeJoint
Parameters:
| Name | Type |
|---|---|
sectionA |
OutlineSection |
sectionB |
OutlineSection |
IntersectionAvoidanceEdgeJointClass? |
Constructor‹JointType› |
Returns: JointType
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(): [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
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: 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