Model.createelementsbetweenpoints#

Model.createelementsbetweenpoints(surf1_collection, surf2_collection, collection, tol, createplot, configval, syst, code, property)#

Creates a spotweld element between two surfaces at the marked points with an element type, coordinate system, and property ID.

Parameters:
  • surf1_collection (Collection) – The collection containing the first surface entities.

  • surf2_collection (Collection) – The collection containing the second surface entities.

  • collection (Collection) – The collection containing the point entities.

  • tol (double) – Search tolerance to identify surfaces.

  • createplot (int) – Creates a plot.

  • configval (int) – Element type configuration value.

  • syst (int) –

    Local coordinate system switch.

    0 - Without coordinate system.

    1 - With coordinate system.

  • code (int) –

    Code for one or all surface options.

    0 - All surfaces.

    1 - One surface.

  • property (hwString) – Name of property collector.

Example#

Create spot weld ( spring elements ) between surfaces 1 and 2 , using the option individual surface within a tolerance of 0.01 at marked points with IDs 1 and 2 . Elements are created with the coordinate system and property collector “ name_prop “#
import hm
import hm.entities as ent

model = hm.Model()

surf1 = hm.Collection(model, ent.Surface, [1])
surf2 = hm.Collection(model, ent.Surface, [2])
points = hm.Collection(model, ent.Point, [1,2])

model.createelementsbetweennodes(
    surf1_collection=surf1,
    surf2_collection=surf2,
    collection=points,
    tol=0.01,
    createplot=1,
    configval=21,
    syst=1,
    code=1,
    property="name_prop",
)