Model.solidmap_solids_begin2#

Model.solidmap_solids_begin2(solid_collection, source_surface_collection, destination_surface_collection, options, elem_size)#

This function is used by the multi-solid mapping algorithm to indicate the beginning of a solid mapping function block. It must be paired with the Model.solidmap_solids_end().

The functions Model.solidmap_solids_set_density(), Model.solidmap_solids_set_elemsize(), Model.solidmap_solids_set_face_params() and Model.solidmap_solids_set_mapface() can appear in a multi-solids solidmap function block between Model.solidmap_solids_begin() and Model.solidmap_solids_end().

Parameters:
  • solid_collection (Collection) – The collection containing the solid entities to mesh.

  • source_surface_collection (Collection) – The collection containing the source surface hints entities.

  • destination_surface_collection (Collection) – The collection containing the destination surface hints entities.

  • options (unsigned int) –

    Flags that indicate different options for solid mapping.

    Bit values are used and the value is a sum of all the options. Any bits not listed below are unused or for internal use (for example, called in other functions) and are always internally set to their required values. Setting them to 0 is recommended, but not mandatory. Valid Bit options are:

    Bit0

    Default value. Always set to 0.

    0 - Reserved, must be set to 0.

    Bit1

    New elems are organized to component. Valid values are:

    0 - New elems are organized to the solid component.

    2 - New elems are organized to the current component.

    Bit2

    Default value. Always set to 0.

    0 - Reserved, must be set to 0.

    Bit3

    Do not create elems when calling Model.solidmap_solids_end(). Valid values are:

    0 - Create elems when calling Model.solidmap_solids_end() .

    8 - Do not create elems when calling Model.solidmap_solids_end() (for expert users only).

    Bit4

    Shell elements. Valid values are:

    0 - Create layered solid elements.

    16 - Create layered shell elements.

    Bit5,6

    Method used. Valid values are:

    0 - Auto decide.

    32 - Do not use the fast method.

    64 - Use the fast method.

    96 - Unused.

    Bit8

    Extra smoothing steps. Valid values are:

    0 - No additional smoothing steps will occur.

    256 - Perform extra smoothing steps.

    Bit9,10,11

    2D elem type 1 and 2 passing to the internal call to Model.defaultremeshelems() when per face meshing parameters are not available. Valid values are:

    0 - Tria

    512 - Quad

    1024 - Mixed

    1536 - R-tria

    2048 - Quad only

    Bit13

    Remesh shell meshes. Valid values are:

    0 - Keep shell meshes on input geometry.

    8192 - Remesh shell meshes on input geometry. Solid elems on input solids are always deleted.

    Note

    Solid elems on input solids are always deleted.

    Bit14

    Internal meshing sequencing structure only. Valid values are:

    0 - Normal meshing situations.

    16384 - Create internal meshing sequencing structure only. Do not create mesh and internal meshing structure (for expert users only).

    Bit15

    Meshing parameters. Valid values are:

    0 - Do not use meshing parameters saved to the solid map attributes on the geometry.

    32768 - Use meshing parameters saved to the solid map attributes on the geometry.

    Bit16

    Peparameterization of along faces like parallelograms. Valid values are:

    0 - Make the reparameterization of along faces more orthogonal.

    65536 - Make the reparameterization of along faces more like parallelograms

    Bit17

    Saved meshing parameters. Valid values are:

    0 - Do not use per edge/face saved meshing parameters.

    131062 - Use per edge/face saved meshing parameters.

    Bit18

    Continue meshing. Valid values are:

    0 - Stop meshing when elems with negative Jacobian are generated.

    262144 - Continue meshing regardless of the elem quality.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Default value. Always set to 0 (Bit0)
    New elems are organized to component (Bit1)
    Default value. Always set to 0 (Bit2)
    Do not create elems when calling 'Model.solidmap_solids_end' (Bit3)
    Shell elements (Bit4)
    Method used. Valid values are 0,32,64 and 96 (Bit5,6)
    Extra smoothing steps (Bit8)
    2D elem type. Valid values are 0,512,1024,1536 and 2048 (Bit9,10,11)
    Remesh shell meshes (Bit13)
    Internal meshing sequencing structure only (Bit14)
    Meshing parameters (Bit15)
    Peparameterization of along faces like parallelograms (Bit16)
    Saved meshing parameters (Bit17)
    Continue meshing (Bit18)
    Calculated argument value: 0

  • elem_size (double) – The default element size used when the per edge/face meshing parameters are not available.

Example#

Mesh the solids with IDs 32 and 41 with a default elem size of 2.0 except on edges with IDs 2 and 4 which should have an elem size of 1.0 , use source surface hints with IDs 100 - 105 and destination surface hints with IDs 200 - 205#
import hm
import hm.entities as ent

model = hm.Model()

model.solidmap_solids_begin2(
    solid_collection=hm.Collection(model, ent.Solid, [32, 41]),
    source_surface_collection=hm.Collection(
        model, ent.Surface, [100, 101, 102, 103, 104, 105]
    ),
    destination_surface_collection=hm.Collection(
        model, ent.Surface, [200, 201, 202, 203, 204, 205]
    ),
    options=0,
    elem_size=2.0,
)

model.solidmap_solids_set_elemsize(
    edge_collection=hm.Collection(model, ent.Line, [2, 4]), elemsize=1.0
)
model.solidmap_end()