2D automesh for all Surfaces

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

Hello everyone,

 

I am trying to automesh the 2D surfaces with TCL script

the problem is, if the geometry have more than one surfaces, script will select only single surface and mesh that surface only,

 

my script shown below......

please help me to find proper solution

 

<?xml version="1.0" encoding="UTF-8"?>automesh.JPG

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2016

    You need do  a loop over selected surfaces. Here's is example code :

     foreach surf $surfs_list { 	*createmark surfs 1 $surf; 	*interactiveremeshsurf 1 $elemensize 2 2 2 1 1 	*set_meshfaceparams 0 5 2 0 0 1 0.5 1 1 	*automesh 0 5 2 	*stroremeshtodatabase 1 	*ameshclearsurface 	*clearmark surfs 1; }

    HTH,

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2016
     	*createmark surfs 1 all; 	*interactiveremeshsurf 1 $elemensize 2 2 2 1 1 	*set_meshfaceparams 0 5 2 0 0 1 0.5 1 1 	*automesh 0 5 2 	*stroremeshtodatabase 1 	*ameshclearsurface 	*clearmark surfs 1;

    If you want to mesh all the surfaces, you can also do it without any loop but if you want to mesh only selected surf, NGUYEN's solution is the best