Header menu logo Rhino.Scripting.Fsharp

AutoOpenPnt Module

When Rhino.Scripting.FSharp is opened this module will be auto-opened. It only contains extension members for type Point3d.

Type extensions

Type extension Description

this.Angle2PiInXYTo

Full Usage: this.Angle2PiInXYTo

Parameters:
Returns: float
Modifiers: inline

Returns the angle in Radians from this point to another point projected in X-Y plane. 0.0 = Xaxis, going Counter-Clockwise till two Pi.

Extended Type: Point3d

o : Point3d
Returns: float

this.Angle360InXYTo

Full Usage: this.Angle360InXYTo

Parameters:
Returns: float
Modifiers: inline

Returns the angle in Degrees from this point to another point projected in X-Y plane. 0.0 = Xaxis, going Counter-Clockwise till 360.

Extended Type: Point3d

o : Point3d
Returns: float

this.AsString

Full Usage: this.AsString

Parameters:
    () : unit

Returns: string

Format 3D point into string with nice floating point number formatting of X, Y and Z But without full type name as in pt.ToString()

Extended Type: Point3d

() : unit
Returns: string

this.ClosestPointOnLine

Full Usage: this.ClosestPointOnLine

Parameters:
Returns: Point3d
Modifiers: inline

Get closest point on finite line to test point.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
Returns: Point3d

this.DirectionDiamondInXYTo

Full Usage: this.DirectionDiamondInXYTo

Parameters:
Returns: float
Modifiers: inline

Returns the Diamond Angle from this point to another point projected in X-Y plane. The diamond angle is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. Ignoring Z component. This is the fastest angle computation since it does not use Math.Cos or Math.Sin. It is useful for radial sorting.

Extended Type: Point3d

o : Point3d
Returns: float

this.DistanceFromOrigin

Full Usage: this.DistanceFromOrigin

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the distance from Origin (0, 0, 0)

Extended Type: Point3d

() : unit
Returns: float

this.DistanceFromOriginSquare

Full Usage: this.DistanceFromOriginSquare

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the squared distance from Origin (0, 0, 0)

Extended Type: Point3d

() : unit
Returns: float

this.DistanceInXYFromOrigin

Full Usage: this.DistanceInXYFromOrigin

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the projected distance from Origin (0, 0, 0). Ignoring the Z component.

Extended Type: Point3d

() : unit
Returns: float

this.DistanceInXYFromOriginSquare

Full Usage: this.DistanceInXYFromOriginSquare

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the projected square distance from Origin (0, 0, 0). Ignoring the Z component.

Extended Type: Point3d

() : unit
Returns: float

this.DistanceTo

Full Usage: this.DistanceTo

Parameters:
Returns: float
Modifiers: inline

Returns the distance between two 3D points.

Extended Type: Point3d

b : Point3d
Returns: float

this.DistanceToLine

Full Usage: this.DistanceToLine

Parameters:
Returns: float
Modifiers: inline

Returns the distance between point and finite line segment defined by start and end.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
Returns: float

this.DistanceToSquare

Full Usage: this.DistanceToSquare

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between two 3D points. This operation is slightly faster than the distance function, and sufficient for many algorithms like finding closest points.

Extended Type: Point3d

b : Point3d
Returns: float

this.IsAlmostOrigin

Full Usage: this.IsAlmostOrigin

Parameters:
    tol : float

Returns: bool
Modifiers: inline

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

Extended Type: Point3d

tol : float
Returns: bool

this.IsNotOrigin

Full Usage: this.IsNotOrigin

Parameters:
    () : unit

Returns: bool
Modifiers: inline

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

Extended Type: Point3d

() : unit
Returns: bool

this.IsOrigin

Full Usage: this.IsOrigin

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Returns a boolean indicating wether X, Y and Z are exactly 0.0.

Extended Type: Point3d

() : unit
Returns: bool

this.ToPoint3d

Full Usage: this.ToPoint3d

Parameters:
    () : unit

Returns: Point3d

To convert a Point3f (as it is used in Meshes) to Point3d (as it is used in most other Rhino Geometries)

