editor › Globals › PhysicalPlateConnectivityTester
Class: PhysicalPlateConnectivityTester
Determines how two plates are connected (physically) with each other The algorithm for non-coplanar plates is based on the fact that non-coplanar plates can only intersect in one line. This means, that instead of fully intersecting the plates with each other like it was done so far, which would be O(n * m), where n and m are the number of section in their outlines, we only intersect the intersection line with the plates in 2D, which is O(n + m), and thus we get a huge performance gain for plates with many lines. The first thing we do is getting the intersection line in 3D (infinite line). Then we intersect this line with the plates in 2D, as the intersection line is in the plane of both plates. Then we take these intersections to determine where the intersection line is inside, outside or on a section of the plates. Then we use this information to get the joints that can be created.
Hierarchy
- PhysicalPlateConnectivityTester
Index
Properties
Methods
- _areNeighbors
- _getJointPosition
- _pointDistanceToLine2D
- _sideOfLine2D
- getInsideOutsideFromIntersections
- getIntersectionsWithOutline
- getIntersectionsWithPlate
- getJointPositions
- getJointPositionsFromInsideOutside
- getMinMaxCoefficients
- shouldCheckPlates
Properties
Static Private tolerance
▪ tolerance: number = Config.getAndWatch
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:43
Static Private vec
▪ vec: Vector3‹› = new Vector3()
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:49
Methods
Static Private _areNeighbors
▸ _areNeighbors(section1: OutlineSection, section2: OutlineSection): boolean
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:387
Parameters:
| Name | Type |
|---|---|
section1 |
OutlineSection |
section2 |
OutlineSection |
Returns: boolean
Static Private _getJointPosition
▸ _getJointPosition(insideOutsideA: LinePosition, insideOutsideB: LinePosition, coefficient1: number, coefficient2: number, line: Line3): IJointPosition
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:337
Parameters:
| Name | Type |
|---|---|
insideOutsideA |
LinePosition |
insideOutsideB |
LinePosition |
coefficient1 |
number |
coefficient2 |
number |
line |
Line3 |
Returns: IJointPosition
Static Private _pointDistanceToLine2D
▸ _pointDistanceToLine2D(line: Line3, point: Vector3): number
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:397
Parameters:
| Name | Type |
|---|---|
line |
Line3 |
point |
Vector3 |
Returns: number
Static Private _sideOfLine2D
▸ _sideOfLine2D(line: Line3, point: Vector3): boolean
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:391
Parameters:
| Name | Type |
|---|---|
line |
Line3 |
point |
Vector3 |
Returns: boolean
Static getInsideOutsideFromIntersections
▸ getInsideOutsideFromIntersections(intersections: Intersection[], outerBounds: IBounds): LinePosition[]
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:175
An "InsideOutside" describes a part of the intersection line in relation to the plate. "inside" means that the line is inside the plate, "outside" means that the line is outside the plate, "section" means that the line is on a section. The "InsideOutsides" only store their starting coefficient, the ending coefficient is determined by the next "InsideOutside".
Parameters:
| Name | Type |
|---|---|
intersections |
Intersection[] |
outerBounds |
IBounds |
Returns: LinePosition[]
Static getIntersectionsWithOutline
▸ getIntersectionsWithOutline(plate: Outline3D, line: Line3): Intersection[]
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:95
Parameters:
| Name | Type |
|---|---|
plate |
Outline3D |
line |
Line3 |
Returns: Intersection[]
Static getIntersectionsWithPlate
▸ getIntersectionsWithPlate(plate: Plate, line: Line3): Intersection[]
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:91
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
line |
Line3 |
Returns: Intersection[]
Static getJointPositions
▸ getJointPositions(plateA: Plate, plateB: Plate): IJointPosition[]
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:66
Parameters:
| Name | Type |
|---|---|
plateA |
Plate |
plateB |
Plate |
Returns: IJointPosition[]
Static getJointPositionsFromInsideOutside
▸ getJointPositionsFromInsideOutside(insideOutsideA: LinePosition[], insideOutsideB: LinePosition[], line: Line3): IJointPosition[]
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:258
This method returns the joint positions from two InsideOutside streams. Example:
A: x--Outside--x-------Section-------x---Outside---x
B: x-------Section--------x---------Inside--------x
Joints: x---Finger--x---Tee---x
Parameters:
| Name | Type |
|---|---|
insideOutsideA |
LinePosition[] |
insideOutsideB |
LinePosition[] |
line |
Line3 |
Returns: IJointPosition[]
Static getMinMaxCoefficients
▸ getMinMaxCoefficients(intersectionsA: Intersection[], intersectionsB: Intersection[]): IBounds
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:158
Parameters:
| Name | Type |
|---|---|
intersectionsA |
Intersection[] |
intersectionsB |
Intersection[] |
Returns: IBounds
Static shouldCheckPlates
▸ shouldCheckPlates(plateA: Plate, plateB: Plate): boolean
Defined in src/model/data/PhysicalObject/PhysicalPlateConnectivityTester.ts:52
Parameters:
| Name | Type |
|---|---|
plateA |
Plate |
plateB |
Plate |
Returns: boolean