Model.setcleanupglobalflags#
- Model.setcleanupglobalflags(flags, mode)#
Takes as input a mask of flags used for controlling some of the default modes for geometry autocleanup, element cleanup and element QI smoothing. It sets or clears the global cleanup flags according to the specified mode.
The functions which can be affected by resetting the global cleanup default flags are the
Model.autotopocleanup(),Model.hm_auto_elem_cleanup_new(),Model.hm_batchmesh(),Model.hm_failed_elements_cleanup(),Model.optimsmooth(),Model.qismoothfixfailed()andModel.qismoothconstrained().- Parameters:
flags (int) –
Flags bit value that indicate the global settings to set. To set multiple flags at once, sum the bit values for the requested flags. The default bit value for each flag is 0.
1 - Ignore component boundaries flag.
2 - Do not allow preservation of special transversal surfaces on lines generated during geometry autocleanup and batchmeshing flag.
4 - Fixed vertices created by geometry autocleanup do not remain fixed after completion flag.
mode (int) –
The mode of the manipulation of the global cleanup flags. The supported modes are as follows:
0 - resets all flags bits to 0.
1 - sets the bits specified by flags without changing other flag bits.
2 - sets all flags at once to the specified bit value.
Examples#
Setup the flags to ignore component boundaries and to not create auxiliary surfaces. Then element QI smoothing is performed. Finally, all flags are restored to their original state#import hm import hm.entities as ent model = hm.Model() model.setcleanupglobalflags(flags=3, mode=1) model.optimsmooth( smoothcollection=hm.Collection(model, ent.Element), anchorcollection=hm.Collection(model, ent.Node), criteria_filename="C:/Altair/hw10.0/hm/batchmesh/8mm.criteria", feature_angle=30.0, target_QI=0.2, max_iterations=5, time_limit=0, ) model.setcleanupglobalflags(flags=3, mode=2)
Set the auxiliary surface generation to the default#import hm import hm.entities as ent model = hm.Model() model.setcleanupglobalflags(flags=2, mode=0)
Clear the ignore component boundaries flag without change any other flags#import hm import hm.entities as ent model = hm.Model() model.setcleanupglobalflags(flags=1, mode=0)
Clear all supported flags#import hm import hm.entities as ent model = hm.Model() model.setcleanupglobalflags(flags=0, mode=2)
Clear all supported flags ( Alternatively )#import hm import hm.entities as ent model = hm.Model() model.setcleanupglobalflags(flags=7, mode=0)