Class LineCurve

Hierarchy (view full)

Constructors

Properties

degree: number

Gets the maximum algebraic degree of any span or a good estimate if curve spans are not algebraic.

dimension: number

Gets the dimension of the object. The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.

domain: number[]

Gets or sets the domain of the curve.

hasBrepForm: boolean

Returns true if the Brep.TryConvertBrep function will be successful for this object

isClosed: boolean

Gets a value indicating whether or not this curve is a closed curve.

isDeformable: boolean

true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.

isPeriodic: boolean

Gets a value indicating whether or not this curve is considered to be Periodic.

isValid: boolean

Tests an object to see if it is valid.

isValidWithLog: [boolean, string]

...

line: Line

Gets or sets the Line value inside this curve.

objectType: ObjectType

Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

pointAtEnd: number[]

Evaluates point at the end of the curve.

pointAtStart: number[]

Evaluates point at the start of the curve.

spanCount: number

Gets the number of non-empty smooth (c-infinity) spans in the curve.

tangentAtEnd: number[]

Evaluate unit tangent vector at the end of the curve.

tangentAtStart: number[]

Evaluates the unit tangent vector at the start of the curve.

userStringCount: number

Gets the amount of user strings.

Methods

  • Parameters

    • t: number

      Curve parameter of new start/end point. The returned curves domain will start at t.

    Returns boolean

    true on success, false on failure.

    Description

    If this curve is closed, then modify it so that the start/end point is at curve parameter t.

  • Parameters

    • desiredDimension: number

      The desired dimension.

    Returns boolean

    true if the curve's dimension was already desiredDimension or if the curve's dimension was successfully changed to desiredDimension; otherwise false.

    Description

    Changes the dimension of a curve.

  • Returns CurveOrientation

    The orientation of this curve with respect to world XY plane.

    Description

    Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in the world XY plane. Only works with simple (no self intersections) closed, planar curves.

  • Parameters

    • plane: Plane

      The plane in which to solve the orientation.

    Returns CurveOrientation

    The orientation of this curve with respect to world XY plane.

    Description

    Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in a given plane. Only works with simple (no self intersections) closed, planar curves.

  • Parameters

    • t: number

      Evaluation parameter.

    Returns number[]

    Curvature vector of the curve at the parameter t.

    Description

    Evaluate the curvature vector at a curve parameter.

  • Parameters

    • t: number

      Curve parameter to evaluate.

    • derivativeCount: number

      Number of derivatives to evaluate, must be at least 0.

    Returns number[][]

    An array of vectors that represents all the derivatives starting at zero.

    Description

    Evaluate the derivatives at the specified curve parameter.

  • Parameters

    • t: number

      Curve parameter to evaluate.

    • derivativeCount: number

      Number of derivatives to evaluate, must be at least 0.

    • side: CurveEvaluationSide

      Side of parameter to evaluate. If the parameter is at a kink, it makes a big difference whether the evaluation is from below or above.

    Returns void

    An array of vectors that represents all the derivatives starting at zero.

    Description

    Evaluate the derivatives at the specified curve parameter.

  • Parameters

    • t: number

      Evaluation parameter.

    Returns object

    [boolean, Plane] (boolean) true on success, false on failure. (Plane) The frame is returned here.

    Description

    Returns a 3d frame at a parameter.

  • Parameters

    • accurate: boolean

      If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.

    Returns BoundingBox

    The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

    Description

    Bounding box solver. Gets the world axis aligned bounding box for the geometry.

  • Parameters

    • nurbsParameter: number

      NURBS form parameter.

    Returns object

    [boolean, number] (boolean) true on success, false on failure. (number) Curve parameter.

    Description

    Convert a NURBS curve parameter to a curve parameter.

  • Parameters

    • curveParameter: number

      Curve parameter.

    Returns object

    [boolean, number] (boolean) true on success, false on failure. (number) NURBS form parameter.

    Description

    Convert a curve parameter to a NURBS curve parameter.

  • Parameters

    • key: string

      id used to retrieve the string.

    Returns string

    string associated with the key if successful. null if no key was found.

    Description

    Gets user string from this geometry.

  • Returns string[]

    Description

    Gets a copy of all (user key string, user value string) pairs attached to this geometry.

  • Returns boolean

    true if the curve can be represented by an arc or a circle within tolerance.

    Description

    Test a curve to see if it can be represented by an arc or circle within RhinoMath.ZeroTolerance.

  • Returns boolean

    true if the Curve can be represented by a circle within tolerance.

    Description

    Test a curve to see if it can be represented by a circle within RhinoMath.ZeroTolerance.

  • Returns boolean

    true if the Curve can be represented by an ellipse within tolerance.

    Description

    Test a curve to see if it can be represented by an ellipse within RhinoMath.ZeroTolerance.

  • Returns boolean

    true if the curve is linear.

    Description

    Test a curve to see if it is linear to within RhinoMath.ZeroTolerance units (1e-12).

  • Returns boolean

    true if the curve is planar (flat) to within RhinoMath.ZeroTolerance units (1e-12).

    Description

    Test a curve for planarity.

  • Returns boolean

    true if this curve can be represented as a polyline; otherwise, false.

    Description

    Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.

  • Returns boolean

    false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

    Description

    If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.

  • Parameters

    • t: number

      Evaluation parameter.

    Returns number[]

    Point (location of curve at the parameter t).

    Description

    Evaluates point at a curve parameter.

  • Returns boolean

    true on success, false on failure.

    Description

    Reverses the direction of the curve.

  • Parameters

    • angleRadians: number

      Angle of rotation in radians.

    • rotationAxis: number[]

      Direction of the axis of rotation.

    • rotationCenter: number[]

      Point on the axis of rotation.

    Returns boolean

    true if geometry successfully rotated.

    Description

    Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

  • Parameters

    • scaleFactor: number

      The uniform scaling factor.

    Returns boolean

    true if geometry successfully scaled.

    Description

    Scales the object by the specified factor. The scale is centered at the origin.

  • Parameters

    • point: number[]

      New end point of curve.

    Returns boolean

    true on success, false on failure.

    Description

    Forces the curve to end at a specified point. Not all curve types support this operation.

  • Parameters

    • point: number[]

      New start point of curve.

    Returns boolean

    true on success, false on failure.

    Description

    Forces the curve to start at a specified point. Not all curve types support this operation.

  • Parameters

    • key: string

      id used to retrieve this string.

    • value: string

      string associated with key.

    Returns boolean

    true if successful, false if not.

    Description

    Attach a user string (key,value combination) to this geometry.

  • Parameters

    • t: number

      Parameter to split the curve at in the interval returned by Domain().

    Returns Curve[]

    Two curves on success, null on failure.

    Description

    Splits (divides) the curve at the specified parameter. The parameter must be in the interior of the curve's domain.

  • Parameters

    • t: number

      Evaluation parameter.

    Returns number[]

    Unit tangent vector of the curve at the parameter t.

    Description

    Evaluates the unit tangent vector at a curve parameter.

  • Returns string

    Description

    Create a JSON string representation of this object

  • Parameters

    • subdomain: number[]

      The NURBS representation for this portion of the curve is returned.

    Returns NurbsCurve

    NURBS representation of the curve on success, null on failure.

    Description

    Constructs a NURBS curve representation of this curve.

  • Parameters

    • xform: Transform

      Transformation to apply to geometry.

    Returns boolean

    true if geometry successfully transformed.

    Description

    Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.

  • Parameters

    • translationVector: number[]

      A moving vector.

    Returns boolean

    true if geometry successfully translated.

    Description

    Translates the object along the specified vector.

  • Parameters

    • t0: number

      Start of the trimming interval. Portions of the curve before curve(t0) are removed.

    • t1: number

      End of the trimming interval. Portions of the curve after curve(t1) are removed.

    Returns Curve

    Trimmed portion of this curve is successful, null on failure.

    Description

    Removes portions of the curve outside the specified interval.

  • Returns object

    [boolean, Arc] (boolean) true if the curve could be converted into an arc. (Arc) On success, the Arc will be filled in.

    Description

    Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.

  • Returns object

    [boolean, Circle] (boolean) true if the curve could be converted into a Circle. (Circle) On success, the Circle will be filled in.

    Description

    Try to convert this curve into a circle using RhinoMath.ZeroTolerance.

  • Returns object

    [boolean, Polyline] (boolean) true if this curve can be represented as a polyline; otherwise, false. (Polyline) If true is returned, then the polyline form is returned here.

    Description

    Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.

  • Parameters

    • points: Point3dList | number[][]

      Control points as an array of arrays containing three numbers or a Point3dList.

    • degree: number

      Degree of curve. The number of control points must be at least degree+1.

    Returns Curve

    Description

    Constructs a curve from a set of control-point locations.

  • Parameters

    • json: object

      A json formatted object in the following format (values are orientative):

      {
      version: 10000,
      archive3dm: 60,
      opennurbs: -1877964208,
      data: 'encoded 3dm object data'
      }

    Returns CommonObject

    Description

    Decodes a Rhino Object

Generated using TypeDoc