Meshing Automation by TCL script

Akshay Manthekar
Akshay Manthekar Altair Community Member
edited June 2022 in Community Q&A

Hi Guys,

I have prepared TCL script to mesh the surfaces by selecting the intersection line as shown below in figure. The code will find the attached surfaces when user selects the intersection (non-manifold) line and mesh it. I am calculating element size according to the aspect ratio in the backend and using it while mesh command in TCL script. 

So, my problem is that I want to keep 2 rows of elements (shown by red line) but the code is generating only one and I want to do it with script only. Can anyone help me with it?

When I do it manually, the command.tcl file gives following set of commands:

*startnotehistorystate {Automesh surfaces} *createmark surfaces 1 29 30 27 *interactiveremeshsurf 1 7.5 4 4 2 1 1 *set_meshfaceparams 0 2 4 0 0 1 0.5 1 1 *automesh 0 2 4 *set_meshfaceparams 1 2 4 0 0 1 0.5 1 1 *automesh 1 2 4 *set_meshfaceparams 2 2 4 0 0 1 0.5 1 1 *automesh 2 2 4 *set_meshfaceparams 0 2 4 0 0 1 0.5 1 1 *set_meshedgeparams 0 2 1 0 0 0 7.5 0 0 *set_meshedgeparams 2 2 1 0 0 0 7.5 0 0 *automesh 0 2 4 *set_meshfaceparams 1 2 4 0 0 1 0.5 1 1 *set_meshedgeparams 5 2 1 0 0 0 7.5 0 0 *set_meshedgeparams 6 2 1 0 0 0 7.5 0 0 *automesh 1 2 4 *set_meshfaceparams 2 2 4 0 0 1 0.5 1 1 *set_meshedgeparams 8 2 1 0 0 0 7.5 0 0 *set_meshedgeparams 9 2 1 0 0 0 7.5 0 0 *automesh 2 2 4 *storemeshtodatabase 1 *ameshclearsurface  *endnotehistorystate {Automesh surfaces}

image