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

    hasCachedTextureCoordinates: boolean

    Will return true if SetCachedTextureCoordinates has been called; otherwise will return false.

    hasPrincipalCurvatures: boolean

    HasPrincipalCurvatures

    isClosed: boolean

    Returns true if every mesh "edge" has two or more faces.

    isDeformable: boolean

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

    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.

    partitionCount: number

    Number of partition information chunks stored on this mesh based on the last call to CreatePartitions

    userStringCount: number

    Gets the amount of user strings.

    Methods

    • Parameters

      • other: Mesh

        Mesh to append to this one.

      Returns void

      Appends a copy of another mesh to this one and updates indices of appended mesh parts.

    • Returns void

      Removes surface parameters, curvature parameters and surface statistics from the mesh.

    • Returns void

      Removes all texture coordinate information from this mesh.

    • Returns boolean

      true on success, false on failure.

      Removes any unreferenced objects from arrays, re-indexes as needed and shrinks arrays to minimum required size.

    • Returns boolean

      true on success

      In ancient times (or modern smart phone times), some rendering engines were only able to process small batches of triangles and the CreatePartitions() function was provided to partition the mesh into subsets of vertices and faces that those rendering engines could handle.

    • Returns void

      Destroys mesh partition.

    • Returns void

      Removes topology data, forcing all topology information to be recomputed.

    • Returns void

      Destroys the mesh vertex access tree.

    • 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

    • ...

      Returns MeshFaceList

    • 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

      • textureMappingId: string

        Texture mapping Id

      Returns CachedTextureCoordinates

      Object which allows access to coordinates and other props.

      Call this method to get cached texture coordinates for a texture mapping with the specified Id.

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

      Returns true if every mesh "edge" has at most two faces.

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

    • ...

      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.

    • TODO

      Returns void

    • Parameters

      • tm: TextureMapping

        Texture mapping

      • xf: Transform

        Transform to apply to the texture mapping

      • lazy: boolean

        Whether to generate lazily (true) or right away (false)

      Returns void

      Set texture coordinates using given mapping and applying given transform. Set lazy to false to generate texture coordinates right away.

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

    • Returns string

      Create a JSON string representation of this object

    • Returns object

      A Three.js bufferGeometry.

      Creates a Three.js bufferGeometry from a Rhino mesh.

    • Parameters

      • rotateToYUp: boolean

        Rotate the result to Y up.

      Returns object

      A Three.js bufferGeometry.

      Creates a Three.js bufferGeometry from a Rhino mesh.

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

      mesh representing control net on success, null on failure

      Create a mesh from a SubD control net

    • Parameters

      • object: object

        A js object in the form of { data: bufferGeometry }

      Returns Mesh

      Creates a Rhino mesh from a Three.js buffer geometry.

    • 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

    • Parameters

      • meshes: Mesh[]

        The array of Rhino meshes.

      • rotateYUp: boolean

        Whether or not to orient the result to Y up.

      Returns object

      A Three.js bufferGeometry.

      Cretes a Three.js bufferGeometry from an array of Rhino meshes.