Model.hmplysmoothing#

Model.hmplysmoothing(collection, num_iters, region_type, tol, split_ply)#

Allows you to create smoothed geometry contour lines and surfaces for ply entities, with various options.

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

  • num_iters (int) – The number of smoothing iterations to be run ≥ 0.

  • region_type (int) –

    Flag indicating method used for very local and small ply coverage regions (element patch or hole) detection. Valid values are:

    0 - Detect small regions by area ratio

    1 - 1etect small regions by element count

  • tol (double) –

    Threshold value to identify local and small ply regions for elimination. The value depends on the region_type. Particularly:

    region_type=0 (area ratio) - Value of tol indicates the area ratio (calculated by local region area / total design area tol\(\in [{0,1})\)

    region_type=1 (elem count) - Value of tol indicates the number of elements (tol ≥ 0, default = 15).

  • split_ply (int) –

    0 - Do not create separate ply entities from disconnected ply coverage regions

    1 - Create separate ply entities from disconnected ply coverage regions

Example#

Smooth all plies use 20 iterations , eliminate small ply regions with area less than 0.05 of the total design , and finally split disconnected ply coverage regions into separate ply entities#
import hm
import hm.entities as ent

model = hm.Model()

ply_collection = hm.Collection(model, ent.Ply)

model.hmplysmoothing(
    collection=ply_collection, num_iters=20, region_type=0, tol=0.05, split_ply=1
)