MeshCollection

A collection of editable meshes.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Initialise the frequency

project.SolutionConfigurations[1].Frequency.Start = "1e06"

    -- Create geometry and mesh

project.Geometry:AddSphere(cf.Point(0,0,0),1)

project.Mesher:Mesh()
project.Geometry["Sphere1"]:UnlinkMesh()
project.Mesher:Mesh()
project.Geometry["Sphere1"]:UnlinkMesh()

    -- Obtain a handle to the 'MeshCollection'
    
meshCollection = project.Meshes   

    -- Print the number of meshes in the collection
    
meshCollectionCount = meshCollection.Count

Usage locations (collections)

The following objects contain the MeshCollection collection:

Property List

Count
The number of Mesh items in the collection. (Read only number)
Find
The mesh find tools. (Read only MeshFind)
Repair
Mesh repair tools. (Read only MeshRepair)
Type
The object type string. (Read only string)

Collection List

Assemblies
The collection of mesh assemblies. (MeshAssemblyCollection of MeshAssembly.)

Method List

Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
GetAllMeshEntities ()
Returns all mesh entities. (Returns a List of MeshEntity object.)
Item (index number)
Returns the Mesh at the given index. (Returns a Mesh object.)
Item (label string)
Returns the Mesh with the given label. (Returns a Mesh object.)
Items ()
Returns a table of Mesh. (Returns a List of Mesh object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the Mesh at the given index in the collection. (Read Mesh)
[string]
Returns the Mesh with the given name in the collection. (Read Mesh)

Property Details

Count
The number of Mesh items in the collection.
Type
number
Access
Read only
Find
The mesh find tools.
Type
MeshFind
Access
Read only
Repair
Mesh repair tools.
Type
MeshRepair
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Collection Details

Assemblies
The collection of mesh assemblies.
Type
MeshAssemblyCollection

Method Details

Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the Mesh.
Return
boolean
The success of the check.
GetAllMeshEntities ()
Returns all mesh entities.
Return
List of MeshEntity
All mesh entities.
Item (index number)
Returns the Mesh at the given index.
Input Parameters
index(number)
The index of the Mesh.
Return
Mesh
The Mesh at the given index.
Item (label string)
Returns the Mesh with the given label.
Input Parameters
label(string)
The label of the Mesh.
Return
Mesh
The Mesh with the given label.
Items ()
Returns a table of Mesh.
Return
List of Mesh
A table of Mesh.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for Mesh.