Model.midmesh_inspect_fix_problems#
- Model.midmesh_inspect_fix_problems(entitylist, ProblemType, SmoothClusters=False, SmoothMethod='MAX')#
Repairs found problems in the midmesh inspection module. This must be preceded by a call to
Model.midmesh_inspect_init().- Parameters:
entitylist (EntityList) – A list containing the entity objects. Valid entities are elements and nodes.
ProblemType (hwString) – The type of problem to repair. Valid values are EdgeOffSolidEdge, ElemCenterOffMid, NodeOffMid, and NodeOffSolidEdge.
SmoothClusters (bool) –
Flag about smoothing correction. Valid options are:
False - Disables smoothing after correction (default).
True - Enables smoothing after correction.
SmoothMethod (hwString) – If
SmoothClusters=True, this sets the smoothing method to use. Valid values are Auto, FixShape, FixSize, and QI.
Example#
Detect and correct nodes off mid , delete empty sets , and shut down the inspection 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, ) 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()