MeshSegments

The list of mesh segments.

Example

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

    -- Settings for normal meshing

project.Mesher.Settings.WireRadius = "0.01"
advancedMeshSettings = project.Mesher.Settings.Advanced
advancedMeshSettings.CurvilinearSegments = cf.Enums.MeshCurvilinearOptionsEnum.Disabled

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

    -- Create geometry and mesh

project.Geometry:AddHelix(cf.Point(0,0,0), 0.1, 0.1, 1.0, 5.0, false)
project.Mesher:Mesh()
project.Geometry["Helix1"]:UnlinkMesh()

meshSegmentWires = project.Meshes["Helix1_1"].SegmentWires

for i in ipairs(meshSegmentWires) do  
    segmentWires = meshSegmentWires[i]    
    
    -- Obtain a handle to the 'MeshSegments'
    
    meshSegments = segmentWires.Segments
    
    -- Store the number of mesh segments
    
    meshSegmentsCount = meshSegments.Count
end

Usage locations (object properties)

The following objects have properties using the MeshSegments object:

Property List

Count
The number of segments in the mesh entity. (Read only number)
Type
The object type string. (Read only string)

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 Segment at the given index. (Read MeshSegment)

Property Details

Count
The number of segments in the mesh entity.
Type
number
Access
Read only
Type
The object type string.
Type
string
Access
Read only

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.