[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 136)] [Serializable] public struct Sphere : IEpsilonComparable<Sphere>
Represents the plane and radius values of a sphere.

Constructors

Sphere

#Since v5.0
Initializes a new sphere given the plane of the equator circle and radius.
public Sphere(
equatorialPlane,
A plane that will be intersecting the sphere at the same distance from both poles (parameterization singularities).
radius
A radius value.
)

Sphere

#ExampleSince v5.0
Initializes a new sphere given center point and radius.
public Sphere(
center,
A center point.
radius
A radius value.
)

Properties

BoundingBox

#Since v5.0
Gets the world aligned bounding box for this Sphere. If the Sphere is Invalid, an empty box is returned.
public BoundingBox BoundingBox { get; }

Center

#Since v5.0
Gets or sets the center point of the sphere.
public Point3d Center { get; set; }

Diameter

#Since v5.0
Gets or sets the diameter for this sphere.
public double Diameter { get; set; }

EquatorialPlane

#Since v6.0
Gets or sets the Equatorial plane for this sphere.
public Plane EquatorialPlane { get; set; }

EquitorialPlane

#Since v5.0
Gets or sets the Equatorial plane for this sphere.
[EditorBrowsable(EditorBrowsableState.Never)] public Plane EquitorialPlane { get; set; }
obsoleteThis property has been replaced by Equ*A*torialPlane.

IsValid

#Since v5.0
Gets a value that indicates whether the sphere is valid.
public bool IsValid { get; }

NorthPole

#Since v5.0
Gets the point at the North Pole of the sphere.

This is the parameterization singularity that can be obtained, at V value +Math.Pi/2.

public Point3d NorthPole { get; }

Radius

#Since v5.0
Gets or sets the Radius for this sphere.
public double Radius { get; set; }

SouthPole

#Since v5.0
Gets the point at the South Pole of the sphere.

This is the parameterization singularity that can be obtained, at V value -Math.Pi/2.

public Point3d SouthPole { get; }

Unset

#Since v5.0
Gets a sphere with invalid members.
public static Sphere Unset { get; }

Methods

ClosestParameter

#Since v5.0
Finds the angle parameters on this sphere that are closest to a test point.
[ConstOperation] public bool ClosestParameter(
testPoint,
Point to project onto the sphere.
out double
longitudeRadians,
The longitudinal angle (in radians; 0.0 to 2pi) where the sphere approaches testPoint best.
out double
latitudeRadians
The latitudinal angle (in radians; -0.5pi to +0.5pi) where the sphere approaches testPoint best.
)
true on success, false on failure. This function will fail if the point it coincident with the sphere center.

ClosestPoint

#Since v5.0
Returns point on sphere that is closest to given point.
[ConstOperation] public Point3d ClosestPoint(
testPoint
Point to project onto Sphere.
)
Point on sphere surface closest to testPoint.

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

FitSphereToPoints

#Since v5.0
Attempts to fit a sphere to a collection of points.
public static Sphere FitSphereToPoints(
points
Points to fit. The collection must contain at least three points.
)
The Sphere that best approximates the points or Sphere.Unset on failure.

LatitudeDegrees

#Since v5.0
Computes the parallel at a specific latitude angle.

The angle is specified in degrees.

[ConstOperation] public Circle LatitudeDegrees(
degrees
An angle in degrees for the meridian.
)
A circle.

LatitudeRadians

#Since v5.0
Computes the parallel at a specific latitude angle.

The angle is specified in radians.

[ConstOperation] public Circle LatitudeRadians(
radians
An angle in radians for the parallel.
)
A circle.

LongitudeDegrees

#Since v5.0
Computes the meridian at a specific longitude angle.

The angle is specified in degrees.

[ConstOperation] public Circle LongitudeDegrees(
degrees
An angle in degrees.
)
A circle.

LongitudeRadians

#Since v5.0
Computes the meridian at a specific longitude angle.

The angle is specified in radians.

[ConstOperation] public Circle LongitudeRadians(
radians
An angle in radians.
)
A circle.

NormalAt

#Since v5.0
Computes the normal at a specific angular location on the sphere.
[ConstOperation] public Vector3d NormalAt(
longitudeRadians,
A number within the interval [0, 2pi].
latitudeRadians
A number within the interval [-pi/2, pi/2].
)
A vector.

PointAt

#Since v5.0
Evaluates the sphere at specific longitude and latitude angles.
[ConstOperation] public Point3d PointAt(
longitudeRadians,
A number within the interval [0, 2pi].
latitudeRadians
A number within the interval [-pi/2,pi/2].
)
A point value.

Rotate

#Since v5.0
Rotates this sphere about a point and an axis.
public bool Rotate(
angleRadians,
Rotation angle (in Radians)
axisOfRotation,
Axis of rotation.
centerOfRotation
Center of rotation.
)
true on success; false on failure.

Rotate

#Since v5.0
Rotates the sphere about the center point.
public bool Rotate(
angleRadians,
Angle of rotation (in radians)
axisOfRotation
Rotation axis.
)
true on success; false on failure.

Rotate

#Since v5.0
Rotates this sphere about a point and an axis.
public bool Rotate(
sinAngle,
sin(angle)
cosAngle,
cod(angle)
axisOfRotation,
Axis of rotation.
centerOfRotation
Center of rotation.
)
true on success; false on failure.

Rotate

#Since v5.0
Rotates this sphere about the center point.
public bool Rotate(
sinAngle,
sin(angle)
cosAngle,
cos(angle)
axisOfRotation
The direction of the axis of rotation.
)
true on success; false on failure.

ToBrep

#Since v5.0
Converts this sphere is it Brep representation
[ConstOperation] public Brep ToBrep()

ToNurbsSurface

#Since v5.0
Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().
[ConstOperation] public NurbsSurface ToNurbsSurface()
A nurbs surface representation of this sphere or null.

ToRevSurface

#Since v5.0
Converts this Sphere to a RevSurface representation. This is synonymous with calling RevSurface.CreateFromSphere().
[ConstOperation] public RevSurface ToRevSurface()
A surface of revolution representation of this sphere or null.

Transform

#Since v5.0
Transforms this sphere. Note that non-similarity preserving transformations cannot be applied to a sphere as that would result in an ellipsoid.
public bool Transform(
Transform
xform
Transformation matrix to apply.
)
true on success, false on failure.

Translate

#Since v5.0
Moves this sphere along a motion vector.
public bool Translate(
delta
Motion vector.
)
true on success; false on failure.