Model.penetrationrecheck#

Model.penetrationrecheck(collection, reduction, scale, display_mode, normal_scale, label, segment, magnitude_mode)#

Modifies the element thickness to correct penetration problems.

Parameters:
  • collection (Collection) – The collection containing the entities to be modified.

  • reduction (double) – The average thickness reduction.

  • scale (double) – The thickness scale factor.

  • display_mode (int) –

    The type of entity to be displayed.

    0 - Nodes

    1 - Normals

    2 - Contour

  • normal_scale (double) – The magnitude percentage or the uniform size.

  • label (int) –

    The label vector option.

    0 - Vector labels off

    1 - Vector labels on

  • segment (int) –

    The segment orientation option.

    0 - Elements normal will not be considered

    1 - Elements normal will be considered

  • magnitude_mode (int) –

    Determines if a magnitude percentage or a uniform size is to be used.

    0 - Uniform size

    1 - Magnitude percentage

Example#

Modify the element thickness#
import hm
import hm.entities as ent

model = hm.Model()

# Creating the collection that contains the elements from the group named "E2E"
filter = hm.FilterByCollection(ent.Element, ent.Group)
groups_collection = hm.Collection(model, ent.Group, "name=E2E")
elements_collection = hm.Collection(model, filter, groups_collection)

model.penetrationrecheck(
    collection=elements_collection,
    reduction=0,
    scale=1.0,
    display_mode=0,
    normal_scale=1.0,
    label=1,
    segment=1,
    magnitude_mode=1,
)

Note

templatefileset() is required.