Represents the plane and radius values of a sphere.

Constructors

  • Returns Sphere

  • Initializes a new sphere given center point and radius.

    Parameters

    • center: Point3d

      A center point.

    • radius: number

      A radius value.

    Returns Sphere

  • Initializes a new sphere given the plane of the equator circle and radius.

    Parameters

    • equatorialPlane: Plane

      A plane that will be intersecting the sphere at the same distance from both poles (parameterization singularities).

    • radius: number

      A radius value.

    Returns Sphere

Properties

EquatorialPlane: Plane
Radius: number
unset: Sphere

Gets a sphere with invalid members.

Methods

  • Gets the world aligned bounding box for this Sphere. If the Sphere is Invalid, an empty box is returned.

    Parameters

    Returns BoundingBox

  • Gets or sets the center point of the sphere.

    Parameters

    Returns Point3d

  • Finds the angle parameters on this sphere that are closest to a test point.

    Parameters

    • sphere: Sphere
    • testPoint: Point3d

      Point to project onto the sphere.

    Returns [boolean, number, number]

    true on success, false on failure. This function will fail if the point it coincident with the sphere center.

  • Returns point on sphere that is closest to given point.

    Parameters

    Returns Point3d

    Point on sphere surface closest to testPoint.

  • Returns Sphere

  • Initializes a new sphere given center point and radius.

    Parameters

    • center: Point3d

      A center point.

    • radius: number

      A radius value.

    Returns Sphere

  • Initializes a new sphere given the plane of the equator circle and radius.

    Parameters

    • equatorialPlane: Plane

      A plane that will be intersecting the sphere at the same distance from both poles (parameterization singularities).

    • radius: number

      A radius value.

    Returns Sphere

  • The object a dict from Encode describes (rhino3dm only).

    Parameters

    • jsonObject: Record<string, any>

      A dict as Encode returns it.

    Returns Sphere

  • Gets or sets the diameter for this sphere.

    Parameters

    Returns number

  • This object as a JSON-compatible dict (rhino3dm only; inverse: Decode).

    Parameters

    Returns Record<string, any>

    A dict of numbers and strings: geometry and other objects are stored as their 3dm archive, base64 encoded, with the archive version.

  • Check that all values in other are within epsilon of the values in this

    Parameters

    Returns boolean

  • Gets a value that indicates whether the sphere is valid.

    Parameters

    Returns boolean

  • Computes the parallel at a specific latitude angle.

    The angle is specified in degrees.

    Parameters

    • sphere: Sphere
    • degrees: number

      An angle in degrees for the meridian.

    Returns Circle

    A circle.

  • Computes the parallel at a specific latitude angle.

    The angle is specified in radians.

    Parameters

    • sphere: Sphere
    • radians: number

      An angle in radians for the parallel.

    Returns Circle

    A circle.

  • Computes the meridian at a specific longitude angle.

    The angle is specified in degrees.

    Parameters

    • sphere: Sphere
    • degrees: number

      An angle in degrees.

    Returns Circle

    A circle.

  • Computes the meridian at a specific longitude angle.

    The angle is specified in radians.

    Parameters

    • sphere: Sphere
    • radians: number

      An angle in radians.

    Returns Circle

    A circle.

  • Computes the normal at a specific angular location on the sphere.

    Parameters

    • sphere: Sphere
    • longitudeRadians: number

      A number within the interval [0, 2pi].

    • latitudeRadians: number

      A number within the interval [-pi/2, pi/2].

    Returns Vector3d

    A vector.

  • 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.

    Parameters

    Returns Point3d

  • Evaluates the sphere at specific longitude and latitude angles.

    Parameters

    • sphere: Sphere
    • longitudeRadians: number

      A number within the interval [0, 2pi].

    • latitudeRadians: number

      A number within the interval [-pi/2,pi/2].

    Returns Point3d

    A point value.

  • Rotates this sphere about the center point.

    Parameters

    • sphere: Sphere
    • sinAngle: number

      sin(angle)

    • cosAngle: number

      cos(angle)

    • axisOfRotation: Vector3d

      The direction of the axis of rotation.

    Returns boolean

    true on success; false on failure.

  • Rotates the sphere about the center point.

    Parameters

    • sphere: Sphere
    • angleRadians: number

      Angle of rotation (in radians)

    • axisOfRotation: Vector3d

      Rotation axis.

    Returns boolean

    true on success; false on failure.

  • Rotates this sphere about a point and an axis.

    Parameters

    • sphere: Sphere
    • sinAngle: number

      sin(angle)

    • cosAngle: number

      cod(angle)

    • axisOfRotation: Vector3d

      Axis of rotation.

    • centerOfRotation: Point3d

      Center of rotation.

    Returns boolean

    true on success; false on failure.

  • Rotates this sphere about a point and an axis.

    Parameters

    • sphere: Sphere
    • angleRadians: number

      Rotation angle (in Radians)

    • axisOfRotation: Vector3d

      Axis of rotation.

    • centerOfRotation: Point3d

      Center of rotation.

    Returns boolean

    true on success; false on failure.

  • 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.

    Parameters

    Returns Point3d

  • Converts this sphere is it Brep representation

    Parameters

    Returns Brep

  • Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().

    Parameters

    Returns NurbsSurface

    A nurbs surface representation of this sphere or null.

  • Converts this Sphere to a RevSurface representation. This is synonymous with calling RevSurface.CreateFromSphere().

    Parameters

    Returns RevSurface

    A surface of revolution representation of this sphere or null.

  • Transforms this sphere. Note that non-similarity preserving transformations cannot be applied to a sphere as that would result in an ellipsoid.

    Parameters

    Returns boolean

    true on success, false on failure.

  • Moves this sphere along a motion vector.

    Parameters

    Returns boolean

    true on success; false on failure.