Can you please help me to find out the tcl macro for automesh to filling the edges

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

proc automesh {} {

*createmark comp 1 all

*findedges components 1 0

*clearmark comps 1 all

*createmark comp 1 all

set complist [hm_getmark comps 1 ]

foreach comp $complist {

set compname [ hm_getcollectorname comps $comp ]

tk_messageBox -message $comp

}

*displaycollectorwithfilter components 'none' '' 1 0

*displaycollectorwithfilter components 'on' '^edges' 1 0

#*createmark comps 2 'displayed'

set cm [lindex ^edges 0]

set cm1 [lindex ^edges 1]

*createmark comps 1 '$cm'

*createmark elements '^edges'

*createmark nodes 1 '^edges'

set hm [hm_getmark nodes 1]

*surfacemode 2

*createlist nodes 1 [lindex $hm 0] [lindex $hm 1] [lindex $hm 2] [lindex $hm 3]

*createlist nodes 2 [lindex $hm 6] [lindex $hm 7] [lindex $hm 8]

*linearsurfacebetweennodes 1 2 1

foreach id ^edges {

}

#*surfacemode 2

#*createlist nodes 1 ''

#*createlist nodes 2 '^edges'

#*linearsurfacebetweennodes 1 2 1

#*linearsurfacebetweennodes 1 2 1

#*set_meshfaceparams 0 1 0 0 0 1 0.5 1 1

#*set_meshedgeparams 0 2 0 0 0 0 0 0 0

#*set_meshedgeparams 1 1 0 0 0 0 0 0 0

#*set_meshedgeparams 2 3 0 0 0 0 0 0 0

#*set_meshedgeparams 3 1 0 0 0 0 0 0 0

#*automesh 0 1 0

}

automesh please help me

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2012

    Hi Kiran,

    we have not enough information to give a proper answer.

    Since you are creating free edges, you have elements anyway.

    Now it depends on the type of your edges. Do you need a filler or a ruled mesh.

    For ruled meshs you have to fill the nodelist in the right way (seems to be the first part of your code).

    Then try this (convert it to macro tcl, it's a pain what the programmers has done here):

    *surfacemode (2)

    *createlist(nodes,1) your nodes on line 1 here

    *createlist(nodes,2) your nodes on line 2 here

    *linearsurfacebetweennodes(1,2,1)

    *setedgemeshparams(0,8,0)

    *setedgemeshparams(1,4,0)

    *setedgemeshparams(2,8,0)

    *setedgemeshparams(3,4,0)

    *linearmesh(1)

    *storeamelemstodatabase(0)

    *ameshclearsurface()

    In the case of a filler mesh try this

    *surfacemode(2)

    *createlist(nodes,1) your nodes here

    *surfacesplineonnodesloop(1)

    ...

    Regards,

    Mario

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2012

    hi mario,

    thnx for ur reply. its a ruled mesh.can you please help me out in this