Macro normals
Hi all,
I created macro auto adjust normals:
proc adjust_normals {} { *createmark comps 1 all *createmark elems 2 'by config' quad4 tria3 set List_comps [hm_getmark comps 1] for {set n 0} {$n<[hm_marklength comps 1]} {incr n} { *createmark elems 1 'by collector' [lindex $List_comps $n] *markintersection elems 1 elems 2 if {![hm_marklength elems 1]} {continue} else { set List_elems [hm_getmark elems 1] set ID_elems_ori [lindex $List_elems 0] *normalsadjust elems 1 $ID_elems_ori 0 0 } } *normalsoff hm_usermessage 'Done.' }
but it doesn't work in some case, such as seperated components...
Please suggest a way to improve it.
Answers
-
If you have access to Altair script exchange.Then kindly have a look at it.You would find readily available macros for similar request.
Regards
Rahul R
0 -
Hi,
the better way is isolate only tria3 and quad4
then do a 'while loop' to adjust normal for elems 'by attached', then mask them, until no elems display
more advanced, you should care about connectivity error (two areas share only 1 node?)
and if there are T-connection (should select base elem on the largest area?)
0 -
Altair Forum User said:
If you have access to Altair script exchange.Then kindly have a look at it.You would find readily available macros for similar request.
Regards
Rahul R
Thanks Rahul, I can't access to Altair script exchange /emoticons/default_sad.png' srcset='/emoticons/sad@2x.png 2x' title=':(' width='20'>
Altair Forum User said:Hi,
the better way is isolate only tria3 and quad4
then do a 'while loop' to adjust normal for elems 'by attached', then mask them, until no elems display
more advanced, you should care about connectivity error (two areas share only 1 node?)
and if there are T-connection (should select base elem on the largest area?)
Thanks tinh,
Did you mean 'by adjacent' because all components are connected by rbody?0 -
Hi,
I mean that should not loop through each component
instead, loop through each 'attached elems area', do not care about RBODY because you isolated only tria3 and quad4
so 'by attached' will not select over RBODY connection
0 -
Altair Forum User said:
Hi,
I mean that should not loop through each component
instead, loop through each 'attached elems area', do not care about RBODY because you isolated only tria3 and quad4
so 'by attached' will not select over RBODY connection
OK, thanks tinh
0