How to create plane in hypermesh using TCL script?
shubham Dhokare_21832
Altair Community Member
Hello,
I am creating a script for hexa meshing in hypermesh.
In this process I want create a plane with a base node and project the duplicate elements to the created plane. after projecting elements on the plane, base elements and duplicate elements will get solidmap as per the mesh size... and it will continue until the number of base points provided by user
I created the plane as given in the source code, but the elements I selected is not getting projected on the plane.
Please suggest any solution.
Thanks in advance.
*createmarkpanel elems 1 "Select 2D Elements" *createmarkpanel nodes 1 "Select N1 Node for Plane" set n1 [hm_getmark nodes 1] set n1x [ hm_getentityvalue NODES $n1 "globalx" 0 ] set n1y [ hm_getentityvalue NODES $n1 "globaly" 0 ] set n1z [ hm_getentityvalue NODES $n1 "globalz" 0 ] hm_markclear nodes 1 *createmarkpanel nodes 1 "Select N2 Node for Plane" set n2 [hm_getmark nodes 1] set n2x [ hm_getentityvalue NODES $n2 "globalx" 0 ] set n2y [ hm_getentityvalue NODES $n2 "globaly" 0 ] set n2z [ hm_getentityvalue NODES $n2 "globalz" 0 ] hm_markclear nodes 1 set px [expr $n2x - $n1x] set py [expr $n2y - $n1y] set pz [expr $n2z - $n1z] *createmarkpanel nodes 1 "Select Base Node" set s1 [hm_getmark nodes 1] set s1x [ hm_getentityvalue NODES $s1 "globalx" 0 ] set s1y [ hm_getentityvalue NODES $s1 "globaly" 0 ] set s1z [ hm_getentityvalue NODES $s1 "globalz" 0 ] hm_markclear nodes 1 *duplicatemark elems 1 0 set delem [hm_getmark elems 1] *createmark elements 1 "$delem" *createplane 1 $px $py $pz $s1x $s1y $s1z *createvector 1 $px $py $pz *projectmarktoplane elements 1 1 1 1
0
Answers
-
See your last block of code below but you just need to either but an eval before *createmark when using a list variable or use hm_createmark instead.
*duplicatemark elems 1 0 set delem [hm_getmark elems 1] hm_createmark elements 1 "$delem" *createplane 1 $px $py $pz $s1x $s1y $s1z *createvector 1 $px $py $pz *projectmarktoplane elements 1 1 1 1
0