Model.findmark#

Model.findmark(collection, function, adjacent, adjacent_entity_type=EntityFullType(), numbers=False, output_collectionset=s_defaultCollectionSet, recursive=False)#

Finds and displays entities or finds and displays adjacent entities.

Parameters:
  • collection (Collection) – The collection containing the entities to find or to use for finding entities adjacent to.

  • function (int) –

    A flag that indicates the find function to perform.

    Bit values are used and the value is calculated as (1*Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4 + 32*Bit5 + 64*Bit6 + 128*Bit7 + 256*Bit8 + 512*Bit9). Valid options for Bit values are:

    Bit0

    Find mode. Valid values are:

    0 - Find the entities on the collection.

    1 - Find entities attached to those on the collection. The adjacent_entity_type must be specified in this case.

    Bit1

    Find connectors and realized FE. Valid values are:

    0 - Find connectors only.

    1 - Find both connectors and realized FE.

    Bit2

    Find tied contact entities. Valid values are:

    0 - Do not find tied contact entities.

    1 - Find tied contact entities.

    Bit3

    Unused

    Bit4

    Find free surface edges when finding lines. Valid values are:

    0 - Do not find free surface edges.

    1 - Find free surface edges.

    Bit5

    Find shared surface edges when finding lines. Valid values are:

    0 - Do not find shared surface edges.

    1 - Find shared surface edges.

    Bit6

    Find non-manifold surface edges when finding lines. Valid values are:

    0 - Do not find non-manifold surface edges.

    1 - Find non-manifold surface edges.

    Bit7

    Find suppressed surface edges when finding lines. Valid values are:

    0 - Do not find suppressed surface edges.

    1 - Find suppressed surface edges.

    Bit8

    Exclude group elements when finding elements. Valid values are:

    0 - Also find group elements.

    1 - Exclude group elements.

    Bit9

    Consider constraint entities when finding elements/components attached to other elements/components. Valid values are:

    0 - Do not consider constraint entities.

    1 - Consider constraint entities.

    Bit10

    Consider Constrained Rigid Bodies when finding Elements/Components attached to other Elements/Components. Applicable only for Ls-Dyna Interface. Valid values are:

    0 - Do not consider Constrained Rigid Bodies.

    1 - Consider Constrained Rigid Bodies.

    Bit11

    Consider Link Elements (PLINK, SLINK, LLINK and ELINK) in Pamcrash when finding Elements/Components attached to other Elements/Components. Applicable only for Pamcrash Interface. Valid values are:

    0 - Do not consider Link elements.

    1 - Consider Link elements.

    Bit12

    Consider Constrained Extra Nodes when finding Elements/Components attached to other Elements/Components. Applicable only for Ls-Dyna Interface. Valid values are:

    0 - Do not consider Constrained Extra Nodes.

    1 - Consider Constrained Extra Nodes.

    Bit13

    Consider Rigid Bodies when finding Elements/Components attached to other Elements/Components. Applicable only for Optistruct Interface. Valid values are:

    0 - Do not consider Rigid Bodies.

    1 - Consider Rigid Bodies.

    Bit14

    Consider Fasteners when finding Elements/Components/Nodes attached to other Elements/Components/Nodes. Applicable only for Abaqus Interface. Valid values are:

    0 - Do not consider Fasteners.

    1 - Consider Fasteners.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Find mode (Bit0)
    Find connectors and realized FE (Bit1)
    Find tied contact entities (Bit2)
    Find free surface edges when finding lines (Bit4)
    Find shared surface edges when finding lines (Bit5)
    Find non-manifold surface edges when finding lines (Bit6)
    Find suppressed surface edges when finding lines (Bit7)
    Exclude group elements when finding elements (Bit8)
    Consider constraint entities when finding elements/components attached to other elements/components (Bit9)
    Consider Constrained Rigid Bodies when finding elements/components attached to other elements/components (Bit10)
    Consider Link Elements (PLINK, SLINK, LLINK and ELINK) in Pamcrash when finding elements/components attached to other elements/components(Bit11)
    Consider Constrained Extra Nodes when finding elements/components attached to other elements/components(Bit12)
    Consider Rigid Bodies when finding elements/components attached to other elements/components(Bit13)
    Consider Fasteners when finding elements/components attached to other elements/components(Bit14)
    Calculated argument value: 0

  • adjacent (int) –

    0 - Add both entities, on collection and those found, to output_collectionset.

    1 - Do not add entities on collection to output_collectionset.

    This is ignored when function=0.

  • adjacent_entity_type (EntityFullType) – It is the type of entity to find. The found entities will also be displayed. If set to undefined, all supported adjacent entities will be found. If function=0, the entity type should be the same as the in entity type in collection.

  • numbers (bool) –

    0 - Do not turn on numbers for the found entities.

    1 - Turn on numbers for the found entities.

  • output_collectionset (CollectionSet) – The set of collections containing possibly multiple types of entities that have been found. If specified as empty collection set and adjacent_entity_type=ent.Node is set to nodes, temporary nodes are created at the found node locations.

  • recursive (bool) –

    The recursive flag will work only if both input and output entity types are the same.

    0 - Do not execute the find operation recursively. (default)

    1 - Execute the find operation recursively.

Examples#

Find the elements adjacent to element with ID 12#
import hm
import hm.entities as ent

model = hm.Model()

elemcol = hm.Collection(model, ent.Element, [12])

# Defining the output collection set
outcol_set = hm.CollectionSet(model)

model.findmark(
    collection=elemcol,
    function=1,
    adjacent=1,
    adjacent_entity_type=ent.Element,
    numbers=0,
    output_collectionset=outcol_set,
)
Find all connectors#
import hm
import hm.entities as ent

model = hm.Model()

conncol = hm.Collection(model, ent.Connector)

# Defining the output collection set
outcol_set = hm.CollectionSet(model)

model.findmark(
    collection=conncol,
    function=0,
    adjacent=1,
    adjacent_entity_type=ent.Connector,
    numbers=0,
    output_collectionset=outcol_set,
)
Find all surface edges ( free , shared , non - manifold , and suppressed )#
import hm
import hm.entities as ent

model = hm.Model()

linecol = hm.Collection(model, ent.Line)

# Defining the output collection set
outcol_set = hm.CollectionSet(model)

model.findmark(
    collection=linecol,
    function=240,
    adjacent=1,
    adjacent_entity_type=ent.Line,
    numbers=0,
    output_collectionset=outcol_set,
)