TCL:how to distinguish large solid comp and sheet matal comp with tcl scripts?

kai zhang
kai zhang New Altair Community Member
edited March 2022 in Community Q&A

my model have many comps, some are sheet  matal comp which can extract  middle surface and  use shell element; some are casting or structure which are not suitable to use shell. So i want use tcl scripts to distinguish and put them in different assembly.  thanks 

Answers

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited March 2022

    try this command:

    set thick [expr double([lindex [lindex [hm_getgeometricthinsolidinfo solids 1 mode=simple] 0] 0])]

     

    in the below example, solid 1 is the thin solid, and solid 2 is the sphere.

    image

     

    if {[catch {set thick [expr double([lindex [lindex [hm_getgeometricthinsolidinfo solids 1 mode=simple] 0] 0])]}]} {

    #it is a thin solid with the specified thickness

    } else {

    # it is a solid

    }
              
        

  • kai zhang
    kai zhang New Altair Community Member
    edited March 2022

    try this command:

    set thick [expr double([lindex [lindex [hm_getgeometricthinsolidinfo solids 1 mode=simple] 0] 0])]

     

    in the below example, solid 1 is the thin solid, and solid 2 is the sphere.

    image

     

    if {[catch {set thick [expr double([lindex [lindex [hm_getgeometricthinsolidinfo solids 1 mode=simple] 0] 0])]}]} {

    #it is a thin solid with the specified thickness

    } else {

    # it is a solid

    }
              
        

    thanks a lot .  I will try it .