How to know the number of selected surfaces in tcl

liangycc
liangycc Altair Community Member
edited October 2020 in Community Q&A

Hi,

i want to know the precise number of selected surfaces.But i just find the command hm_count which does not support for 'selected'.

i have to know the precise number because i want to automesh these surfaces in next step.  

like this:
*createmark surfaces 1 1
*appendmark surfaces 1 'by face'
*interactiveremeshsurf 1 0.25 2 2 2 1 1

for {set i 0} {$i < $numberofsurface} {incr i} {

*set_meshfaceparams $i 2 2 0 0 1 0.5 1 1
*automesh 0 2 2

}

So could you tell me a good method?

Thank you very much!

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited September 2018

    Hi,

    i want to know the precise number of selected surfaces.But i just find the command hm_count which does not support for 'selected'.

    i have to know the precise number because i want to automesh these surfaces in next step.  

    like this:
    *createmark surfaces 1 1
    *appendmark surfaces 1 'by face'

    set numberofsurface [hm_marklength surfs 1]
    *interactiveremeshsurf 1 0.25 2 2 2 1 1

    for {set i 0} {$i < $numberofsurface} {incr i} {

    *set_meshfaceparams $i 2 2 0 0 1 0.5 1 1
    *automesh 0 2 2

    }

    So could you tell me a good method?

    Thank you very much!

     

    Add the bold line.

  • liangycc
    liangycc Altair Community Member
    edited September 2018

    Thank you very much!!