editor › Globals › OutlineLine
Class: OutlineLine
Straight line connecting two OutlinePoints.
Hierarchy
↳ OutlineLine
Index
Properties
Methods
- clearEdgeJoint
- clearOutline
- clearTeeJoint
- clone
- distanceToPoint
- distanceToPoint2D
- equalsSection
- getAdjacentSectionAt
- getCenterPosition
- getCenterPosition2D
- getDirection
- getDirection2D
- getEdgeJoint
- getEnd
- getInterpolatedPosition
- getInterpolatedPosition2D
- getJoinedSection
- getJoint
- getJointPossibility
- getJoints
- getLength
- getNextSection
- getNormal
- getNormal2D
- getOtherPoint
- getOutline
- getOutlinePoint
- getPlate
- getPrevSection
- getStart
- getTangent2DAt
- getTangentAt
- getTeeJoint
- hasSameDirectionAsJoinedSection
- intersectLine
- intersectLineSegment
- intersectPlane
- nearestOwnPointTo
- nearestOwnPointTo2D
- overlapsSection
- rasterize
- reverse
- setEdgeJoint
- setEnd
- setOutline
- setStart
- setTeeJoint
- toArray
- toArrayOfPositions
- translate
Properties
Protected edgeJoint
• edgeJoint: EdgeJoint | null = null
Inherited from OutlineLine.edgeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:30
EdgeJoint connection to some other OutlineSection
Protected end
• end: OutlinePoint | null = null
Inherited from OutlineLine.end
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:27
End OutlinePoint
Protected outline
• outline: Outline | null = null
Inherited from OutlineLine.outline
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:21
Outline this section belongs to
Protected start
• start: OutlinePoint | null = null
Inherited from OutlineLine.start
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:24
Start OutlinePoint
Protected teeJoint
• teeJoint: TeeJoint | null = null
Inherited from OutlineLine.teeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:33
TeeJoint connection to some other plate
Methods
clearEdgeJoint
▸ clearEdgeJoint(): void
Inherited from OutlineLine.clearEdgeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:329
Clears the assigned Edge joint. Should only be called by the associated EdgeJoint itself.
Returns: void
clearOutline
▸ clearOutline(): void
Inherited from OutlineLine.clearOutline
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:151
Clears the reference to the outline. This method should only be used by the Outline
Returns: void
clearTeeJoint
▸ clearTeeJoint(): void
Inherited from OutlineLine.clearTeeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:336
Clears the assigned TeeJoint. Should only be called by the associated TeeJoint itself.
Returns: void
clone
▸ clone(): OutlineLine
Overrides OutlineSection.clone
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:98
Returns: OutlineLine
distanceToPoint
▸ distanceToPoint(point: Vector3, clampToLine: boolean): number
Overrides OutlineSection.distanceToPoint
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:22
Parameters:
| Name | Type | Default |
|---|---|---|
point |
Vector3 | - |
clampToLine |
boolean | true |
Returns: number
distanceToPoint2D
▸ distanceToPoint2D(point: Vector3): number
Overrides OutlineSection.distanceToPoint2D
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:31
Parameters:
| Name | Type |
|---|---|
point |
Vector3 |
Returns: number
equalsSection
▸ equalsSection(otherSection: OutlineSection, sameAssembly: boolean): boolean
Inherited from OutlineLine.equalsSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:452
Determine if this section is equal to otherSection in positions of start and end point in 3D.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
otherSection |
OutlineSection | - | - |
sameAssembly |
boolean | true | If true, the two sections will be considered to be in the same assembly coordinate system. Defaults to true. |
Returns: boolean
Whether the sections are equal in positions
getAdjacentSectionAt
▸ getAdjacentSectionAt(point: OutlinePoint): OutlineSection | null
Inherited from OutlineLine.getAdjacentSectionAt
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:398
Gets the next or prev section, depending on the outlinePoint provided to "jump over". The provided point doesn't need to be one of my endpoints, just having the same coordinates is also ok.
Parameters:
| Name | Type | Description |
|---|---|---|
point |
OutlinePoint | should be at the 3D position of either this.start or this.end |
Returns: OutlineSection | null
an adjacent OutlineSection of me, or null if
getCenterPosition
▸ getCenterPosition(): Vector3‹›
Inherited from OutlineLine.getCenterPosition
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:187
Returns: Vector3‹›
getCenterPosition2D
▸ getCenterPosition2D(): Vector3‹›
Inherited from OutlineLine.getCenterPosition2D
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:195
Returns: Vector3‹›
getDirection
▸ getDirection(targetVector: Vector3‹›): Vector3‹›
Inherited from OutlineLine.getDirection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:229
Returns the direction of this OutlineSection in 3D assembly coordinates.
Parameters:
| Name | Type | Default |
|---|---|---|
targetVector |
Vector3‹› | new Vector3() |
Returns: Vector3‹›
Direction
getDirection2D
▸ getDirection2D(targetVector: Vector3‹›): Vector3‹›
Inherited from OutlineLine.getDirection2D
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:238
Returns the direction of this OutlineSection in 2D outline coordinates.
Parameters:
| Name | Type | Default |
|---|---|---|
targetVector |
Vector3‹› | new Vector3() |
Returns: Vector3‹›
getEdgeJoint
▸ getEdgeJoint(): EdgeJoint‹›
Inherited from OutlineLine.getEdgeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:281
Returns: EdgeJoint‹›
getEnd
▸ getEnd(): OutlinePoint‹›
Inherited from OutlineLine.getEnd
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:175
Returns: OutlinePoint‹›
getInterpolatedPosition
▸ getInterpolatedPosition(alpha: number): Vector3
Inherited from OutlineLine.getInterpolatedPosition
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:191
Parameters:
| Name | Type |
|---|---|
alpha |
number |
Returns: Vector3
getInterpolatedPosition2D
▸ getInterpolatedPosition2D(alpha: number): Vector3
Inherited from OutlineLine.getInterpolatedPosition2D
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:199
Parameters:
| Name | Type |
|---|---|
alpha |
number |
Returns: Vector3
getJoinedSection
▸ getJoinedSection(): OutlineSection | null
Inherited from OutlineLine.getJoinedSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:344
Gets the OutlineSection this section is joint to via its EdgeJoint (or null).
Returns: OutlineSection | null
Other section connected by EdgeJoint
getJoint
▸ getJoint(jointClass: any): EdgeJoint‹› | TeeJoint‹›
Inherited from OutlineLine.getJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:293
Parameters:
| Name | Type |
|---|---|
jointClass |
any |
Returns: EdgeJoint‹› | TeeJoint‹›
getJointPossibility
▸ getJointPossibility(point: Vector3): object | null
Inherited from OutlineLine.getJointPossibility
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:356
Parameters:
| Name | Type | Description |
|---|---|---|
point |
Vector3 | 3D interaction point in assembly space |
Returns: object | null
Joint possibility for this OutlineLine, or null, if no plate is assigned or this section is already joined to some other plate
getJoints
▸ getJoints(): (EdgeJoint‹› | TeeJoint‹›)[]
Inherited from OutlineLine.getJoints
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:289
Returns: (EdgeJoint‹› | TeeJoint‹›)[]
getLength
▸ getLength(): number
Overrides OutlineSection.getLength
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:35
Returns: number
getNextSection
▸ getNextSection(): OutlineSection‹›
Inherited from OutlineLine.getNextSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:384
Returns: OutlineSection‹›
getNormal
▸ getNormal(target: Vector3‹›): Vector3‹›
Inherited from OutlineLine.getNormal
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:261
Returns the normal (outward facing, orthogonal on side of Plate) of this OutlineSection in 3D assembly coordinates.
Parameters:
| Name | Type | Default |
|---|---|---|
target |
Vector3‹› | new Vector3() |
Returns: Vector3‹›
getNormal2D
▸ getNormal2D(target: Vector3‹›): Vector3‹›
Inherited from OutlineLine.getNormal2D
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:276
Returns the normal (outward facing) of this OutlineSection in 2D plate-local coordinates Warning: Outlines that are CW will have their normals point inwards (for cutouts in plates).
Parameters:
| Name | Type | Default |
|---|---|---|
target |
Vector3‹› | new Vector3() |
Returns: Vector3‹›
getOtherPoint
▸ getOtherPoint(point: OutlinePoint): OutlinePoint‹›
Inherited from OutlineLine.getOtherPoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:215
Parameters:
| Name | Type |
|---|---|
point |
OutlinePoint |
Returns: OutlinePoint‹›
getOutline
▸ getOutline(): Outline‹›
Inherited from OutlineLine.getOutline
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:135
Returns: Outline‹›
getOutlinePoint
▸ getOutlinePoint(startOrEnd: "start" | "end"): OutlinePoint‹›
Inherited from OutlineLine.getOutlinePoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:179
Parameters:
| Name | Type |
|---|---|
startOrEnd |
"start" | "end" |
Returns: OutlinePoint‹›
getPlate
▸ getPlate(): Plate‹›
Inherited from OutlineLine.getPlate
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:127
Returns: Plate‹›
getPrevSection
▸ getPrevSection(): OutlineSection‹›
Inherited from OutlineLine.getPrevSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:388
Returns: OutlineSection‹›
getStart
▸ getStart(): OutlinePoint‹›
Inherited from OutlineLine.getStart
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:159
Returns: OutlinePoint‹›
getTangent2DAt
▸ getTangent2DAt(x: number, targetVector?: Vector3): Vector3‹›
Inherited from OutlineLine.getTangent2DAt
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:254
Returns the 2D tangent (local space) at the parameter x on the outline section.
Parameters:
| Name | Type |
|---|---|
x |
number |
targetVector? |
Vector3 |
Returns: Vector3‹›
getTangentAt
▸ getTangentAt(x: number, targetVector?: Vector3): Vector3‹›
Inherited from OutlineLine.getTangentAt
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:247
Returns the 3D tangent (assembly space) at the parameter x on the outline section.
Parameters:
| Name | Type |
|---|---|
x |
number |
targetVector? |
Vector3 |
Returns: Vector3‹›
getTeeJoint
▸ getTeeJoint(): TeeJoint‹›
Inherited from OutlineLine.getTeeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:285
Returns: TeeJoint‹›
hasSameDirectionAsJoinedSection
▸ hasSameDirectionAsJoinedSection(): boolean
Inherited from OutlineLine.hasSameDirectionAsJoinedSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:376
Returns: boolean
True, if this section and its joined section point in the same (assembly) direction - start and end point are at the same assembly coordinates, false if not.
intersectLine
▸ intersectLine(line: Line3): Vector3
Overrides OutlineSection.intersectLine
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:66
Parameters:
| Name | Type |
|---|---|
line |
Line3 |
Returns: Vector3
intersectLineSegment
▸ intersectLineSegment(lineSegment: Line3): Vector3‹›
Inherited from OutlineLine.intersectLineSegment
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:99
Intersects this section with the line segment and returns the intersections.
Parameters:
| Name | Type | Description |
|---|---|---|
lineSegment |
Line3 | Line segment (assembly space) to intersect OutlineSection with |
Returns: Vector3‹›
Intersection or null if there was none
intersectPlane
▸ intersectPlane(plane: Plane, epsilon: number): Vector3
Overrides OutlineSection.intersectPlane
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:39
Parameters:
| Name | Type | Default |
|---|---|---|
plane |
Plane | - |
epsilon |
number | Config.get("modelLimits.maximumPositionEqualityDistance", 0) |
Returns: Vector3
nearestOwnPointTo
▸ nearestOwnPointTo(point: Vector3, targetVector: Vector3‹›): Vector3
Overrides OutlineSection.nearestOwnPointTo
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:86
Parameters:
| Name | Type | Default |
|---|---|---|
point |
Vector3 | - |
targetVector |
Vector3‹› | new Vector3() |
Returns: Vector3
nearestOwnPointTo2D
▸ nearestOwnPointTo2D(point: Vector3, targetVector: Vector3‹›): Vector3
Overrides OutlineSection.nearestOwnPointTo2D
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:92
Parameters:
| Name | Type | Default |
|---|---|---|
point |
Vector3 | - |
targetVector |
Vector3‹› | new Vector3() |
Returns: Vector3
overlapsSection
▸ overlapsSection(otherSection: OutlineSection, sameAssembly: boolean): boolean
Inherited from OutlineLine.overlapsSection
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:428
Determine if this section is parallel to otherSection and they touch in more than one point
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
otherSection |
OutlineSection | - | Other section, has to be in the same assembly as this section |
sameAssembly |
boolean | true | (optional) If true, the two sections will be considered to be in the same assembly coordinate system. Defaults to true. |
Returns: boolean
Whether the sections have a shared segment or not
rasterize
▸ rasterize(includeEnd: boolean): Vector3[]
Overrides OutlineSection.rasterize
Defined in src/model/data/PhysicalObject/Outline/OutlineLine.ts:14
Rasterizes the line by simply returning its start point.
Parameters:
| Name | Type | Default |
|---|---|---|
includeEnd |
boolean | false |
Returns: Vector3[]
"Rasterized" line
reverse
▸ reverse(): void
Inherited from OutlineLine.reverse
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:414
Swaps start and end of this section This needs to handled with care as usually all sections in an Outline need to be reversed at the same time. Otherwise, there might be OutlinePoints, that have an invalid start/end.
Returns: void
setEdgeJoint
▸ setEdgeJoint(edgeJoint: EdgeJoint): void
Inherited from OutlineLine.setEdgeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:302
Set the EdgeJoint this section is connected with. This setter should only be used by the future EdgeJoint.
Parameters:
| Name | Type | Description |
|---|---|---|
edgeJoint |
EdgeJoint | New EdgeJoint |
Returns: void
setEnd
▸ setEnd(end: OutlinePoint): this
Inherited from OutlineLine.setEnd
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:209
Sets the ending OutlinePoint of this OutlineSection and also sets the ending OutlineSection of that point for consistency.
Parameters:
| Name | Type | Description |
|---|---|---|
end |
OutlinePoint | Ending point |
Returns: this
Returns this to allow chaining
setOutline
▸ setOutline(outline: Outline): void
Inherited from OutlineLine.setOutline
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:143
Sets the outline this section belongs to. This setter should only be used by the future Outline.
Parameters:
| Name | Type | Description |
|---|---|---|
outline |
Outline | New Outline |
Returns: void
setStart
▸ setStart(start: OutlinePoint): this
Inherited from OutlineLine.setStart
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:169
Sets the starting OutlinePoint of this OutlineSection and also sets the starting OutlineSection of that point for consistency.
Parameters:
| Name | Type | Description |
|---|---|---|
start |
OutlinePoint | Starting point |
Returns: this
Returns this to allow chaining
setTeeJoint
▸ setTeeJoint(teeJoint: TeeJoint): void
Inherited from OutlineLine.setTeeJoint
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:316
Set the TeeJoint this section is connected with. This setter should only be used by the TeeJoint.
Parameters:
| Name | Type | Description |
|---|---|---|
teeJoint |
TeeJoint | New TeeJoint |
Returns: void
toArray
▸ toArray(): [OutlinePoint, OutlinePoint]
Inherited from OutlineLine.toArray
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:481
Returns: [OutlinePoint, OutlinePoint]
toArrayOfPositions
▸ toArrayOfPositions(): [Vector3, Vector3]
Inherited from OutlineLine.toArrayOfPositions
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:485
Returns: [Vector3, Vector3]
translate
▸ translate(translation: Vector3): void
Inherited from OutlineLine.translate
Defined in src/model/data/PhysicalObject/Outline/OutlineSection.ts:119
Translates this OutlineSection by applying the translation to both end points' 3D positions.
Parameters:
| Name | Type | Description |
|---|---|---|
translation |
Vector3 | Translation to apply |
Returns: void