Circle

Circle

Circle

Constructor

new Circle(radius)

Initializes a circle with center (0,0,0) in the world XY plane.
Parameters:
Name Type Description
radius double Radius of circle, should be a positive number.

Members

center :Array.<x, y, z>

Gets or sets the center point of this circle.
Type:
  • Array.<x, y, z>

circumference :double

Gets or sets the circumference of this circle.
Type:
  • double

diameter :double

Gets or sets the diameter (radius * 2.0) of this circle. Diameters should be positive values.
Type:
  • double

isValid :bool

A valid circle has radius larger than 0.0 and a base plane which is must also be valid.
Type:
  • bool

normal :Array.<x, y, z>

Gets the normal vector for this circle.
Type:
  • Array.<x, y, z>

radius :double

Gets or sets the radius of this circle. Radii should be positive values.
Type:
  • double

Methods

closestPoint(testPoint) → {Array.<x, y, z>}

Gets the point on the circle which is closest to a test point.
Parameters:
Name Type Description
testPoint Array.<x, y, z> Point to project onto the circle.
Returns:
The point on the circle that is closest to testPoint or Point3d.Unset on failure.
Type
Array.<x, y, z>

derivativeAt(derivative, t) → {Array.<x, y, z>}

Determines the value of the Nth derivative at a parameter.
Parameters:
Name Type Description
derivative int Which order of derivative is wanted.
t double Parameter to evaluate derivative. Valid values are 0, 1, 2 and 3.
Returns:
The derivative of the circle at the given parameter.
Type
Array.<x, y, z>

pointAt(t) → {Array.<x, y, z>}

Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.
Parameters:
Name Type Description
t double Parameter of point to evaluate.
Returns:
The point on the circle at the given parameter.
Type
Array.<x, y, z>

reverse()

Reverse the orientation of the circle. Changes the domain from [a,b] to [-b,-a].

tangentAt(t) → {Array.<x, y, z>}

Circles use trigonometric parameterization: t -> center + cos(t)*radius*xaxis + sin(t)*radius*yaxis.
Parameters:
Name Type Description
t double Parameter of tangent to evaluate.
Returns:
The tangent at the circle at the given parameter.
Type
Array.<x, y, z>

toNurbsCurve() → {NurbsCurve}

Constructs a nurbs curve representation of this circle. This amounts to the same as calling NurbsCurve.CreateFromCircle().
Returns:
A nurbs curve representation of this circle or null if no such representation could be made.
Type
NurbsCurve

translate(delta) → {bool}

Moves the circle.
Parameters:
Name Type Description
delta Array.<x, y, z> Translation vector.
Returns:
true on success, false on failure.
Type
bool