Logo Euclid

AutoOpenPt Module

When Euclid is opened this module will be auto-opened. It only contains extension members for type Pt.

Type extensions

Type extension Description

this.AsPnt

Full Usage: this.AsPnt

Parameters:
    () : unit

Returns: Pnt
Modifiers: inline

Returns the 2D point as 3D point. Using 0.0 for Z. Use the member pt.WithZ to set Z to a different value.

Extended Type: Pt

() : unit
Returns: Pnt

this.AsVc

Full Usage: this.AsVc

Parameters:
    () : unit

Returns: Vc
Modifiers: inline

Returns the 2D point as 2D vector.

Extended Type: Pt

() : unit
Returns: Vc

this.AsVec

Full Usage: this.AsVec

Parameters:
    () : unit

Returns: Vec
Modifiers: inline

Returns the 2D point as 3D vector. Using 0.0 for Z.

Extended Type: Pt

() : unit
Returns: Vec

this.ClosestPointOnLine

Full Usage: this.ClosestPointOnLine

Parameters:
Returns: Pt
Modifiers: inline

Returns the closest point on a finite line segment to test point. The line segment is given as a Line2D `ln`. Fails if the line is degenerate (zero-length).

Extended Type: Pt

ln : Line2D
Returns: Pt

this.Direction2PiTo

Full Usage: this.Direction2PiTo

Parameters:
Returns: float
Modifiers: inline

Returns the angle in radians from this point to another point. 0.0 = XAxis, going counter-clockwise till two Pi. Fails if the two points are coincident or too close together. The static counterpart is Pt.direction2PiFromTo.

Extended Type: Pt

o : Pt
Returns: float

this.Direction360To

Full Usage: this.Direction360To

Parameters:
Returns: float
Modifiers: inline

Returns the angle in degrees from this point to another point. 0.0 = XAxis, going counter-clockwise till 360. Fails if the two points are coincident or too close together. The static counterpart is Pt.direction360FromTo.

Extended Type: Pt

o : Pt
Returns: float

this.DirectionDiamondTo

Full Usage: this.DirectionDiamondTo

Parameters:
Returns: float
Modifiers: inline

Returns the Diamond Angle from this point to another point. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 degrees) 0.0 = XAxis, going counter-clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. Fails if the two points are coincident or too close together. The static counterpart is Pt.directionDiamondFromTo.

Extended Type: Pt

o : Pt
Returns: float

this.DistanceFromOrigin

Full Usage: this.DistanceFromOrigin

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the distance from Origin (0, 0)

Extended Type: Pt

() : unit
Returns: float

this.DistanceFromOriginSq

Full Usage: this.DistanceFromOriginSq

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the squared distance from Origin (0, 0)

Extended Type: Pt

() : unit
Returns: float

this.DistanceTo

Full Usage: this.DistanceTo

Parameters:
Returns: float
Modifiers: inline

Returns the distance between two 2D points. The static counterpart is Pt.distance.

Extended Type: Pt

b : Pt
Returns: float

this.DistanceToLine

Full Usage: this.DistanceToLine

Parameters:
Returns: float
Modifiers: inline

Returns the distance between point and finite line segment. The line segment is given as a Line2D `ln`.

Extended Type: Pt

ln : Line2D
Returns: float

this.DistanceToLineSq

Full Usage: this.DistanceToLineSq

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between point and finite line segment. The line segment is given as a Line2D `ln`.

Extended Type: Pt

ln : Line2D
Returns: float

this.DistanceToSq

Full Usage: this.DistanceToSq

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between two 2D points. This operation is slightly faster than the distance function, and sufficient for many algorithms like finding closest points. The static counterpart is Pt.distanceSq.

Extended Type: Pt

b : Pt
Returns: float

this.DistanceToXY

Full Usage: this.DistanceToXY

Parameters:
    x : float
    y : float

Returns: float
Modifiers: inline

Returns the distance between a 2D point and given x, y coordinates.

Extended Type: Pt

x : float
y : float
Returns: float

this.DistanceToXYSq

Full Usage: this.DistanceToXYSq

Parameters:
    x : float
    y : float

Returns: float
Modifiers: inline

Returns the squared distance between a 2D point and given x, y coordinates.

Extended Type: Pt

x : float
y : float
Returns: float

