Model.midmesh_inspect_end#

Model.midmesh_inspect_end()#

Clears memory and ends the midmesh inspection module. This must be preceded by any calls to Model.midmesh_inspect_init() and other midmesh_inspect_ APIs.

Example#

Detect and correct nodes off mid , delete empty sets , and shut down the inspect module#
import hm
import hm.entities as ent

model = hm.Model()

source_collection = hm.Collection(model, ent.Component, "name=shell")
target_collection = hm.Collection(model, ent.Component, "Name=MidmeshEdges OR Name=Mid")

model.midmesh_inspect_init(
    SourceCollection=source_collection,
    TargetCollection=target_collection,
    MinNodeOffMidDeviation=0.2,
    MinNodeOffSolidEdgeDeviation=0.2,
    MinNodeOutOfSolidDeviation=0.2,
    MinEdgeOffEdgeDeviation=0.2,
    MinElemCenterDeviation=0.3,
    CheckMinElemSize=1,
)

node_collection = hm.Collection(model, ent.Node, target_collection)
model.midmesh_inspect_fix_problems(
    entitylist=list(node_collection),
    ProblemType="NodeOffMid",
    SmoothClusters=True,
    SmoothMethod="Auto",
)

model.midmesh_inspect_delete_sets(mode=2)

model.midmesh_inspect_end()