Point3d

References
Represents the three coordinates of a point in three-dimensional space, using double-precision floating point values.

Constructors

Point3d

#ExampleSince v5.0
Initializes a new point by defining the X, Y and Z coordinates.
public Point3d(
x,
The value of the X (first) coordinate.
y,
The value of the Y (second) coordinate.
z
The value of the Z (third) coordinate.
)

Point3d

#Since v5.0
Initializes a new point by copying coordinates from another point.
public Point3d(
Point3d
point
A point.
)

Point3d

#Since v5.0
Initializes a new point by copying coordinates from a single-precision point.
public Point3d(
point
A point.
)

Point3d

#Since v5.0
Initializes a new point by copying coordinates from a four-dimensional point. The first three coordinates are divided by the last one. If the W (fourth) dimension of the input point is zero, then it will be just discarded.
public Point3d(
point
A point.
)

Point3d

#Since v5.0
Initializes a new point by copying coordinates from the components of a vector.
public Point3d(
vector
A vector.
)

Properties

IsValid

#Since v5.0
Each coordinate of the point must pass the RhinoMath.IsValidDouble(double) test.
public bool IsValid { get; }

MaximumCoordinate

#Since v5.0
Gets the largest (both positive and negative) valid coordinate in this point, or RhinoMath.UnsetValue if no coordinate is valid, as an absolute value.
public double MaximumCoordinate { get; }

MinimumCoordinate

#Since v5.0
Gets the smallest (both positive and negative) coordinate value in this point.
public double MinimumCoordinate { get; }

Origin

#Since v5.0
Gets the value of a point at location 0,0,0.
public static Point3d Origin { get; }

Unset

#Since v5.0
Gets the value of a point at location RhinoMath.UnsetValue,RhinoMath.UnsetValue,RhinoMath.UnsetValue.
public static Point3d Unset { get; }

X

#Since v5.0
Gets or sets the X (first) coordinate of this point.
public double X { get; set; }

Y

#Since v5.0
Gets or sets the Y (second) coordinate of this point.
public double Y { get; set; }

Z

#Since v5.0
Gets or sets the Z (third) coordinate of this point.
public double Z { get; set; }

Indexers

this[]

#
Gets or sets an indexed coordinate of this point.
public double this[
index
The coordinate index. Valid values are:

0 = X coordinate

1 = Y coordinate

2 = Z coordinate

.
] { get; set; }

Methods

Add

#Since v5.0
Sums up a point and a vector, and returns a new point.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

public static Point3d Add(
point,
A point.
vector
A vector.
)
A new point that results from the addition of point and vector.

Add

#Since v5.0
Sums up a point and a vector, and returns a new point.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

public static Point3d Add(
point,
A point.
vector
A vector.
)
A new point that results from the addition of point and vector.

Add

#Since v5.0
Sums two Point3d instances.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

public static Point3d Add(
point1,
A point.
point2
A point.
)
A new point that results from the addition of point1 and point2.

Add

#Since v5.0
Sums up a point and a vector, and returns a new point.

(Provided for languages that do not support operator overloading. You can use the + operator otherwise)

public static Point3d Add(
vector,
A vector.
point
A point.
)
A new point that results from the addition of point and vector.

ArePointsCoplanar

#Since v5.0
Determines whether a set of points is coplanar within a given tolerance.
public static bool ArePointsCoplanar(
points,
A list, an array or any enumerable of Point3d.
tolerance
A tolerance value. A default might be RhinoMath.ZeroTolerance.
)
true if points are on the same plane; false otherwise.

CompareTo

#Since v5.0
Compares this Point3d with another Point3d.

Component evaluation priority is first X, then Y, then Z.

[ConstOperation] public int CompareTo(
other
The other Point3d to use in comparison.
)

0: if this is identical to other

-1: if this.X < other.X

-1: if this.X == other.X and this.Y < other.Y

-1: if this.X == other.X and this.Y == other.Y and this.Z < other.Z

+1: otherwise.

CreateNoiseDistribution2D

