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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    hasBrepForm: boolean

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

    isDeformable: boolean

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

    isSolid: boolean

    Gets a values indicating whether a surface is solid.

    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.

    orientationIsReversed: boolean

    Gets or sets face orientation. true if face orientation is opposite of natural surface orientation.

    userStringCount: number

    Gets the amount of user strings.

    Methods

    • Parameters

      • pathCurve: Curve

        The path to extrude along. Note, the direction of the extrusion will follow the direction of the curve.

      • cap: boolean

        If true, the extrusion is capped with a translation of the face being extruded

      Returns Brep

      A Brep on success or null on failure.

      Extrude a face in a Brep.

    • Parameters

      • direction: number

        0 gets first parameter's domain, 1 gets second parameter's domain.

      Returns number

      The maximum degree.

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

    • Parameters

      • direction: number

        0 gets first parameter, 1 gets second parameter.

      Returns number[]

      An interval value.

      Gets the domain in a direction.

    • Returns GeometryBase

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

      Constructs a deep (full) copy of this object.

    • Parameters

      • duplicateMeshes: boolean

        If true, shading meshes will be copied as well.

      Returns Brep

      A new single-face brep synonymous with the current Face.

      Duplicate a face from the brep to create new single face brep.

    • Returns Surface

      A copy of this face's underlying surface.

      Gets a copy to the untrimmed surface that this face is based on.

    • ...

      Returns void

    • Parameters

      • u: number

        A first parameter.

      • v: number

        A second parameter.

      Returns object

      [boolean, Plane] (boolean) true if this operation succeeded; otherwise false. (Plane) A frame plane that will be computed during this call.

      Computes the orient plane on a surface given a U and V parameter. This is the simple evaluation call with no error handling.

    • 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

      Returns Mesh

      A mesh.

      Obtains a reference to a specified type of mesh for this brep face.

    • Parameters

      • surfaceS: number

        The parameter in the S, or sometimes U, direction, of this surface.

      • surfaceT: number

        The parameter in the T, or sometimes V, direction of this surface.

      Returns object

      [boolean, number, number] (boolean) True if the operation succeeded; otherwise, false. (number) S on the NURBS form. (number) T on the NURBS form.

      Translates a parameter from the current surface to the parameter space of the surface returned by .

    • Parameters

      • direction: number

        0 gets first parameter's domain, 1 gets second parameter's domain.

      Returns number[]

      An array with span vectors; or null on error.

      Gets array of span "knots".

    • Parameters

      • nurbsS: number

        The parameter in the S, or sometimes U, direction of the NURBS form surface.

      • nurbsT: number

        The parameter in the T, or sometimes V, direction of the NURBS form surface.

      Returns object

      [boolean, number, number] (boolean) True if the operation succeeded; otherwise, false. (number) S on this surface. (number) T o n this surface.

      Translates a parameter from a value on the surface returned by to the current surface.

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

    • Parameters

      • u: number

        Surface u parameter to test.

      • v: number

        Surface v parameter to test.

      Returns number

      0 if not a seam, 1 if u == Domain(0)[i] and srf(u, v) == srf(Domain(0)[1-i], v) 2 if v == Domain(1)[i] and srf(u, v) == srf(u, Domain(1)[1-i]) 3 if 1 and 2 are true.

      Tests if a surface parameter value is at a seam.

    • Parameters

      • u: number

        Surface u parameter to test.

      • v: number

        Surface v parameter to test.

      • exact: boolean

        If true, test if (u,v) is exactly at a singularity. If false, test if close enough to cause numerical problems.

      Returns boolean

      true if surface is singular at (s,t)

      Tests if a surface parameter value is at a singularity.

    • Parameters

      • direction: number

        0 = U, 1 = V.

      Returns boolean

      The indicating boolean value.

      Gets a value indicating if the surface is closed in a direction.

    • Returns boolean

      true if the surface is a portion of a cone.

      Determines if the surface is a portion of a cone within RhinoMath.ZeroTolerance.

    • Returns boolean

      true if the surface is a portion of a cylinder.

      Determines if the surface is a portion of a cylinder within RhinoMath.ZeroTolerance.

    • Parameters

      • direction: number

        0 first parameter varies and second parameter is constant e.g., point on IsoCurve(0,c) at t is srf(t,c) This is a horizontal line from left to right 1 first parameter is constant and second parameter varies e.g., point on IsoCurve(1,c) at t is srf(c,t This is a vertical line from bottom to top.

      • constantParameter: number

        The parameter that was constant on the original surface.

      Returns Curve

      An isoparametric curve or null on error.

      Gets isoparametric curve.

    • Parameters

      • direction: number

        0 = U, 1 = V.

      Returns boolean

      The indicating boolean value.

      Gets a value indicating if the surface is periodic in a direction (default is false).

    • Returns boolean

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

      Tests a surface to see if it is planar to zero tolerance.

    • Parameters

      • side: number

        side of parameter space to test 0 = south, 1 = east, 2 = north, 3 = west.

      Returns boolean

      True if this specific side of the surface is singular; otherwise, false.

      true if surface side is collapsed to a point.

    • Returns boolean

      true if the surface is a portion of a sphere.

      Determines if the surface is a portion of a sphere within RhinoMath.ZeroTolerance.

    • Returns boolean

      true if the surface is a portion of a torus.

      Determines if the surface is a portion of a torus within RhinoMath.ZeroTolerance.

    • 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

      • u: number

        A U parameter.

      • v: number

        A V parameter.

      Returns number[]

      The normal.

      Computes the surface normal at a point. This is the simple evaluation call - it does not support error handling.

    • Parameters

      • u: number

        evaluation parameters.

      • v: number

        evaluation parameters.

      Returns number[]

      Point3d.Unset on failure.

      Evaluates a point at a given parameter.

    • ...

      Returns string

    • 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

      • direction: number

        0 sets first parameter's domain, 1 sets second parameter's domain.

      • domain: number[]

        A new domain to be assigned.

      Returns boolean

      true if setting succeeded, otherwise false.

      Sets the domain in a direction.

    • Parameters

      Returns boolean

      true if the operation succeeded; otherwise false.

      Sets a reference to a specified type of mesh for this brep face.

    • 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

      • direction: number

        0 gets first parameter's domain, 1 gets second parameter's domain.

      Returns number

      The span count.

      Gets number of smooth nonempty spans in the parameter direction.

    • Returns string

      Create a JSON string representation of this object

    • Returns NurbsSurface

      NurbsSurface on success, null on failure.

      Gets a NURBS surface representation of this surface. Default tolerance of 0.0 is used.

    • ...

      Parameters

      • tolareance: number

      Returns object

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

    • Returns Surface

      A surface, or null on error.

      Gets the untrimmed surface that is the base of this face.

    • 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