this.IsAlmostOrigin

Full Usage: this.IsAlmostOrigin

Parameters:
    tol : float

Returns: bool
Modifiers: inline

Returns a boolean indicating whether the absolute value of X and Y is each less than the given tolerance.

Extended Type: Pt

tol : float
Returns: bool

this.IsInvalid

Full Usage: this.IsInvalid

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating whether X or Y is NaN or Infinity.

Extended Type: Pt

() : unit
Returns: bool

this.IsNotOrigin

Full Usage: this.IsNotOrigin

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating if any of X and Y is not exactly 0.0.

Extended Type: Pt

() : unit
Returns: bool

this.IsOrigin

Full Usage: this.IsOrigin

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating whether X and Y are exactly 0.0.

Extended Type: Pt

() : unit
Returns: bool

this.IsValid

Full Usage: this.IsValid

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating whether X and Y are both valid (not NaN or Infinity).

Extended Type: Pt

() : unit
Returns: bool

this.Rotate

Full Usage: this.Rotate

Parameters:
Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate the 2D point counter-clockwise around the World Origin by a 2D Rotation (that has cos and sin precomputed).

Extended Type: Pt

r : Rotation2D

The rotation to apply.

Returns: Pt

The rotated 2D point.

this.Rotate90CCW

Full Usage: this.Rotate90CCW

Parameters:
    () : unit

Returns: Pt
Modifiers: inline

90-degree rotation counter-clockwise.

Extended Type: Pt

() : unit
Returns: Pt

this.Rotate90CW

Full Usage: this.Rotate90CW

Parameters:
    () : unit

Returns: Pt
Modifiers: inline

90-degree rotation clockwise.

Extended Type: Pt

() : unit
Returns: Pt

this.RotateAround

Full Usage: this.RotateAround

Parameters:
    cen : Pt - The center point of the rotation.
    r : Rotation2D - The rotation to apply.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate the 2D point counter-clockwise around a center point by a 2D Rotation (that has cos and sin precomputed).

Extended Type: Pt

cen : Pt

The center point of the rotation.

r : Rotation2D

The rotation to apply.

Returns: Pt

The rotated 2D point.

this.RotateByQuarterCircle

Full Usage: this.RotateByQuarterCircle

Parameters:
    numberOfQuarters : int

Returns: Pt
Modifiers: inline

Rotates the 2D point by a given number of quarter-circles (i.e. multiples of 90 degrees or Pi/2 radians). A positive number rotates counter-clockwise, a negative number rotates clockwise. The length of the vector is preserved.

Extended Type: Pt

numberOfQuarters : int
Returns: Pt

this.RotateDegrees

Full Usage: this.RotateDegrees

Parameters:
    angDegree : float - The rotation angle in degrees.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate the 2D point counter-clockwise around the World Origin by an angle in degrees.

For better performance precompute the Rotation2D struct and rotate with this.Rotate(rotation2D).

Extended Type: Pt

angDegree : float

The rotation angle in degrees.

Returns: Pt

The rotated 2D point.

this.RotateDegreesAround

Full Usage: this.RotateDegreesAround

Parameters:
    cen : Pt - The center point of the rotation.
    angDegree : float - The rotation angle in degrees.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate the 2D point counter-clockwise around a center point by an angle in degrees.

Extended Type: Pt

cen : Pt

The center point of the rotation.

angDegree : float

The rotation angle in degrees.

Returns: Pt

The rotated 2D point.

this.RotateRadians

Full Usage: this.RotateRadians

Parameters:
    angRadians : float

Returns: Pt
Modifiers: inline

Rotate the 2D point counter-clockwise by an angle in radians.

For better performance precompute the Rotation2D struct and rotate with this.Rotate(rotation2D).

Extended Type: Pt

angRadians : float
Returns: Pt

this.RotateRadiansAround

Full Usage: this.RotateRadiansAround

Parameters:
    cen : Pt - The center point of the rotation.
    angRadians : float - The rotation angle in radians.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate the 2D point counter-clockwise around a center point by an angle in radians.

Extended Type: Pt

cen : Pt

The center point of the rotation.

angRadians : float

The rotation angle in radians.

Returns: Pt

The rotated 2D point.

this.WithDistanceFromOrigin

Full Usage: this.WithDistanceFromOrigin