#Since v9.0
Generates an array of two-dimensional points distributed according to the specified blue noise type.
public static Point3d[] CreateNoiseDistribution2D(
targetCount,
The number of points to generate. Must be a positive integer. The actual count may differ because the algorithm distributes points on a grid whose row and column counts are integers derived from the target count and the region's aspect ratio.
useOrderedThreshold,
Use the blue noise ordered threshold (true) or the blue noise step (false) spectra for the noise distribution.
xMin = 0,
The minimum X coordinate of the bounding rectangle.
yMin = 0,
The minimum Y coordinate of the bounding rectangle.
xMax = 1,
The maximum X coordinate of the bounding rectangle.
yMax = 1
The maximum Y coordinate of the bounding rectangle.
)
Remarks: The distribution and characteristics of the generated points depend on the specified noise type.
An array of Point3d values.

CreateNoiseDistribution3D

#Since v9.0
Generates an array of three-dimensional points distributed according to the specified blue noise type.
public static Point3d[] CreateNoiseDistribution3D(
targetCount,
The number of points to generate. Must be a positive integer. The actual count may differ because the algorithm distributes points on a grid whose row and column counts are integers derived from the target count and the region's aspect ratio.
useOrderedThreshold,
Use the blue noise ordered threshold (true) or the blue noise step (false) spectra for the noise distribution.
xMin = 0,
The minimum X coordinate of the bounding box.
yMin = 0,
The minimum Y coordinate of the bounding box.
zMin = 0,
The minimum Z coordinate of the bounding box.
xMax = 1,
The maximum X coordinate of the bounding box.
yMax = 1,
The maximum Y coordinate of the bounding box.
zMax = 1
The maximum Z coordinate of the bounding box.
)
Remarks: The distribution and characteristics of the generated points depend on the specified noise type.
An array of Point3d values.

CullDuplicates

#Since v5.0
Removes duplicates in the supplied set of points.
public static Point3d[] CullDuplicates(
points,
A list, an array or any enumerable of Point3d.
tolerance
The minimum distance between points.

Points that fall within this tolerance will be discarded.

.
)
An array of points without duplicates; or null on error.

DistanceTo

#ExampleSince v5.0
Computes the distance between two points.
[ConstOperation] public double DistanceTo(
other
Other point for distance measurement.
)
The length of the line between this and the other point; or 0 if any of the points is not valid.

DistanceToSquared

#Since v6.0
Computes the square of the distance between two points.

This method is usually largely faster than DistanceTo().

[ConstOperation] public double DistanceToSquared(
other
Other point for squared distance measurement.
)
The squared length of the line between this and the other point; or 0 if any of the points is not valid.

Divide

#Since v5.0
Divides a Point3d by a number.

(Provided for languages that do not support operator overloading. You can use the / operator otherwise)

public static Point3d Divide(
point,
A point.
t
A number.
)
A new point that is coordinate-wise divided by t.

EpsilonEquals

#Since v5.4
Check that all values in other are within epsilon of the values in this
[ConstOperation] public bool EpsilonEquals(
other,
epsilon
)
EpsilonEquals

Equals

#
Determines whether the specified object is a Point3d and has the same values as the present point.
[ConstOperation] public override bool Equals(
obj
The specified object.
)
true if obj is a Point3d and has the same coordinates as this; otherwise false.
ValueType.Equals

Equals

#Since v5.0
Determines whether the specified Point3d has the same values as the present point.
[ConstOperation] public bool Equals(
point
The specified point.
)
true if point has the same coordinates as this; otherwise false.

FromPoint3f

#Since v6.0
Converts a single-precision point in a double-precision point.
public static Point3d FromPoint3f(
point
A point.
)
The resulting point.

GetHashCode

#
Computes a hash code for the present point.
[ConstOperation] public override int GetHashCode()
A non-unique integer that represents this point.

Interpolate

#Since v5.0
Interpolate between two points.
public void Interpolate(
pA,
First point.
pB,
Second point.
t
Interpolation parameter. If t=0 then this point is set to pA. If t=1 then this point is set to pB. Values of t in between 0.0 and 1.0 result in points between pA and pB.
)

Multiply

#Since v5.0
Multiplies a Point3d by a number.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

public static Point3d Multiply(
t,
A number.
point
A point.
)
A new point that is coordinate-wise multiplied by t.

Multiply

#Since v5.0
Multiplies a Point3d by a number.

