Model.linearsurfacebetweennodes#

Model.linearsurfacebetweennodes(list1, list2, reverse, closed=0, setmeshparam=0)#

Creates a ruled surface between two node lists. Optionally it can immediately be use within the automesher. It can also identify a region in the shape of a ruled surface for the automesher to use under the mesh without surface option.

Parameters:
  • list1 (EntityList) – The first list of node entities forming one side of the surface.

  • list2 (EntityList) – The second list of node entities forming one side of the surface.

  • reverse (int) –

    Indicates whether the lines should be tested for a “bow tie” condition and reversed if necessary. Valid options are:

    0 - No testing the lines for a “bow tie” condition and no reversing.

    1 - Testing the lines for a “bow tie” condition and reversing.

  • closed (int) – Flag defining if the node selection should be treated as a closed loop (1 for yes, 0 for no).

  • setmeshparam (int) – Flag defining if the mesh parameter is set for the orphan nodes selection (1 for yes, 0 for no).

Example#

Identify a region in the shape of a ruled surface and sends it into the automesher to create quad elements and store the elements to the HyperMesh database#
import hm
import hm.entities as ent

model = hm.Model()

'''

Indentifying a region in the shape of a ruled surface using
the model.surfacemode(mode=3), the model.linearsurfacebetweennodes()
and sends it into the automesher via the model.set_meshedgeparams()
to create quad elements via model.linearmesh(quads=1). The
model.storemeshtodatabase() stores the elements in Hypermesh database

'''

model.surfacemode(mode=3)

nodelist1 = [
    ent.Node(model, 1581),
    ent.Node(model, 77),
    ent.Node(model, 83),
    ent.Node(model, 88),
    ent.Node(model, 95),
]
nodelist2 = [
    ent.Node(model, 225),
    ent.Node(model, 228),
    ent.Node(model, 232),
    ent.Node(model, 235),
    ent.Node(model, 262),
]

model.linearsurfacebetweennodes(list1=nodelist1, list2=nodelist2, reverse=1)

model.set_meshedgeparams(
    edge_index=0,
    elem_density=8.0,
    alg_type=1,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)

model.set_meshedgeparams(
    edge_index=1,
    elem_density=4.0,
    alg_type=1,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)

model.set_meshedgeparams(
    edge_index=2,
    elem_density=8.0,
    alg_type=1,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)

model.set_meshedgeparams(
    edge_index=3,
    elem_density=4.0,
    alg_type=1,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)

model.linearmesh(quads=1)

model.storemeshtodatabase(elemstosurfcomp=0)

model.ameshclearsurface()