Extended Type: Point3f

() : unit
Returns: Point3d

this.ToPoint3f

Full Usage: this.ToPoint3f

Parameters:
    () : unit

Returns: Point3f

To convert a Point3d (as it is used in most other Rhino Geometries) to Point3f (as it is used in Meshes)

Extended Type: Point3d

() : unit
Returns: Point3f

this.WithDistanceFromOrigin

Full Usage: this.WithDistanceFromOrigin

Parameters:
    l : float

Returns: Point3d
Modifiers: inline

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

Extended Type: Point3d

l : float
Returns: Point3d

this.WithX

Full Usage: this.WithX

Parameters:
    x : float

Returns: Point3d
Modifiers: inline

Returns new 3D point with new X coordinate, Y and Z stay the same.

Extended Type: Point3d

x : float
Returns: Point3d

this.WithY

Full Usage: this.WithY

Parameters:
    y : float

Returns: Point3d
Modifiers: inline

Returns a new 3D vector with new y coordinate, X and Z stay the same.

Extended Type: Point3d

y : float
Returns: Point3d

this.WithZ

Full Usage: this.WithZ

Parameters:
    z : float

Returns: Point3d
Modifiers: inline

Returns a new 3D vector with new z coordinate, X and Y stay the same.

Extended Type: Point3d

z : float
Returns: Point3d

Point3d.add a b

Full Usage: Point3d.add a b

Parameters:
Returns: Point3d
Modifiers: inline

Adds two 3D points and return new 3D point.

Extended Type: Point3d

a : Point3d
b : Point3d
Returns: Point3d

Point3d.addVec v a

Full Usage: Point3d.addVec v a

Parameters:
Returns: Point3d
Modifiers: inline

Add a 3D point to a 3D vector and return new 3D point.

Extended Type: Point3d

v : Vector3d
a : Point3d
Returns: Point3d

Point3d.angle180Pts (ptPrev, ptThis, ptNext)

Full Usage: Point3d.angle180Pts (ptPrev, ptThis, ptNext)

Parameters:
Returns: float

Returns angle between three 3D Points in Degrees. Range 0.0 to 180

Extended Type: Point3d

ptPrev : Point3d
ptThis : Point3d
ptNext : Point3d
Returns: float

Point3d.angleInCorner (prevPt, thisPt, nextPt)

Full Usage: Point3d.angleInCorner (prevPt, thisPt, nextPt)

Parameters:
Returns: float

Returns angle in Degrees at mid point (thisPt).

Extended Type: Point3d

prevPt : Point3d
thisPt : Point3d
nextPt : Point3d
Returns: float

Point3d.anglePiPts (ptPrev, ptThis, ptNext)

Full Usage: Point3d.anglePiPts (ptPrev, ptThis, ptNext)

Parameters:
Returns: float

Returns angle between three 3D Points in Radians. Range 0.0 to Pi.

Extended Type: Point3d

ptPrev : Point3d
ptThis : Point3d
ptNext : Point3d
Returns: float

Point3d.bisector (ptPrev, ptThis, ptNext)

Full Usage: Point3d.bisector (ptPrev, ptThis, ptNext)

Parameters:
Returns: Vector3d
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: Point3d

ptPrev : Point3d
ptThis : Point3d
ptNext : Point3d
Returns: Vector3d

Point3d.create (x, y, z)

Full Usage: Point3d.create (x, y, z)

Parameters:
    x : float
    y : float
    z : float

Returns: Point3d
Modifiers: inline

Create 3D point from X, Y and Z components.

Extended Type: Point3d

x : float
y : float
z : float
Returns: Point3d

Point3d.createFromMembersXYZ pt

Full Usage: Point3d.createFromMembersXYZ pt

Parameters:
    pt : ^T

Returns: Point3d
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

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

Extended Type: Point3d

pt : ^T
Returns: Point3d

Point3f.createFromMembersXYZ pt

Full Usage: Point3f.createFromMembersXYZ pt

Parameters:
    pt : ^T

Returns: Point3f
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

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

