Model.hm_ce_gethmholes#

Model.hm_ce_gethmholes(collection, upbound, lowbound, outerFlag, elementFlag, reserved=0)#

Gets bolt holes information from components.

Parameters:
  • collection (Collection) – The collection containing the input component entities.

  • upbound (double) – Maximum diameter to be considered a bolt hole.

  • lowbound (double) – Minimum diameter to be considered a bolt hole.

  • outerFlag (int) – Output the nodes of the outer circle around bolt holes (yes = 1, no = 0).

  • elementFlag (int) – Output the elements around bolt holes (yes = 1, no = 0).

  • reserved (int) – Always set to 0.

Returns:

Examples#

Get the bolt holes between 0.0 to 15.0 from components with IDs 1 and 2#
import hm
import hm.entities as ent

model = hm.Model()

comps = hm.Collection(model, ent.Component, [1, 2])

_, result = model.hm_ce_gethmholes(
    collection=comps,
    upbound=15.0,
    lowbound=0.0,
    outerFlag=0,
    elementFlag=0,
    reserved=0
)

print("Entities: ", result.entities)