# Make polygon points from cylinder rim read avs tet_connect.inp mo # extract surface of cylinder extract/surfmesh/1,0,0/mosurf/mo/external cmo delete mo # Identify faces at bottom of cylinder # tag attribute itetclr with normal direction cmo select mosurf settets normal dump gmv mesh_normals.gmv mosurf eltset/eduds/itetclr gt 1 rmpoint element eltset,get,eduds rmpoint compress resetpts itp dump gmv cyl_bottom.gmv mosurf # copy just the points to new mesh object cmo create cmotri///triplane copypts cmotri mosurf # remove inside points, keep boundary cmo select cmotri pset/pduds/attribute itp/1,0,0/ne 10 rmpoint pset,get,pduds rmpoint compress dump gmv cylinder_rim.gmv cmotri dump avs cylinder_rim.inp cmotri # end lagrit finish connect cmo / setatt / cmotri / imt / 1 0 0 / 1 cmo / setatt / cmotri / itetclr / 1 0 0 / 1 resetpts / itp define REFINE1 2.0 dump / gmv / output_tri1.gmv /cmotri dump / avs / output_tri1.inp / cmotri refine/rivara///edge/1 0 0/REFINE1///inclusive dump / gmv / output_tri2.gmv / cmotri dump / avs / output_tri2.inp / cmotri smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 smooth/position/esug/ 1 0 0 recon / 0 * dump / gmv / output_smooth.gmv / cmotri dump / avs / output_smooth.inp / cmotri recon / 1 dump / gmv / output_recon.gmv / cmotri dump / avs / output_recon.inp / cmotri * cmo/status cmo/printatt//-all-/minmax quality finish