#403 Get nodes for all elements in the FEM model in HyperMesh using tcl script
Jan 13, 2024 | HyperMesh, tcl |
ex403.tcl
1 | set script_path [ file dirname [ file normalize [ info script ] ] ] |
6 | set elemList [ hm_getmark elements 1 ] |
8 | set outfile [ open "ex403.txt" w] |
9 | foreach elem_id $elemList { |
11 | set nodeIDs [hm_getvalue elements id = $elem_id dataname = nodes] |
13 | set mylist [ list $elem_id $nodeIDs] |
Output file:
ex403.txt
1 | 2746 { 3016 2892 2891 3012 } |
2 | 2745 { 2958 2893 2892 3016 } |
3 | 2744 { 3015 3016 3012 3011 } |
4 | 2743 { 2957 2958 3016 3015 } |
5 | 2742 { 3449 3015 3011 3445 } |
6 | 2741 { 3391 2957 3015 3449 } |
7 | 2740 { 3014 2890 2889 3004 } |
8 | 2739 { 3012 2891 2890 3014 } |
9 | 2738 { 3013 3014 3004 3003 } |
10 | 2737 { 3011 3012 3014 3013 } |
11 | 2736 { 3447 3013 3003 3437 } |
12 | 2735 { 3445 3011 3013 3447 } |
Like this:
Like Loading...
Related
Recent Comments