Model.CE_FE_SetSpecificDetail#

Model.CE_FE_SetSpecificDetail(connector_collection, detail_type, integer_value, double_value)#

Changes a single FE realization detail for connectors on the collection.

Parameters:
  • connector_collection (Collection) – The collection containing the entities need to be updated.

  • detail_type (int) –

    The connector FE detail to edit:

    1 - config (integer) - FE configuration type of the realized connector. Provided values should be >0.

    Possible configs:

    2 - plot

    3 - weld

    5 - rigid

    21 - spring

    55 - rigidlink

    60 - bar2

    61 - rod

    70 - gap

    104 - quads

    1001 - custom

    2 - tolerance (double) - Tolerance value for FE realization. Provided values should be >0.

    3 - property_id (integer) - FE property ID.

    4 - systems (integer: 0 or 1) - Build system flag.

    Meaning:

    0 - Do not build systems

    1 - Build systems

    5 - snap_to_node (integer: 0 or 1) - FE snap to node flag.

    Meaning:

    0 - Do not snap to node

    1 - Snap to node

    6 - remesh (integer: 0 or 1) - FE remesh flag.

    Meaning:

    0 - Do not re-mesh

    1 - Re-mesh region

    7 - force_collinear (integer: 0 or 1) - FE force collinear flag.

    Meaning:

    0 - Non-collinear.

    1 - Collinear.

    8 - fe_type (integer) - FE type value defined in the feconfig.cfg file. Provided values should be >0.

    Note

    See Model.CE_FE_SetDetails(), Model.CE_FE_SetDetailsAndRealize(), and Model.CE_FE_SetSpecificDetail() for a more comprehensive description of the details.

  • integer_value (int) – Pass necessary integers values through this parameter, that corresponds to the choice in detail_type,with type integer.

  • double_value (double) – Pass necessary double values through this parameter, that corresponds to the choice in detail_type, with type double.

Note

Generally, this function is most useful to change a single previously set connector FE value. It can be used to populate all the connector’s FE values from scratch, but it is necessary that a config (or fe_type) and tolerance be properly set for realization to occur. This function makes it possible to change a single connector FE value, such as the weld config, while leaving all other FE values intact.

This function will not operate on a connector unless either the Model.CE_FE_SetDetails() or the Model.CE_FE_SetDetailsAndRealize() function has been called first on that connector (without being rejected). Before you can update a specific FE detail (Model.CE_FE_SetSpecificDetail()), all the main FE details must be initialized (which is what the other two functions do).

Example#

Initialize a connector’s FE details, and then change the tolerance from 1.0 to 2.0#
import hm
import hm.entities as ent

model = hm.Model()

connector_collection = hm.Collection(model, ent.Connector, [1, 2, 3])

model.CE_FE_SetSpecificDetail(
    connector_collection=connector_collection,
    detail_type=2,
    integer_value=0,
    float_value=2.0,
)