Mesh
An editable mesh object.
Example
app = cf.GetApplication() project = app:NewProject() sphere = project.Geometry:AddSphere(cf.Point(0,0,0),1) project.SolutionConfigurations[1].Frequency.Start = "1e06" project.Mesher:Mesh() sphere:UnlinkMesh() -- Delete the created mesh mesh = project.Meshes[1] mesh:Delete()
Usage locations (object properties)
The following objects have properties using the Mesh object:
Property List
- Included
- Specifies whether the mesh must be included or excluded. (Read/Write boolean)
- Label
- The object label. (Read/Write string)
- Locked
- Specifies whether the mesh must be locked to prevent modifications. (Read/Write boolean)
- ModelMeshInfo
- The quality of the mesh can be examined through these properties. (Read only MeshInfo)
- ModelMeshUsedAsSimulationMesh
- Specifies whether the model mesh should be used as the simulation mesh (prevents re-meshing). (Read/Write boolean)
- SimulationMeshInfo
- The quality of the mesh can be examined through these properties. (Read only MeshInfo)
- SimulationMeshPresent
- Specifies whether the model mesh has an associated simulation mesh. (Read only boolean)
- Type
- The object type string. (Read only string)
- Visible
- Specifies whether the mesh must be shown or hidden. (Read/Write boolean)
Collection List
- CurvilinearSegmentWires
- The collection of wires meshed with curvilinear segments. The wires form part of the mesh model. (MeshCurvilinearSegmentWireCollection of MeshCurvilinearSegmentWire.)
- CurvilinearTriangleFaces
- The collection of faces meshed with curvilinear triangles. The faces form part of the mesh model. (MeshCurvilinearTriangleFaceCollection of MeshCurvilinearTriangleFace.)
- SegmentWires
- The collection of wires meshed with segments. The wires form part of the mesh model. (MeshSegmentWireCollection of MeshSegmentWire.)
- TetrahedronRegions
- The collection of regions meshed with tetrahedra. The regions form part of the mesh model. (MeshTetrahedronRegionCollection of MeshTetrahedronRegion.)
- Transforms
- The collection of transforms on the operator. (TransformMeshCollection of Transform.)
- TriangleFaces
- The collection of faces meshed with flat triangles. The faces form part of the mesh model. (MeshTriangleFaceCollection of MeshTriangleFace.)
- UnmeshedCylinderRegions
- The collection of unmeshed cylinders that form part of the mesh model. (MeshUnmeshedCylinderRegionCollection of MeshUnmeshedCylinderRegion.)
- UnmeshedPolygonFaces
- The collection of unmeshed faces that form part of the mesh model. (MeshUnmeshedPolygonFaceCollection of MeshUnmeshedPolygonFace.)
Method List
- CopyAndMirror (properties table)
- Apply a copy and mirror using a table defining the properties. (Returns a Mesh object.)
- CopyAndRotate (origin Coordinate, rotationaxis Coordinate, angle Expression, count number)
- Copy and rotate the mesh. (Returns a List of Mesh object.)
- CopyAndRotate (properties table, count number)
- Apply a copy and rotate using a table defining the properties. (Returns a List of Mesh object.)
- CopyAndTranslate (from Coordinate, to Coordinate, count number)
- Copy and translate the mesh. (Returns a List of Mesh object.)
- CopyAndTranslate (properties table, count number)
- Apply a copy and translate using a table defining the properties. (Returns a List of Mesh object.)
- Delete ()
- Deletes the mesh.
- DeleteMeshEntities (entities List of MeshEntity)
- Deletes the given list of mesh entities.
- DeleteSimulationMesh ()
- Deletes the simulation mesh.
- Duplicate ()
- Duplicates the mesh. (Returns a Mesh object.)
- GetAllMeshEntities ()
- Returns all mesh entities that form part of the mesh model. (Returns a List of MeshEntity object.)
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
- Replace (replacementMesh Mesh)
- Replace the the mesh with another mesh transferring the properties and ports to the new mesh. (Returns a Mesh object.)
- ReverseElementNormals ()
- Reverses the element (e.g. MeshTriangle or MeshCurvilinearTriangle) normals of the mesh.
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- UnlinkSimulationMesh (unlinkoption UnlinkMeshOptionEnum)
- Unlinks the simulation mesh from the model mesh. (Returns a Mesh object.)
Property Details
- Included
- Specifies whether the mesh must be included or excluded.
- Type
- boolean
- Access
- Read/Write
- Label
- The object label.
- Type
- string
- Access
- Read/Write
- Locked
- Specifies whether the mesh must be locked to prevent modifications.
- Type
- boolean
- Access
- Read/Write
- ModelMeshInfo
- The quality of the mesh can be examined through these properties.
- Type
- MeshInfo
- Access
- Read only
- ModelMeshUsedAsSimulationMesh
- Specifies whether the model mesh should be used as the simulation mesh (prevents re-meshing).
- Type
- boolean
- Access
- Read/Write
- SimulationMeshInfo
- The quality of the mesh can be examined through these properties.
- Type
- MeshInfo
- Access
- Read only
- SimulationMeshPresent
- Specifies whether the model mesh has an associated simulation mesh.
- Type
- boolean
- Access
- Read only
- Type
- The object type string.
- Type
- string
- Access
- Read only
- Visible
- Specifies whether the mesh must be shown or hidden.
- Type
- boolean
- Access
- Read/Write
Collection Details
- CurvilinearSegmentWires
- The collection of wires meshed with curvilinear segments. The wires form part of the mesh model.
- CurvilinearTriangleFaces
- The collection of faces meshed with curvilinear triangles. The faces form part of the mesh model.
- SegmentWires
- The collection of wires meshed with segments. The wires form part of the mesh model.
- TetrahedronRegions
- The collection of regions meshed with tetrahedra. The regions form part of the mesh model.
- Transforms
- The collection of transforms on the operator.
- TriangleFaces
- The collection of faces meshed with flat triangles. The faces form part of the mesh model.
- UnmeshedCylinderRegions
- The collection of unmeshed cylinders that form part of the mesh model.
- UnmeshedPolygonFaces
- The collection of unmeshed faces that form part of the mesh model.
Method Details
- CopyAndMirror (properties table)
- Apply a copy and mirror using a table defining the properties.
- CopyAndRotate (origin Coordinate, rotationaxis Coordinate, angle Expression, count number)
- Copy and rotate the mesh.
- Input Parameters
- origin(Coordinate)
- The coordinates of the origin of the rotation.
- rotationaxis(Coordinate)
- The axis of rotation.
- angle(Expression)
- The angle of rotation (degrees).
- count(number)
- The number of copies.
- Return
- CopyAndRotate (properties table, count number)
- Apply a copy and rotate using a table defining the properties.
- CopyAndTranslate (from Coordinate, to Coordinate, count number)
- Copy and translate the mesh.
- Input Parameters
- from(Coordinate)
- Translate from coordinate.
- to(Coordinate)
- Translate to coordinate.
- count(number)
- The number of copies.
- Return
- CopyAndTranslate (properties table, count number)
- Apply a copy and translate using a table defining the properties.
- Delete ()
- Deletes the mesh.
- DeleteMeshEntities (entities List of MeshEntity)
- Deletes the given list of mesh entities.
- Input Parameters
- entities(List of MeshEntity)
- The list of entities to delete.
- DeleteSimulationMesh ()
- Deletes the simulation mesh.
- Duplicate ()
- Duplicates the mesh.
- Return
- Mesh
- The duplicated mesh.
- GetAllMeshEntities ()
- Returns all mesh entities that form part of the mesh model.
- Return
- List of MeshEntity
- All mesh entities that form part of the mesh model.
- GetProperties ()
- Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
- Return
- table
- A properties table.
- Replace (replacementMesh Mesh)
- Replace the the mesh with another mesh transferring the properties and ports to the new mesh.
- ReverseElementNormals ()
- Reverses the element (e.g. MeshTriangle or MeshCurvilinearTriangle) normals of the mesh.
- SetProperties (properties table)
- Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
- Input Parameters
- properties(table)
- A table of properties defining the new state of the object.
- UnlinkSimulationMesh (unlinkoption UnlinkMeshOptionEnum)
- Unlinks the simulation mesh from the model mesh.
- Input Parameters
- unlinkoption(UnlinkMeshOptionEnum)
- Mesh ports are created. Solution entities are either keep with their original assignment or reassigned to the new port.
- Return
- Mesh
- The unlinked mesh.