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
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
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.
Method Details
- Contains (label string)
- Checks if the collection contains an item with the given label.
- GetAllMeshEntities ()
- Returns all mesh entities.
- Return
- List of MeshEntity
- All mesh entities.
- Item (index number)
- Returns the Mesh at the given index.
- Item (label string)
- Returns the Mesh with the given label.
- Items ()
- Returns 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.