Model.hm_comparesetignoreholes#

Model.hm_comparesetignoreholes(mode=0, diameter=0, length=0)#

Specifies whether to ignore holes and/or slots when performing 3D shell element-to-surface comparisons. This must precede any calls to hm_compareentities functions and must be used with Model.hm_comparesetanalysismode() > 0.

When non-zero, the analysis will compare 2D shell elements to three dimensional surface data using the shell thickness and offset information to infer a 3D shell, while also considering holes and slots. When > 0, holes and/or slots less than the specified diameter/length are ignored.

Parameters:
  • mode (int) –

    0 - Normal (default)

    1 - Ignore holes < diameter

    2 - Ignore slots < diameter and < length

    3 - Ignore both holes < diameter and slots < diameter and < length

  • diameter (double) – If mode is > 0, this is the diameter of the holes and/or slots to ignore.

  • length (double) – If mode is > 1, this is the length of the slots to ignore.

Returns:

Example#

Generate a same side comparison of surfaces with IDs 1 - 20 and elements with IDs 101 - 120 , use the 2D shell thickness and offset , ignore fillets and all holes < 8.0 in diameter#
import hm
import hm.entities as ent

model = hm.Model()

surfs = hm.Collection(model, ent.Surface, list(range(1, 21)))
elems = hm.Collection(model, ent.Element, list(range(101, 121)))

model.hm_compareinit()

model.hm_comparesetanalysismode(mode=1)

model.hm_comparesetignoreholes(mode=0, diameter=8.0, length=0.0)

model.hm_compareentitiessameside(
    source_entities=surfs,
    target_entities=elems,
    tolerance=0.1,
    result_type=2,
    review_results=False,
)

model.hm_compareend()