Model.meshutils_cutelements_predefined#

Model.meshutils_cutelements_predefined(element_collection, predefined_cut, limit, spc_collector_name, box_collector_name, dof_array=s_defaultDoubleList)#

Cuts elements with a predefined box.

Parameters:
  • element_collection (Collection) – The collection containing the element entities that needs to be cut.

  • predefined_cut (hwString) – A predefined cut name defining the cut type which might be one of the following; left, right, front, rear, frontleft, frontright, rearleft, rearright.

  • limit (double) – The x value of the box for cut types predefined_cut=front,rear,frontleft,frontright,rearleft,rearright.

  • spc_collector_name (hwString) –

    The name of the collector in which the spcs will be created for constraining cut elements.

    No entities will be created if the name is an empty string.

  • box_collector_name (hwString) –

    The name of the collector in which a hexa might be created to show the cutbox.

    No entities will be created if the name is an empty string.

  • dof_array (hwDoubleList) – The degrees of freedom that need to be constrained. Valid values are 0.0 and 1.0 and should be given in a list of 6 values each corresponding to one DOF. The 0.0 means not constrained and 1.0 means constrained.

Example#

Cut elements 2D quads and trias elements with a predifined box of front type and a limit value of 1.0#
import hm
import hm.entities as ent

model = hm.Model()

element_collection = hm.Collection(model, ent.Element, "config=103,104")

model.meshutils_cutelements_predefined(
    element_collection=element_collection,
    predefined_cut="front",
    limit=1.0,
    spc_collector_name="",
    box_collector_name="",
)