Model.autotopocleanup2#
- Model.autotopocleanup2(surface_collection, criteria_file_name, param_file_name, do_midmesh=0, extract_midsurface=0)#
Performs automatic preparation of a model’s topology for meshing, using specified element size and element quality criteria. These criteria may include geometry feature recognition (fillets, holes, beads, flanges, etc.), the topology simplification, cleaning of small features, etc. The parameters controlling the topology cleanup stages and tools are given as a set of topology cleanup parameters.
In comparison with
Model.autotopocleanup(), theModel.autotopocleanup2()by default excludes some cleanup operations even if they are set in the input parameters. Currently, the direct midmesh option is excluded by default.- Parameters:
surface_collection (Collection) – The collection containing the input surface entities.
criteria_file_name (hwString) – The path to the file with element quality criteria. If the quality criteria file has been defined using
Model.readqualitycriteria()orModel.setqualitycriteria()functions, the value of this option can be set tocriteria_file_name="dummy".param_file_name (hwString) – The path to the file with topology cleanup parameters. By default, the midmesh operation is ignored even if enabled in the parameters file. If the cleanup parameters file has been defined using
Model.readbatchparamsfile(),Model.batchparams_update(), orModel.create_batch_file()functions, the value of this option can be set toparam_file_name="dummy".do_midmesh (int) –
Controls the use of allow midmesh parameter given in the input parameters file. Valid options are:
0 - Disabled
1 - Enabled
extract_midsurface (int) –
Controls the use of extract midsurface parameter given in the input parameters file.
0 - Disabled
1 - Enabled
Examples#
Perform topology cleanup of all displayed surfaces use element quality criteria “C:/cleanup_files/nvh10.criteria” and quality parameters file “C:/cleanup_files/nvh10.param”#import hm import hm.entities as ent model = hm.Model() surf_col = hm.CollectionByDisplayed(model, ent.Surface) model.autotopocleanup( surfcollection=surf_col, criteria_file_name="C:/cleanup_files/nvh10.criteria", param_file_name="C:/cleanup_files/nvh10.param", )
Perform topology cleanup of all displayed surafaces use element quality criteria and quality parameters set beforehand#import hm import hm.entities as ent model = hm.Model() # Setting quality criteria from command file quality_string_list = [ " 0 penalty value 0.00 0.00 0.80 1.00 10.00", " 1 min length 1 1.0 3.000 2.749 1.502 1.000 0.749 1", " 2 max length 1 1.0 3.000 3.600 4.500 6.000 9.000 0", " 3 aspect ratio 1 1.0 1.000 2.000 4.400 5.000 10.000 0", " 4 warpage 1 1.0 0.000 5.000 13.000 15.000 30.000 0", " 5 max angle quad 1 1.0 90.000 110.000 134.000 140.000 160.000 0", " 6 min angle quad 1 1.0 90.000 70.000 46.000 40.000 20.000 0", " 7 max angle tria 1 1.0 60.000 80.000 112.000 120.000 150.000 0", " 8 min angle tria 1 1.0 60.000 50.000 34.000 30.000 15.000 0", " 9 skew 1 1.0 0.000 10.000 34.000 40.000 70.000 0", "10 jacobian 1 1.0 1.000 0.900 0.700 0.600 0.300 0", "11 chordal dev 0 1.0 0.000 0.300 0.800 1.000 2.000 0", "12 taper 1 1.0 0.000 0.200 0.500 0.600 0.900 0", "13 % of trias 1 1.0 0.000 6.000 10.000 15.000 20.000 0", ] model.setqualitycriteria(string_array=quality_string_list, mode=0) # Reading batch parameters from a file model.readbatchparamsfile(params_filename="E:/batch_params/general10.params") # Performing clean-up operation surf_col = hm.CollectionByDisplayed(model, ent.Surface) model.autotopocleanup( surfcollection=surf_col, criteria_file_name="dummy", param_file_name="dummy", )