Parameters:
    l : float

Returns: Pt
Modifiers: inline

Returns new 2D point with given distance from Origin by scaling it up or down.

Extended Type: Pt

l : float
Returns: Pt

this.WithX

Full Usage: this.WithX

Parameters:
    x : float

Returns: Pt
Modifiers: inline

Returns new 2D point with new X coordinate, Y stays the same.

Extended Type: Pt

x : float
Returns: Pt

this.WithY

Full Usage: this.WithY

Parameters:
    y : float

Returns: Pt
Modifiers: inline

Returns new 2D point with new Y coordinate, X stays the same.

Extended Type: Pt

y : float
Returns: Pt

this.WithZ

Full Usage: this.WithZ

Parameters:
    z : float

Returns: Pnt
Modifiers: inline

Returns new 3D point with Z coordinate, X and Y stay the same. If you want Z to be 0.0 you can use pt.AsPnt too.

Extended Type: Pt

z : float
Returns: Pnt

Pt.add a b

Full Usage: Pt.add a b

Parameters:
Returns: Pt
Modifiers: inline

Adds two 2D points. Returns a new 2D point.

Extended Type: Pt

a : Pt
b : Pt
Returns: Pt

Pt.angle180Pts ptPrev ptThis ptNext

Full Usage: Pt.angle180Pts ptPrev ptThis ptNext

Parameters:
    ptPrev : Pt
    ptThis : Pt
    ptNext : Pt

Returns: float
Modifiers: inline

Returns angle between three 2D Points in degrees. Range 0.0 to 180

Extended Type: Pt

ptPrev : Pt
ptThis : Pt
ptNext : Pt
Returns: float

Pt.anglePiPts ptPrev ptThis ptNext

Full Usage: Pt.anglePiPts ptPrev ptThis ptNext

Parameters:
    ptPrev : Pt
    ptThis : Pt
    ptNext : Pt

Returns: float
Modifiers: inline

Returns angle between three 2D Points in radians. Range 0.0 to Pi.

Extended Type: Pt

ptPrev : Pt
ptThis : Pt
ptNext : Pt
Returns: float

Pt.asPnt pt

Full Usage: Pt.asPnt pt

Parameters:
Returns: Pnt
Modifiers: inline

Returns the 2D point as 3D point. Using 0.0 for Z. Use the member pt.WithZ to set Z to a different value.

Extended Type: Pt

pt : Pt
Returns: Pnt

Pt.asVc pt

Full Usage: Pt.asVc pt

Parameters:
Returns: Vc
Modifiers: inline

Returns the 2D point as 2D vector.

Extended Type: Pt

pt : Pt
Returns: Vc

Pt.asVec pt

Full Usage: Pt.asVec pt

Parameters:
Returns: Vec
Modifiers: inline

Returns the 2D point as 3D vector. Using 0.0 for Z.

Extended Type: Pt

pt : Pt
Returns: Vec

Pt.bisector ptPrev ptThis ptNext

Full Usage: Pt.bisector ptPrev ptThis ptNext

Parameters:
    ptPrev : Pt
    ptThis : Pt
    ptNext : Pt

Returns: Vc
Modifiers: inline

Returns a (not unitized) bisector vector in the middle direction from ptThis. Code : (ptPrev-ptThis).Unitized + (ptNext-ptThis).Unitized ptPrev * ptThis * ptNext -> bisector vector

Extended Type: Pt

ptPrev : Pt
ptThis : Pt
ptNext : Pt
Returns: Vc

Pt.closestOfTwo pt1 pt2 referencePoint

Full Usage: Pt.closestOfTwo pt1 pt2 referencePoint

Parameters:
    pt1 : Pt
    pt2 : Pt
    referencePoint : Pt

Returns: Pt

Returns the closer point of the two points to the reference given point. When both points are equally close, the first point is returned.

Extended Type: Pt

pt1 : Pt
pt2 : Pt
referencePoint : Pt
Returns: Pt

Pt.closestPointOnLine ln testPt

Full Usage: Pt.closestPointOnLine ln testPt

Parameters:
Returns: Pt
Modifiers: inline

Returns the closest point on a finite line segment to test point. The line segment is given as a Line2D `ln`. Fails if the line is degenerate (zero-length).

Extended Type: Pt

