Model.hmplygeomsmoothing#

Model.hmplygeomsmoothing(collection, num_iters, tol, create_line, create_surface, mode)#

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 for smoothing.

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

  • tol (double) –

    Threshold value to identify local and small ply regions for elimination. The value depends on the small region type (see mode below). Particularly:

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

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

  • create_line (int) –

    0 - Do not create contour lines for plies

    1 - Create contour lines for plies

  • create_surface (int) –

    0 - Do not create geometric surfaces for plies

    1 - Create geometric surfaces for plies

  • mode (int) –

    A flag that specifies modes for small ply region elimination, as well as creating the lines and surfaces.

    Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4). Valid Bit options are:

    Bit0

    Detect small ply coverage regions. Valid values are:

    0 - Detect small ply coverage regions by area ratio (local region area/ total design area)

    1 - Detect small ply coverage regions by number of elements

    Bit1

    Disconnected ply regions into separate new ply entities. Valid values are:

    0 - Do not split disconnected ply regions into separate new ply entities

    1 - Split disconnected ply regions into separate new ply entities

    Bit2

    Update ply element sets. Valid values are:

    0 - Do not update ply element sets

    1 - Update ply element sets

    Bit3

    Create geometry entities. Valid values are:

    0 - Create geometry entities in original component

    1 - Create geometry entities in separate components for different plies

    Bit4

    Populate plies with geometry entities. Valid values are:

    0 - Do not populate plies with geometry entities

    1 - Populate plies with geometry entities

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Detect small ply coverage regions (Bit0)
    Disconnected ply regions into separate new ply entities (Bit1)
    Update ply element sets (Bit2)
    Create geometry entities (Bit3)
    Populate plies with geometry entities (Bit4)
    Calculated argument value: 0

Example#

Create smoothed geometry lines and surfaces in separate components , with 5 iterations of smooth , eliminate small ply regions with area less than 0.05 of the total design , and finally populate the ply with the geometry entities#
import hm
import hm.entities as ent

model = hm.Model()

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

model.hmplygeomsmoothing(
    collection=ply_collection,
    num_iters=5,
    tol=0.05,
    create_line=1,
    create_surface=1,
    mode=28,
)