Model.createweldsbetweencompsusingpoints#

Model.createweldsbetweencompsusingpoints(comp1_collection, comp2_collection, single_col, point_collection, tol, syst, configval, property, null, forced_length, DTfile)#

Creates weld element(s) between pre-existing components at the given point(s).

Parameters:
  • comp1_collection (Collection) – The collection containing the component entities for the first component collector.

  • comp2_collection (Collection) – The collection containing the entities for the second component collector.

  • single_col (int) –

    Flag for the number of comp collectors used.

    0 - Two comp collectors.

    1 - One comp collector.

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

  • tol (double) – The maximum distance allowed between the point (from the point collection) and the comp (from the comp collection) in order to weld the elements in it.

  • syst (int) –

    Systems flag.

    0 - Do NOT build systems.

    1 - Build systems.

  • configval (int) – Weld element type.

  • property (hwString) – Name of property collector. Used to retrieve property ID.

  • null (int) – Reserved for future use.

  • forced_length (int) –

    For ACMs only.

    0 - Creates hexa from element plane.

    1 - Sets Hexa length to be an average of two component thickness (t1 + t2)/2.

  • DTfile (hwString) – Name of Diameter Vs. Thickness file. Used to calculate the size of Hexa elements in ACM and diameter for CWELD only.

Example#

ACM’s (configval = 71) are created between components on collections at point locations on point collection within a tolerance of 1.0#
import hm
import hm.entities as ent

model = hm.Model()

comp1 = hm.Collection(model, ent.component, [1])
comp2 = hm.Collection(model, ent.component, [2])
point = hm.Collection(model, ent.Point, [3, 4])

model.createweldsbetweencompsusingpoints(
    comp1_collection=comp1,
    comp2_collection=comp2,
    single_col=1,
    point_collection=point,
    tol=1.0,
    syst=1,
    configval=71,
    property="myprop",
    null=0,
    forced_length=0,
    DTfile="DvsTfile",
)