hm_proximitygetcomponentpaircount
Returns the number of proximity component pairs.
Syntax
hm_proximitygetcomponentpaircount
Type
HyperMesh Tcl Query Command
Description
Returns the number of proximity component pairs.
This must be preceded by a call to hm_proximityinit and followed by a call to hm_proximityend.
Example
To calculate the proximity between all comps using a max distance of 2.5 and to query the component pairs:
*createmark comps 1 all
hm_proximityinit comps 1 2.5
set comp_pair_count [hm_proximitygetcomponentpaircount]
for {set i 0} {$i < $comp_pair_count} {incr i} {
set comp_pair [hm_proximitygetcomponentpair $i]
puts "Component pair $i: $comp_pair"
set elem_pair_count [hm_proximitygetcomponentelementpaircount $i]
for {set j 0} {$j < $elem_pair_count} {incr j} {
set elem_pair [hm_proximitygetcomponentpair $i $j]
puts " Element pair $j: $elem_pair"
}
}
hm_proximityend
Errors
Incorrect usage results in a Tcl error. To detect
errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
14.0