Extended Type: Point3f

pt : ^T
Returns: Point3f

Point3d.createFromMembersxyz pt

Full Usage: Point3d.createFromMembersxyz pt

Parameters:
    pt : ^T

Returns: Point3d
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

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

Extended Type: Point3d

pt : ^T
Returns: Point3d

Point3f.createFromMembersxyz pt

Full Usage: Point3f.createFromMembersxyz pt

Parameters:
    pt : ^T

Returns: Point3f
Modifiers: inline
Type parameters: ^T, ^a, ^b, ^c

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

Extended Type: Point3f

pt : ^T
Returns: Point3f

Point3d.distPt (fromPt, dirPt, distance)

Full Usage: Point3d.distPt (fromPt, dirPt, distance)

Parameters:
Returns: Point3d
Modifiers: inline

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

Extended Type: Point3d

fromPt : Point3d
dirPt : Point3d
distance : float
Returns: Point3d

Point3d.distance a b

Full Usage: Point3d.distance a b

Parameters:
Returns: float
Modifiers: inline

Returns the distance between two 3D points.

Extended Type: Point3d

a : Point3d
b : Point3d
Returns: float

Point3d.distanceFromOrigin pt

Full Usage: Point3d.distanceFromOrigin pt

Parameters:
Returns: float
Modifiers: inline

Returns the distance from World Origin.

Extended Type: Point3d

pt : Point3d
Returns: float

Point3d.distanceFromOriginSquare pt

Full Usage: Point3d.distanceFromOriginSquare pt

Parameters:
Returns: float
Modifiers: inline

Returns the square distance from World Origin.

Extended Type: Point3d

pt : Point3d
Returns: float

Point3d.distanceSq a b

Full Usage: Point3d.distanceSq a b

Parameters:
Returns: float
Modifiers: inline

Returns the squared distance between two 3D points. This operation is slightly faster than the Point3d.distance function, and sufficient for many algorithms like finding closest points.

Extended Type: Point3d

a : Point3d
b : Point3d
Returns: float

Point3d.distanceXY a b

Full Usage: Point3d.distanceXY a b

Parameters:
Returns: float
Modifiers: inline

Returns the horizontal distance between two 3D points(ignoring their Z Value)

Extended Type: Point3d

a : Point3d
b : Point3d
Returns: float

Point3d.divPt (fromPt, toPt, rel)

Full Usage: Point3d.divPt (fromPt, toPt, rel)

Parameters:
Returns: Point3d
Modifiers: inline

Linearly interpolates between two 3D 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 Point3d.lerp.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
rel : float
Returns: Point3d

Point3d.equals tol a b

Full Usage: Point3d.equals tol a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D points are equal within tolerance. Use a tolerance of 0.0 to check for an exact match.

Extended Type: Point3d

tol : float
a : Point3d
b : Point3d
Returns: bool

Point3d.extendToZLevel (fromPt, toPt, z)

Full Usage: Point3d.extendToZLevel (fromPt, toPt, z)

Parameters:
Returns: Point3d
Modifiers: inline

Returns a point that is at a given Z level, going from a point in the direction of another point.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
z : float
Returns: Point3d

Point3d.failedDistPt (fromPt, dirPt, distance)

Full Usage: Point3d.failedDistPt (fromPt, dirPt, distance)

Parameters:
Returns: 'a

Extended Type: Point3d

fromPt : Point3d
dirPt : Point3d
distance : float
Returns: 'a

Point3d.findOffsetCorner (prevPt, thisPt, nextPt, prevDist, nextDist, orientation)

Full Usage: Point3d.findOffsetCorner (prevPt, thisPt, nextPt, prevDist, nextDist, orientation)

