Model.hm_holedetectionidentifyhole#
- Model.hm_holedetectionidentifyhole(id)#
Returns the hole index for a given node or line. This must be preceded by a call to
Model.hm_holedetectionfindholes().- Parameters:
id (int) – The ID of the node or line to query.
- Returns:
hwReturnStatus- Status objectHmQueryResult- Result object containing the output values:holeIndex (int)
Example#
Get the index of the hole associated with line ID 123 after detecting holes in all surfaces in the model#import hm import hm.entities as ent model = hm.Model() model.hm_holedetectioninit() surf_collection = hm.Collection(model, ent.Surface) model.hm_holedetectionsetentities(collection=surf_collection) model.hm_holedetectionsetholeparams(hole_shape=31) model.hm_holedetectionfindholes(find=1) # For holes we need to set find= _, result = model.hm_holedetectionidentifyhole(id=123) print("Hole index = ", result.holeIndex) model.hm_holedetectionend()