ln : Line2D
testPt : Pt
Returns: Pt

Pt.create x y

Full Usage: Pt.create x y

Parameters:
    x : float
    y : float

Returns: Pt
Modifiers: inline

Create a 2D point from X and Y components.

Extended Type: Pt

x : float
y : float
Returns: Pt

Pt.createFromMembersXY pt

Full Usage: Pt.createFromMembersXY pt

Parameters:
    pt : ^T

Returns: Pt
Modifiers: inline
Type parameters: ^T, ^a, ^b (requires (member get_X : ^T -> ^a) and (member get_Y : ^T -> ^b) and (static member op_Explicit : ^a -> Microsoft.FSharp.Core.float) and (static member op_Explicit : ^b -> Microsoft.FSharp.Core.float))

Accepts any type that has X and Y (UPPERCASE) members that can be converted to float values. Internally this is not using reflection at runtime but F# Statically Resolved Type Parameters at compile time.

Extended Type: Pt

pt : ^T
Returns: Pt

Pt.createFromMembersxy pt

Full Usage: Pt.createFromMembersxy pt

Parameters:
    pt : ^T

Returns: Pt
Modifiers: inline
Type parameters: ^T, ^a, ^b (requires (member get_x : ^T -> ^a) and (member get_y : ^T -> ^b) and (static member op_Explicit : ^a -> Microsoft.FSharp.Core.float) and (static member op_Explicit : ^b -> Microsoft.FSharp.Core.float))

Accepts any type that has x and y (lowercase) members that can be converted to float values. Internally this is not using reflection at runtime but F# Statically Resolved Type Parameters at compile time.

Extended Type: Pt

pt : ^T
Returns: Pt

Pt.createFromPnt p

Full Usage: Pt.createFromPnt p

Parameters:
Returns: Pt
Modifiers: inline

Create 2D point from 3D point. Ignoring Z component.

Extended Type: Pt

p : Pnt
Returns: Pt

Pt.createFromUnitVc v

Full Usage: Pt.createFromUnitVc v

Parameters:
Returns: Pt
Modifiers: inline

Create 2D point from 2D unit-vector.

Extended Type: Pt

v : UnitVc
Returns: Pt

Pt.createFromVc v

Full Usage: Pt.createFromVc v

Parameters:
Returns: Pt
Modifiers: inline

Create 2D point from 2D vector.

Extended Type: Pt

v : Vc
Returns: Pt

Pt.direction2PiFromTo fromPt toPt

Full Usage: Pt.direction2PiFromTo fromPt toPt

Parameters:
    fromPt : Pt
    toPt : Pt

Returns: float
Modifiers: inline

Returns the angle in radians from 'fromPt' to 'toPt'. 0.0 = XAxis, going counter-clockwise till two Pi. Fails if the two points are coincident or too close together. The instance counterpart is Pt.Direction2PiTo.

Extended Type: Pt

fromPt : Pt
toPt : Pt
Returns: float

Pt.direction360FromTo fromPt toPt

Full Usage: Pt.direction360FromTo fromPt toPt

Parameters:
    fromPt : Pt
    toPt : Pt

Returns: float
Modifiers: inline

Returns the angle in degrees from 'fromPt' to 'toPt'. 0.0 = XAxis, going counter-clockwise till 360. Fails if the two points are coincident or too close together. The instance counterpart is Pt.Direction360To.

Extended Type: Pt

fromPt : Pt
toPt : Pt
Returns: float

Pt.directionDiamondFromTo fromPt toPt

Full Usage: Pt.directionDiamondFromTo fromPt toPt

Parameters:
    fromPt : Pt
    toPt : Pt

Returns: float
Modifiers: inline

Returns the Diamond Angle from 'fromPt' to 'toPt'. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 degrees) 0.0 = XAxis, going counter-clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. Fails if the two points are coincident or too close together. The instance counterpart is Pt.DirectionDiamondTo.

Extended Type: Pt

fromPt : Pt
toPt : Pt
Returns: float

Pt.distance a b

Full Usage: Pt.distance a b

Parameters:
Returns: float
Modifiers: inline

Returns the distance between two 2D points. The instance counterpart is Pt.DistanceTo.

Extended Type: Pt

a : Pt
b : Pt
Returns: float

Pt.distanceFromOrigin pt

