Model.external_skin_extraction#

Model.external_skin_extraction(collection, mode, min_size, max_size, extraction_mode, seed_point_coordinates, target_point_coordinates, baffle_detection, min_surface_area, mc_collection, graphicsDB=0)#

Detects leaks and extracts exposed exterior or interior faces and surfaces.

Parameters:
  • collection (Collection) – The collection containing the inout entities.

  • mode (int) –

    The detection mode.

    1 - Leak detection only.

    2 - Leak detection with skin extraction. If a leak is detected, the skin is not extracted.

    3 - Skin extraction without leak detection.

    4 - Leak detection with gap filling.

  • min_size (double) – Leaks smaller than min_size will be ignored. Higher min_size values can lead to longer skin extraction time.

  • max_size (double) – This value should be set to 0.0.

  • extraction_mode (int) –

    The extraction mode.

    1 - Exterior skin extraction.

    2 - Interior (cavity) skin extraction.

  • seed_point_coordinates (hwString) – String containing the x, y, z coordinates of the seed point defined within the target volume for leak detection. The point should be located inside the cavity, not close to the volume boundaries.

  • target_point_coordinates (hwString) – String containing the x, y, z coordinates of the seed point defined outside the target volume for leak detection. The point should be located outside the cavity not close to the volume boundaries.

  • baffle_detection (int) –

    The baffle detection mode.

    0 - No baffles detected.

    1 - Only external baffles are detected.

    2 - Only internal baffles are detected.

    3 - Both external and internal baffles are detected.

  • min_surface_area (double) – Defines the percentage of the skin area. For surface input, if the exposed area of the detected surfaces is less than the user-defined percentage of the total area, the surfaces are not marked as skin.

  • mc_collection (Collection) – The collection containing the meshcontrol entities.

  • graphicsDB (int) – Reserved for future development.

Example#

Detect a leak bigger than 20.0 and extract the exterior skin from displayed elements define a volume around a point with coordinates (2690.0, 0.0, 830.0) with minimal surface area set to 10 %#
import hm
import hm.entities as ent

model = hm.Model()

elements = hm.CollectionByDisplayed(model, ent.Element)

model.external_skin_extraction(
    collection=elements,
    mode=2,
    min_size=20.0,
    max_size=0.0,
    extraction_mode=1,
    seed_point_coordinates="2690.0 0.0 830.0",
    target_point_coordinates,
    baffle_detection=0,
    min_surface_area=10.0,
    mc_collection=hm.Collection(model,ent.Meshcontrol,populate=False)
)