TriangleMesh Object
Derived from: Base ObjectDefined in namespace "adsk::fusion" and the header file is <Fusion/MeshData/TriangleMesh.h>
Description
The TriangleMesh object represents all of the data defining a triangular mesh.Methods
| Name | Description |
| classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType(). |
Properties
| Name | Description |
| isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference. |
| nodeCoordinates | Returns the node coordinates as an array of Point3D objects. |
| nodeCoordinatesAsDouble | Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate. |
| nodeCoordinatesAsFloat | Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate. |
| nodeCount | Returns the total number of nodes in the mesh. |
| nodeIndices | Returns an array of indices that define which nodes are used for each triangle. This is used to look-up the coordinates in the NodeCoordinates array to get the three coordinates of each triangle. |
| normalVectors | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of Vector3D objects. |
| normalVectorsAsDouble | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of doubles where they are the x, y, z components of each vector. |
| normalVectorsAsFloat | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of floats where they are the x, y, z components of each vector. |
| objectType | This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object. It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType(): |
| surfaceTolerance | Returns the surface tolerance that was used to generate this mesh. This is most useful when using display meshes that have already been calculated. |
| textureCoordinates | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of Point2D objects where the x and y properties of the point are u and v coordinates as defined in parametric space. There is a texture coordinate for each vertex in the face mesh. |
| textureCoordinatesAsDouble | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of doubles where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh. |
| textureCoordinatesAsFloat | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of floats where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh. |
| triangleCount | Returns the number of triangles in the mesh. |