Full Usage: Pt.distanceFromOrigin pt

Parameters:
Returns: float
Modifiers: inline

Returns the distance from Origin (0, 0)

Extended Type: Pt

pt : Pt
Returns: float

Pt.distanceFromOriginSq pt

Full Usage: Pt.distanceFromOriginSq pt

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance from Origin (0, 0)

Extended Type: Pt

pt : Pt
Returns: float

Pt.distanceSq a b

Full Usage: Pt.distanceSq a b

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between two 2D points. This operation is slightly faster than the distance function, and sufficient for many algorithms like finding closest points. The instance counterpart is Pt.DistanceToSq.

Extended Type: Pt

a : Pt
b : Pt
Returns: float

Pt.distanceToLine ln testPt

Full Usage: Pt.distanceToLine ln testPt

Parameters:
Returns: float
Modifiers: inline

Returns the distance between point and finite line segment. The line segment is given as a Line2D `ln`.

Extended Type: Pt

ln : Line2D
testPt : Pt
Returns: float

Pt.distanceToLineSq ln testPt

Full Usage: Pt.distanceToLineSq ln testPt

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between point and finite line segment. The line segment is given as a Line2D `ln`.

Extended Type: Pt

ln : Line2D
testPt : Pt
Returns: float

Pt.distanceToXY x y p

Full Usage: Pt.distanceToXY x y p

Parameters:
    x : float
    y : float
    p : Pt

Returns: float
Modifiers: inline

Returns the distance between a 2D point and given x, y coordinates.

Extended Type: Pt

x : float
y : float
p : Pt
Returns: float

Pt.distanceToXYSq x y p

Full Usage: Pt.distanceToXYSq x y p

Parameters:
    x : float
    y : float
    p : Pt

Returns: float
Modifiers: inline

Returns the squared distance between a 2D point and given x, y coordinates.

Extended Type: Pt

x : float
y : float
p : Pt
Returns: float

Pt.divPt fromPt toPt rel

Full Usage: Pt.divPt fromPt toPt rel

Parameters:
    fromPt : Pt
    toPt : Pt
    rel : float

Returns: Pt
Modifiers: inline

Linearly interpolates between two 2D points. e.g. rel=0.5 will return the middle point, rel=1.0 the endPoint, rel=3.0 a point three times the distance beyond the end point. Same as Pt.lerp.

Extended Type: Pt

fromPt : Pt
toPt : Pt
rel : float
Returns: Pt

Pt.equalsExact a b

Full Usage: Pt.equalsExact a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 2D points are exactly equal. Compares each field with the = operator, so a NaN value is never equal.

Extended Type: Pt

a : Pt
b : Pt
Returns: bool

Pt.equalsWithin tol a b

Full Usage: Pt.equalsWithin tol a b

Parameters:
    tol : float
    a : Pt
    b : Pt

Returns: bool
Modifiers: inline

Checks if two 2D points are equal within tolerance. The tolerance applies to the X and Y coordinates separately, not to the Euclidean distance between the points. Use Pt.equalsExact to check for an exact match.

Extended Type: Pt

tol : float
a : Pt
b : Pt
Returns: bool

Pt.getX pt

Full Usage: Pt.getX pt

Parameters:
Returns: float
Modifiers: inline

Gets the X value of 2D point.

Extended Type: Pt

pt : Pt
Returns: float

Pt.getY pt

Full Usage: Pt.getY pt

Parameters:
Returns: float
Modifiers: inline

Gets the Y value of 2D point.

Extended Type: Pt

pt : Pt
Returns: float

Pt.isAlmostOrigin tol pt

Full Usage: Pt.isAlmostOrigin tol pt

Parameters:
    tol : float
    pt : Pt

Returns: bool
Modifiers: inline

Returns a boolean indicating whether the absolute value of X and Y is each less than the given tolerance.

Extended Type: Pt

tol : float
pt : Pt
Returns: bool

Pt.isInvalid pt

Full Usage: Pt.isInvalid pt

Parameters:
Returns: bool
Modifiers: inline

Same as pt.IsInvalid.

Extended Type: Pt

pt : Pt
Returns: bool

Pt.isNotOrigin pt

Full Usage: Pt.isNotOrigin pt

Parameters:
Returns: bool
Modifiers: inline

