TCL program for circle automatic selection
Hi, everyone.
I have a problem about the tcl programing of circles' automatic selection. In the attached picture, eight circles are in the plate (surface), but the IDs of these circles are uncertain. So, I want to select these circles by position and range (for example, in the displayed coordinate system, by range: 0<x<x1, 0<y<y1). The purpose of this operation is to obtain the respective IDs of these circles. Can anyone give me some advices?
Thanks.
Answers
-
Can anyone give me some advices?
0 -
Hi mansin,
I think there are no ids specific to circles in hm, but you can find the line ids which forms the circle.
try the following code
*createmark lines 1 displayed
hm_markbyfeature 1 2 'feature_mode 1 min_radius 1.0 max_radius 15.0'
set cicleLines [hm_getmark lines 2]
hm_highlightmark lines 2 'high'0 -
Hi mansin,
I dont know why in your model it is not working, i tried in other models and it is giving output.
Anyways you can try below method too.
check the link to know about the parameters https://altairhyperworks.com/hwhelp/Altair/2017/help/hm_ref_guide/topics/reference/hm/hm_holedetectionsetholeparams.htm?hl=hole
hm_holedetectioninit
*createmark surfs 1 all
hm_holedetectionsetentities surfs 1
hm_holedetectionsetholeparams hole_shape=7
hm_holedetectionfindholes 1
set n [hm_holedetectiongetnumberofholes]for {set i 0} {$i < $n} {incr i} {
puts [lindex [hm_holedetectiongetholedetails $i] 5]
}0 -
Hi, vipin,
The command of 'hm_holedetectiongetholedetails' works in my model.
Thank you very much.
0