(Provided for languages that do not support operator overloading. You can use the * operator otherwise)

public static Point3d Multiply(
point,
A point.
t
A number.
)
A new point that is coordinate-wise multiplied by t.

Negate

#
Computes the additive inverse of all coordinates in the point, and returns the new point.

(Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)

public static Point3d Negate(
point
A point.
)
A point value that, when summed with the point input, yields the Origin.

SortAndCullPointList

#Since v5.0
Orders a set of points so they will be connected in a "reasonable polyline" order.

Also, removes points from the list if their common distance exceeds a specified threshold.

public static Point3d[] SortAndCullPointList(
points,
A list, an array or any enumerable of Point3d.
minimumDistance
Minimum allowed distance among a pair of points. If points are closer than this, only one of them will be kept.
)
The new array of sorted and culled points.

Subtract

#Since v5.0
Subtracts a vector from a point.

(Provided for languages that do not support operator overloading. You can use the - operator otherwise)

public static Point3d Subtract(
point,
A point.
vector
A vector.
)
A new point that is the difference of point minus vector.

Subtract

#Since v5.0
Subtracts a point from another point.

(Provided for languages that do not support operator overloading. You can use the - operator otherwise)

public static Vector3d Subtract(
point1,
A point.
point2
Another point.
)
A new vector that is the difference of point minus vector.
Explicit

ICloneable.Clone

#
Explicit

IComparable.CompareTo

#
[ConstOperation] int IComparable.CompareTo(
obj
)
Explicit

ISerializable.GetObjectData

#
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData()

ToString

#
Constructs the string representation for the current point.
[ConstOperation] public override string ToString()
The point representation in the form X,Y,Z.

ToString

#Since v7.0
Formats the value of the current instance using the specified format.
[ConstOperation] public string ToString(
format,
The format to use. -or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.
formatProvider
The provider to use to format the value. -or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
)
The value of the current instance in the specified format.

Transform

#ExampleSince v5.0
Transforms the present point in place. The transformation matrix acts on the left of the point. i.e.,

result = transformation*point

public void Transform(
Transform
xform
Transformation to apply.
)

TryParse

#Since v6.12
Converts the string representation of a point to the equivalent Point3d structure.
public static bool TryParse(
input,
The point to convert.
out Point3d
result
The structure that will contain the parsed value.
)
true if successful, false otherwise.

Operators

OperationResultDescription
Point3d+Vector3dPoint3dSums up a point and a vector, and returns a new point.
Point3d+Vector3fPoint3dSums up a point and a vector, and returns a new point.
Point3d+Point3dPoint3dSums two Point3d instances.
Vector3d+Point3dPoint3dSums up a point and a vector, and returns a new point.
Point3d/doublePoint3dDivides a Point3d by a number.
Point3d==Point3dboolDetermines whether two Point3d have equal values.
Point3d>Point3dboolDetermines whether the first specified point comes after (has superior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y, then Z.

Point3d>=Point3dboolDetermines whether the first specified point comes after (has superior sorting value than) the second point, or it is equal to it.

Coordinates evaluation priority is first X, then Y, then Z.

Point3d!=Point3dboolDetermines whether two Point3d have different values.
Point3d<Point3dboolDetermines whether the first specified point comes before (has inferior sorting value than) the second point.

Coordinates evaluation priority is first X, then Y, then Z.

Point3d<=Point3dboolDetermines whether the first specified point comes before (has inferior sorting value than) the second point, or it is equal to it.

Coordinates evaluation priority is first X, then Y, then Z.

double*Point3dPoint3dMultiplies a Point3d by a number.
Point3d*doublePoint3dMultiplies a Point3d by a number.
Point3d-Vector3dPoint3dSubtracts a vector from a point.
Point3d-Point3dVector3dSubtracts a point from another point.
-Point3dPoint3dComputes the additive inverse of all coordinates in the point, and returns the new point.

Convertors

OperationResultDescription
explicitVector3dPoint3dConverts a vector in a point, needing casting.
explicitPoint3dVector3dConverts a point in a vector, needing casting.
implicitPoint3dControlPointConverts a point in a control point, without needing casting.
implicitPoint3fPoint3dConverts a single-precision point in a double-precision point, without needing casting.