Returns a boolean indicating if any of X and Y is not exactly 0.0.

Extended Type: Pt

pt : Pt
Returns: bool

Pt.isOrigin pt

Full Usage: Pt.isOrigin pt

Parameters:
Returns: bool
Modifiers: inline

Returns a boolean indicating whether X and Y are exactly 0.0.

Extended Type: Pt

pt : Pt
Returns: bool

Pt.isValid pt

Full Usage: Pt.isValid pt

Parameters:
Returns: bool
Modifiers: inline

Returns a boolean indicating whether X and Y are both valid (not NaN or Infinity).

Extended Type: Pt

pt : Pt
Returns: bool

Pt.lerp fromPt toPt rel

Full Usage: Pt.lerp fromPt toPt rel

Parameters:
    fromPt : Pt
    toPt : Pt
    rel : float

Returns: Pt
Modifiers: inline

Linearly interpolates between two 2D points. e.g. rel=0.5 will return the middle point, rel=1.0 the endPoint, rel=3.0 a point three times the distance beyond the end point. Same as Pt.divPt.

Extended Type: Pt

fromPt : Pt
toPt : Pt
rel : float
Returns: Pt

Pt.midPt a b

Full Usage: Pt.midPt a b

Parameters:
Returns: Pt
Modifiers: inline

Returns the midpoint of two 2D points.

Extended Type: Pt

a : Pt
b : Pt
Returns: Pt

Pt.move shift pt

Full Usage: Pt.move shift pt

Parameters:
    shift : Vc
    pt : Pt

Returns: Pt
Modifiers: inline

Move a 2D point by a vector.

Extended Type: Pt

shift : Vc
pt : Pt
Returns: Pt

Pt.moveX x pt

Full Usage: Pt.moveX x pt

Parameters:
    x : float
    pt : Pt

Returns: Pt
Modifiers: inline

Add a float to X component of a 2D point. Returns a new 2D point.

Extended Type: Pt

x : float
pt : Pt
Returns: Pt

Pt.moveY y pt

Full Usage: Pt.moveY y pt

Parameters:
    y : float
    pt : Pt

Returns: Pt
Modifiers: inline

Add a float to Y component of a 2D point. Returns a new 2D point.

Extended Type: Pt

y : float
pt : Pt
Returns: Pt

Pt.notEqualsWithin tol a b

Full Usage: Pt.notEqualsWithin tol a b

Parameters:
    tol : float
    a : Pt
    b : Pt

Returns: bool

Check if two 2D points are not equal within a given tolerance. The tolerance applies to the X and Y coordinates separately, not to the Euclidean distance between the points.

Extended Type: Pt

tol : float
a : Pt
b : Pt
Returns: bool

Pt.pointAtDistance fromPt dirPt distance

Full Usage: Pt.pointAtDistance fromPt dirPt distance

Parameters:
    fromPt : Pt
    dirPt : Pt
    distance : float

Returns: Pt
Modifiers: inline

Returns a point that is at a given distance from a 2D point in the direction of another point.

Extended Type: Pt

fromPt : Pt
dirPt : Pt
distance : float
Returns: Pt

Pt.projectedParameterBetweenPts fromPt toPt testPt

Full Usage: Pt.projectedParameterBetweenPts fromPt toPt testPt

Parameters:
    fromPt : Pt - The start point defining the endless line.
    toPt : Pt - The end point defining the direction of the endless line.
    testPt : Pt - The point to be projected onto the line.

Returns: float The parameter along the line direction (fromPt to toPt) at which the projection of testPt falls. A value of 0.0 corresponds to fromPt, 1.0 corresponds to toPt.
Modifiers: inline

Projects a test point onto an endless line defined by two points.

Extended Type: Pt

fromPt : Pt

The start point defining the endless line.

toPt : Pt

The end point defining the direction of the endless line.

testPt : Pt

The point to be projected onto the line.

Returns: float

The parameter along the line direction (fromPt to toPt) at which the projection of testPt falls. A value of 0.0 corresponds to fromPt, 1.0 corresponds to toPt.

Pt.projectedParameterOnUnitVc fromPt uv testPt

Full Usage: Pt.projectedParameterOnUnitVc fromPt uv testPt

Parameters:
    fromPt : Pt - The origin point of the endless line.
    uv : UnitVc - The unit direction vector describing the orientation of the endless line.
    testPt : Pt - The point to be projected onto the line.

