MeshTetrahedra
The list of mesh tetrahedra.
Example
app = cf.GetApplication() project = app:NewProject() -- Set the frequency project.SolutionConfigurations[1].Frequency.Start = "1e08" -- Create geometry, set the solution method to FEM cuboid = project.Geometry:AddCuboidAtCentre(cf.Point(0,0,0), 1.0, 1.0, 1.0) dielectric = project.Media:AddDielectric(0.01,0.01,0.01) cuboid.Regions["Region1"].Medium = dielectric cuboid.Regions["Region1"].SolutionMethod = cf.Enums.RegionSolutionMethodEnum.FEM -- Mesh project.Mesher:Mesh() project.Geometry["Cuboid1"]:UnlinkMesh() tetrahedronRegions = project.Meshes["Cuboid1_1"].TetrahedronRegions for i in ipairs(tetrahedronRegions) do tetrahedronRegion = tetrahedronRegions[i] -- Obtain a handle to the 'MeshTetrahedra' meshTetrahedra = tetrahedronRegion.Tetrahedra -- Store the number of tetrahedra in the tetrahedron region meshTetrahedraCount = meshTetrahedra.Count end
Usage locations (object properties)
The following objects have properties using the MeshTetrahedra 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 Tetrahedron at the given index. (Read MeshTetrahedron)
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.