MeshTriangles
The list of mesh triangles.
Example
app = cf.GetApplication() project = app:NewProject() -- Set the frequency project.SolutionConfigurations[1].Frequency.Start = "1e06" -- Create geometry and mesh project.Geometry:AddSphere(cf.Point(0,0,0),1.0) project.Mesher:Mesh() project.Geometry["Sphere1"]:UnlinkMesh() meshTriangleFaces = project.Meshes["Sphere1_1"].TriangleFaces for i in ipairs(meshTriangleFaces) do meshTriangleFace = meshTriangleFaces[i] -- Obtain a handle to 'MeshTriangles' meshTriangles = meshTriangleFace.Triangles -- Store the number of mesh triangles meshTrianglesCount = meshTriangles.Count end
Usage locations (object properties)
The following objects have properties using the MeshTriangles object:
Property List
Method List
- ClosestVertexTo (point Point)
- Gets the closest vertex, of the mesh element to the given point. (Returns a MeshVertex object.)
Index List
- [number]
- Returns the Triangle at the given index. (Read MeshTriangle)
Property Details
Method Details
- ClosestVertexTo (point Point)
- Gets the closest vertex, of the mesh element to the given point.
- Input Parameters
- point(Point)
- The point to query against.
- Return
- MeshVertex
- The closest vertex of the element to the point.