Returns: float The parameter (scalar value) along the unit vector at which the projection of testPt falls on the line.
Modifiers: inline

Projects a test point onto an endless line defined by an origin point and a unit direction vector.

Extended Type: Pt

fromPt : Pt

The origin point of the endless line.

uv : UnitVc

The unit direction vector describing the orientation of the endless line.

testPt : Pt

The point to be projected onto the line.

Returns: float

The parameter (scalar value) along the unit vector at which the projection of testPt falls on the line.

Pt.projectedParameterOnVc fromPt v testPt

Full Usage: Pt.projectedParameterOnVc fromPt v testPt

Parameters:
    fromPt : Pt - The origin point of the endless line.
    v : Vc - The direction vector of the endless line. Does not need to be unitized.
    testPt : Pt - The point to be projected onto the line.

Returns: float The parameter (scaling factor for the direction vector) at which the projection of testPt falls on the line.
Modifiers: inline

Projects a test point onto an endless line defined by an origin point and a direction vector.

Extended Type: Pt

fromPt : Pt

The origin point of the endless line.

v : Vc

The direction vector of the endless line. Does not need to be unitized.

testPt : Pt

The point to be projected onto the line.

Returns: float

The parameter (scaling factor for the direction vector) at which the projection of testPt falls on the line.

Pt.rotate r p

Full Usage: Pt.rotate r p

Parameters:
    r : Rotation2D - The rotation to apply.
    p : Pt - The 2D point to rotate.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate a 2D point counter-clockwise around the World Origin by a 2D Rotation (that has cos and sin precomputed).

Extended Type: Pt

r : Rotation2D

The rotation to apply.

p : Pt

The 2D point to rotate.

Returns: Pt

The rotated 2D point.

Pt.rotate90CCW pt

Full Usage: Pt.rotate90CCW pt

Parameters:
Returns: Pt
Modifiers: inline

90-degree rotation counter-clockwise.

Extended Type: Pt

pt : Pt
Returns: Pt

Pt.rotate90CW pt

Full Usage: Pt.rotate90CW pt

Parameters:
Returns: Pt
Modifiers: inline

90-degree rotation clockwise.

Extended Type: Pt

pt : Pt
Returns: Pt

Pt.rotateAround cen r pt

Full Usage: Pt.rotateAround cen r pt

Parameters:
    cen : Pt - The center point of the rotation.
    r : Rotation2D - The rotation to apply.
    pt : Pt - The 2D point to rotate.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate a 2D point counter-clockwise around a center point by a 2D Rotation (that has cos and sin precomputed).

Extended Type: Pt

cen : Pt

The center point of the rotation.

r : Rotation2D

The rotation to apply.

pt : Pt

The 2D point to rotate.

Returns: Pt

The rotated 2D point.

Pt.rotateByQuarterCircle numberOfQuarters v

Full Usage: Pt.rotateByQuarterCircle numberOfQuarters v

Parameters:
    numberOfQuarters : int
    v : Pt

Returns: Pt

Rotates a point by a given number of quarter-circles (i.e. multiples of 90 degrees or Pi/2 radians). A positive number rotates counter-clockwise, a negative number rotates clockwise. The length of the vector is preserved.

Extended Type: Pt

numberOfQuarters : int
v : Pt
Returns: Pt

Pt.rotateDegrees angDegree pt

Full Usage: Pt.rotateDegrees angDegree pt

Parameters:
    angDegree : float - The rotation angle in degrees.
    pt : Pt - The 2D point to rotate.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate a 2D point counter-clockwise around the World Origin by an angle in degrees.

For better performance precompute the Rotation2D struct and rotate with Pt.rotate.

Extended Type: Pt

angDegree : float

The rotation angle in degrees.

pt : Pt

The 2D point to rotate.

Returns: Pt

The rotated 2D point.

Pt.rotateDegreesAround cen angDegree pt

Full Usage: Pt.rotateDegreesAround cen angDegree pt

Parameters:
    cen : Pt - The center point of the rotation.
    angDegree : float - The rotation angle in degrees.
    pt : Pt - The 2D point to rotate.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate a 2D point counter-clockwise around a center point by an angle in degrees.

Extended Type: Pt

