Model.checkpenetration#

Model.checkpenetration(collection, dim_type, penetrations, self_interference, thickness_adjust, thickness_param, threshold_depth, reserved)#

Checks a group of elements for penetrations and/or self-interference.

Parameters:
  • collection (Collection) – The collection containing the entities to check fro penetration. Valid entities are elements, components and groups.

  • dim_type (int) –

    The dimensionality of the elements to check within the collection:

    0 - Check 2D and 3D elements.

    2 - Check 2D elements only.

    3 - Check 3D elements only.

  • penetrations (int) –

    0 - Ignore penetrations

    1 - Consider penetrations

  • self_interference (int) – Flag to consider self-intersections and penetrations within component.

  • thickness_adjust (int) –

    Adjust thickness flag:

    0 - Use components’ thickness values.

    1 - Multiply component’s by thickness_param.

    2 - To directly specify all thicknesses via thickness_param.

  • thickness_param (double) – Thickness, or thickness multiplier, depending on the thickness_adjust setting.

  • threshold_depth (double) – Do not consider penetrations with depths less than this value. To find zero-depth penetrations, specify any negative value.

  • reserved (int) – Reserved for future development. Must be set to 0.

Example#

Check all groups for penetrations#
import hm
import hm.entities as ent

model = hm.Model()

groups = hm.CollectionByDisplayed(model, ent.Group)

model.checkpenetration(
    collection=groups,
    dim_type=0,
    penetrations=1,
    self_interference=0,
    thickness_adjust=0,
    thickness_param=0.0,
    threshold_depth=0.0,
    reserved=0
)