🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Macro normals

User: "flamenco7641"
Altair Community Member
Updated by flamenco7641

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.

Find more posts tagged with

Sort by:
1 - 5 of 51
    User: "Rahul Rajan_21763"
    New Altair Community Member
    Updated by Rahul Rajan_21763

    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

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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?)

    User: "flamenco7641"
    Altair Community Member
    OP
    Updated by flamenco7641

    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'>

    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?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "flamenco7641"
    Altair Community Member
    OP
    Updated by flamenco7641

    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