cen : Pt

The center point of the rotation.

angDegree : float

The rotation angle in degrees.

pt : Pt

The 2D point to rotate.

Returns: Pt

The rotated 2D point.

Pt.rotateRadians angRadians pt

Full Usage: Pt.rotateRadians angRadians pt

Parameters:
    angRadians : float
    pt : Pt

Returns: Pt
Modifiers: inline

Rotate the 2D point counter-clockwise by an angle in radians.

For better performance precompute the Rotation2D struct and rotate with Pt.rotate.

Extended Type: Pt

angRadians : float
pt : Pt
Returns: Pt

Pt.rotateRadiansAround cen angRadians pt

Full Usage: Pt.rotateRadiansAround cen angRadians pt

Parameters:
    cen : Pt - The center point of the rotation.
    angRadians : float - The rotation angle in radians.
    pt : Pt - The 2D point to rotate.

Returns: Pt The rotated 2D point.
Modifiers: inline

Rotate a 2D point counter-clockwise around a center point by an angle in radians.

Extended Type: Pt

cen : Pt

The center point of the rotation.

angRadians : float

The rotation angle in radians.

pt : Pt

The 2D point to rotate.

Returns: Pt

The rotated 2D point.

Pt.scale f pt

Full Usage: Pt.scale f pt

Parameters:
    f : float
    pt : Pt

Returns: Pt
Modifiers: inline

Scales a 2D point by a factor. Returns a new 2D point.

Extended Type: Pt

f : float
pt : Pt
Returns: Pt

Pt.scaleOn cen factor pt

Full Usage: Pt.scaleOn cen factor pt

Parameters:
    cen : Pt - The center point of the scaling.
    factor : float - The scale factor.
    pt : Pt - The 2D point to scale.

Returns: Pt The scaled 2D point.
Modifiers: inline

Scales a 2D point by a factor around a given center point.

Extended Type: Pt

cen : Pt

The center point of the scaling.

factor : float

The scale factor.

pt : Pt

The 2D point to scale.

Returns: Pt

The scaled 2D point.

Pt.snap precision pt

Full Usage: Pt.snap precision pt

Parameters:
    precision : float
    pt : Pt

Returns: Pt
Modifiers: inline

Snaps the point's coordinates to the given precision. e.g. snap 0.1 Pt(0.123, 0.456) -> Pt(0.1, 0.5) e.g. snap 10 Pt(3 , 19) -> Pt(0 , 20) does: (Math.Round (x/precision)) * precision

Extended Type: Pt

precision : float
pt : Pt
Returns: Pt

Pt.snapIfClose snapDistance snapTo pt

Full Usage: Pt.snapIfClose snapDistance snapTo pt

Parameters:
    snapDistance : float
    snapTo : Pt
    pt : Pt

Returns: Pt
Modifiers: inline

Snaps to a point if it is within the snapDistance. otherwise returns the original point.

Extended Type: Pt

snapDistance : float
snapTo : Pt
pt : Pt
Returns: Pt

Pt.withDistanceFromOrigin l pt

Full Usage: Pt.withDistanceFromOrigin l pt

Parameters:
    l : float
    pt : Pt

Returns: Pt
Modifiers: inline

Returns new 2D point with given distance from Origin by scaling it up or down.

Extended Type: Pt

l : float
pt : Pt
Returns: Pt

Pt.withX x pt

Full Usage: Pt.withX x pt

Parameters:
    x : float
    pt : Pt

Returns: Pt
Modifiers: inline

Returns new 2D point with new X coordinate, Y stays the same.

Extended Type: Pt

x : float
pt : Pt
Returns: Pt

Pt.withY y pt

Full Usage: Pt.withY y pt

Parameters:
    y : float
    pt : Pt

Returns: Pt
Modifiers: inline

Returns new 2D point with new Y coordinate, X stays the same.

Extended Type: Pt

y : float
pt : Pt
Returns: Pt

Pt.withZ z pt

Full Usage: Pt.withZ z pt

Parameters:
    z : float
    pt : Pt

Returns: Pnt
Modifiers: inline

Returns new 3D point with Z coordinate, X and Y stay the same. If you want Z to be 0.0 you can use pt.AsPnt too.

Extended Type: Pt

z : float
pt : Pt
Returns: Pnt

Type something to start searching.