Parameters:
Returns: Vector3d * Vector3d * Point3d * Vector3d
Modifiers: inline
 Finds the inner offset point in a corner ( defined by a Polyline from 3 points ( prevPt, thisPt and nextPt)
 The offset from first and second segment are given separately and can vary (prevDist and nextDist).
 Use negative distance for outer offset
 The orientation parameter is only approximate, it might flip the output normal, so that the  dot-product is positive.
 Returns a Value tuple of :
   - the first segment offset vector in actual length  ,
   - second segment offset vector,
   - the offset corner,
   - and the unitized normal at the corner. flipped if needed to match orientation of the orientation input vector (positive dot product)
 If Points are  collinear returns: Vector3d.Zero, Vector3d.Zero, Point3d.Origin, Vector3d.Zero

Extended Type: Point3d

prevPt : Point3d
thisPt : Point3d
nextPt : Point3d
prevDist : float
nextDist : float
orientation : Vector3d
Returns: Vector3d * Vector3d * Point3d * Vector3d

Point3d.getX pt

Full Usage: Point3d.getX pt

Parameters:
Returns: float
Modifiers: inline

Gets the X value of 3D point.

Extended Type: Point3d

pt : Point3d
Returns: float

Point3d.getY pt

Full Usage: Point3d.getY pt

Parameters:
Returns: float
Modifiers: inline

Gets the Y value of 3D point.

Extended Type: Point3d

pt : Point3d
Returns: float

Point3d.getZ pt

Full Usage: Point3d.getZ pt

Parameters:
Returns: float
Modifiers: inline

Gets the Z value of 3D point.

Extended Type: Point3d

pt : Point3d
Returns: float

Point3d.lerp (fromPt, toPt, rel)

Full Usage: Point3d.lerp (fromPt, toPt, rel)

Parameters:
Returns: Point3d
Modifiers: inline

Linearly interpolates between two 3D 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 Point3d.divPt.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
rel : float
Returns: Point3d

Point3d.midPt a b

Full Usage: Point3d.midPt a b

Parameters:
Returns: Point3d
Modifiers: inline

Returns the midpoint of two 3D points.

Extended Type: Point3d

a : Point3d
b : Point3d
Returns: Point3d

Point3d.move shift pt

Full Usage: Point3d.move shift pt

Parameters:
Returns: Point3d
Modifiers: inline

Move point 3D by vector. Same as Point3d.translate.

Extended Type: Point3d

shift : Vector3d
pt : Point3d
Returns: Point3d

Point3d.moveX x pt

Full Usage: Point3d.moveX x pt

Parameters:
Returns: Point3d
Modifiers: inline

Add float to X component of a 3D point and return new 3D point.

Extended Type: Point3d

x : float
pt : Point3d
Returns: Point3d

Point3d.moveY y pt

Full Usage: Point3d.moveY y pt

Parameters:
Returns: Point3d
Modifiers: inline

Add float to Y component of a 3D point and return new 3D point.

Extended Type: Point3d

y : float
pt : Point3d
Returns: Point3d

Point3d.moveZ z pt

Full Usage: Point3d.moveZ z pt

Parameters:
Returns: Point3d
Modifiers: inline

Add float to Z component of a 3D point and return new 3D point.

Extended Type: Point3d

z : float
pt : Point3d
Returns: Point3d

Point3d.normalOf3Pts (a, b, c)

Full Usage: Point3d.normalOf3Pts (a, b, c)

Parameters:
Returns: Vector3d

For three Points describing a plane return a normal. If the returned vector has length zero then the points are in one line.

Extended Type: Point3d

a : Point3d
b : Point3d
c : Point3d
Returns: Vector3d

Point3d.normalOfTwoPointsInXY (fromPt, toPt)

Full Usage: Point3d.normalOfTwoPointsInXY (fromPt, toPt)

Parameters:
Returns: Vector3d

Every line has a normal vector in X-Y plane. Rotated Counter-Clockwise in top view. The result is unitized. If line is vertical then Xaxis is returned. see also : Vector3d.perpendicularVecInXY.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
Returns: Vector3d

Point3d.offsetTwoPt (fromPt, toPt, distHor, distNormal)

Full Usage: Point3d.offsetTwoPt (fromPt, toPt, distHor, distNormal)

Parameters:
Returns: Point3d * Point3d

Offsets two 3D points by two given distances. The fist distance (distHor) is applied in in X-Y plane. The second distance (distNormal) is applied perpendicular to the line (made by the two 3D points) and perpendicular to the horizontal offset direction. This is in World.Z direction if both points are at the same Z level. If points are closer than than 1e-6 units the World.Xaxis is used as first direction and World Z-axis as second direction.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
distHor : float
distNormal : float
Returns: Point3d * Point3d

Point3d.projectToXYPlane pt

Full Usage: Point3d.projectToXYPlane pt

Parameters:
Returns: Point3d
Modifiers: inline

Project point to World X-Y plane. Use make2D to convert to 2D point instance.

Extended Type: Point3d

pt : Point3d
Returns: Point3d

Point3d.projectedParameter (fromPt, v, testPt)

Full Usage: Point3d.projectedParameter (fromPt, v, testPt)

Parameters:
Returns: float
Modifiers: inline

'fromPt' point and 'v' vector describe an endless 3D line. 'testPt' gets projected onto this line. Returns the parameter (or scaling for vector) on this line of the projection.

Extended Type: Point3d

fromPt : Point3d
v : Vector3d
testPt : Point3d
Returns: float

Point3d.projectedParameter (fromPt, toPt, testPt)

Full Usage: Point3d.projectedParameter (fromPt, toPt, testPt)

Parameters:
Returns: float
Modifiers: inline

'fromPt' point and 'toPt' point describe an endless 3D line. 'testPt' gets projected onto this line. Returns the parameter (or scaling for vector) on this line of the projection.

Extended Type: Point3d

fromPt : Point3d
toPt : Point3d
testPt : Point3d
Returns: float

Point3d.scale f pt

Full Usage: Point3d.scale f pt

Parameters:
Returns: Point3d
Modifiers: inline

Scale a 3D point by a scalar and return new 3D point.

Extended Type: Point3d

f : float
pt : Point3d
Returns: Point3d

Point3d.setDistanceFromOrigin f pt

Full Usage: Point3d.setDistanceFromOrigin f pt

Parameters:
Returns: Point3d
Modifiers: inline

Returns a new 3D point at a given distance from World Origin by scaling the input.

Extended Type: Point3d

f : float
pt : Point3d
Returns: Point3d

Point3d.snap precision pt

Full Usage: Point3d.snap precision pt

Parameters:
Returns: Point3d
Modifiers: inline

Snaps the points coordinate to the given precision. e.g. snap 0.1 Point3d(0.123, 0.456, 0) -> Point3d(0.1, 0.5, 0) e.g. snap 10 Point3d(3 , 19 , 0) -> Point3d(0 , 20 , 0) does: (Math.Round (x/precision)) * precision

Extended Type: Point3d

precision : float
pt : Point3d
Returns: Point3d

Point3d.snapIfClose snapDistance snapTo pt

Full Usage: Point3d.snapIfClose snapDistance snapTo pt

Parameters:
Returns: Point3d
Modifiers: inline

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

Extended Type: Point3d

snapDistance : float
snapTo : Point3d
pt : Point3d
Returns: Point3d

Point3d.translate shift pt

Full Usage: Point3d.translate shift pt

Parameters:
Returns: Point3d
Modifiers: inline

Move point 3D by vector. Same as Point3d.move.

Extended Type: Point3d

shift : Vector3d
pt : Point3d
Returns: Point3d

Point3d.withX x pt

Full Usage: Point3d.withX x pt

Parameters:
Returns: Point3d
Modifiers: inline

Sets the X value and return new 3D point.

Extended Type: Point3d

x : float
pt : Point3d
Returns: Point3d

Point3d.withY y pt

Full Usage: Point3d.withY y pt

Parameters:
Returns: Point3d
Modifiers: inline

Sets the Y value and return new 3D point.

Extended Type: Point3d

y : float
pt : Point3d
Returns: Point3d

Point3d.withZ z pt

Full Usage: Point3d.withZ z pt

Parameters:
Returns: Point3d
Modifiers: inline

Sets the Z value and return new 3D point.

Extended Type: Point3d

z : float
pt : Point3d
Returns: Point3d

Type something to start searching.