Determine element normal directions in Batch mode using tcl
Hi,
I am trying to create a tcl script that is supposed to find the element normal direction for a component/body. I want to run the script in batch mode and obtain the output (normal direction) in a text file. Is there any way I can achieve this? Please refer to the attached snapshots for better understanding.
Note: All element normals for a particular body are in the same direction.
Thanks & Regards,
Roshan
<?xml version="1.0" encoding="UTF-8"?>
Answers
-
Try this code:
hm_markclear elements 1 *createmarkpanel elements 1 'Select Shell Elements' set myelems [hm_getmark elements 1] foreach eid $myelems { set nx [hm_getvalue elems id=$eid dataname=normalx] set ny [hm_getvalue elems id=$eid dataname=normaly] set nz [hm_getvalue elems id=$eid dataname=normalz] puts [format '%d %0.6E %0.6E %0.6E' $eid $nx $ny $nz] } hm_markclear elements 1
HTH
0 -
Thanks Q.Nguyen-Dai.
With the above code I am able to get normal components in x,y&z directions. But, I am trying to capture whether the normals are inwards or outwards for a particular body.
In HM , visually it is possible to capture this information (depending on the color red or blue ). So, I am looking for a code to capture this without any user intervention.
Please check the example picture for reference.
0 -
Maybe try the command *normalsadjust2 ?
0