Selva Compute API Reference - v2.1.0
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    angleDegrees: number

    Gets the angles of this arc in degrees.

    angleRadians: number

    Gets the angles of this arc in radians.

    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.

    isCompleteCircle: boolean

    Gets a value indicating whether or not this curve can be represented by a complete circle.

    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]

    ...

    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.

    radius: number

    Gets the radius of this ArcCurve.

    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

    • Gets the arc that is contained within this ArcCurve.

      Returns Arc

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

      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.

      Changes the dimension of a curve.

    • Returns CurveOrientation

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

      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.

      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.

      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.

      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.

      Evaluate the derivatives at the specified curve parameter.

    • Returns GeometryBase

      An object of the same type as this, with the same properties and behavior.

      Constructs a deep (full) copy of this object.

    • ...

      Returns void

    • Parameters

      • t: number

        Evaluation parameter.

      Returns object

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

      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.

      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.

      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.

      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.

      Gets user string from this geometry.

    • Returns string[]

      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.

      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.

      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.

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

    • Returns boolean

      true if the curve is linear.

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

      Test a curve for planarity.

    • Returns boolean

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

      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.

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

      Evaluates point at a curve parameter.

    • ...

      Returns string

    • Returns boolean

      true on success, false on failure.

      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.

      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.

      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.

      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.

      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.

      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.

      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.

      Evaluates the unit tangent vector at a curve parameter.

    • Returns string

      Create a JSON string representation of this object

    • Returns NurbsCurve

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

      Constructs a NURBS curve representation of this curve.

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

      Constructs a NURBS curve representation of this curve.

    • Parameters

      • xform: Transform

        Transformation to apply to geometry.

      Returns boolean

      true if geometry successfully transformed.

      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.

      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.

      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.

      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.

      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.

      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: number[][] | Point3dList

        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

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

    • Parameters

      • arc: Arc

        An original arc.

      Returns ArcCurve

      Initializes a new instance, copying values from another Arc.

    • Parameters

      • arc: Arc

        An original arc.

      • t0: number

        A new Domain.T0 value.

      • t1: number

        A new Domain.T1 value.

      Returns ArcCurve

      Initializes a new instance, copying values from another Arc and specifying the needed parametrization of the arc.

    • Parameters

      • circle: Circle

        The original circle.

      Returns ArcCurve

      Initializes a new instance, copying copying the shape of a Circle. Parameterization will be [0;circle.Circumference]

    • Parameters

      • circle: Circle

        The original circle.

      • t0: number

        A new Domain.T0 value.

      • t1: number

        A new Domain.T1 value.

      Returns ArcCurve

      Initializes a new instance, copying copying the shape of a Circle and specifying the needed parametrization of the arc. Circle will not be newly cut at these parameterizations.

    • 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

      Decodes a Rhino Object