how to find node number If I create node with *createnode command
Answers
-
There is a pretty easy way to get the id of an entity that you just created. HM keeps a stack of those entities
*createnode 0 1 0 1 0 0 *createmark nodes 1 -1set node_id [hm_getmark nodes 1]puts 'The node id I just made is $node_id'
You can also get the second last entity using -2, etc.
Eric
0 -
Thanks etg, very useful
0 -
Hello, I have created a circle center node. I want to renumber it with a known value just after it is created (using tcl code). How can I do it?
0 -
Altair Forum User said:
Hello, I have created a circle center node. I want to renumber it with a known value just after it is created (using tcl code). How can I do it?
Here's an example: you create the center of circle by 3 nodes (1712, 1709 & 1541). Then you renumber the center as 50000:
*createmark nodes 1 1712 1709 1541 *createbestcirclecenternode nodes 1 0 1 0 set centerID [hm_latestentityid nodes] *clearmark nodes 1 *createmark nodes 1 $centerID *renumbersolverid nodes 1 50000 1 0 0 0 0 0
0 -
Hello, the above code worked. Thanks
I have created a line entity. I want to renumber it with a known value just after it is created (using tcl code). How can I do it.
0 -
Altair Forum User said:
Hello, the above code worked. Thanks
I have created a line entity. I want to renumber it with a known value just after it is created (using tcl code). How can I do it.
The same as nodes. You remplace entity 'nodes' by 'lines' /emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> Try it!
0 -
Ya, I did the same as you suggested, I wrote the script as:
*createlist nodes 1000
*createvector 1 0 1 0
*createcirclefromcenterradius 1 1 22.5 360 0
set lineid [hm_latestentityid lines]
*clearmark lines 1
*createmark lines 1 $lineid
*renumbersolverid lines 1 10000 1 0 0 0 0 0
When I tried the above script, the error is shown as 'program stopped executing at *renumbersolverid lines 1 10000 1 0 0 0 0 0 '.
I think the line is not getting renumbered to 10000. Can you please tell me the mistake in above script or any alternative solution?
Thank You for your fast responses. Very much appreciated.
0 -
The following code works without issue for me:
*createlist nodes 1 96 94 100 *createcirclefrompoints 1 1 set lineid [hm_latestentityid lines] *createmark lines 1 $lineid *renumbersolverid lines 1 10000 1 0 0 0 0 0
0 -
The above code worked. Thx.
I created a 2d cylindrical mesh and I wanted to renumber it in a specific order as shown in figure. I want to get #13 just above #1 (i mean once the node#12 is numbered in first plane, then #13 must be starting just above #1). The objective is to align nodes 25, 37, 49, 61, ..... with nodes 1 and 13; similarly 26, 38, 50, 62,........ with nodes 2 and 14.
I tried renumbering 'node by path' but couldn't control the manner of numbering.
0 -
i know you're trying a script for that, but you should take a look at the 'Aerospace' userprofile in HM.
User Profiles>>Enginenering Solutions>>Aerospace.
There is the Spatial ID Manager, that probably do what oyu need.
0 -
Altair Forum User said:
The above code worked. Thx.
I created a 2d cylindrical mesh and I wanted to renumber it in a specific order as shown in figure. I want to get #13 just above #1 (i mean once the node#12 is numbered in first plane, then #13 must be starting just above #1). The objective is to align nodes 25, 37, 49, 61, ..... with nodes 1 and 13; similarly 26, 38, 50, 62,........ with nodes 2 and 14.
I tried renumbering 'node by path' but couldn't control the manner of numbering.
I don't think you can do that with method 'automatic' renumbering, via Hypermesh panel.
But maybe it's simpler to control at begin of mesh creation? I mean you use Tcl script to create element by element for one layer and then copying later to get full mesh.
0 -
-
change user profile first to engineerign slutions>> Aerospace user profile.
0 -
Ya, I will try that.
I think the below actions would work to ensure node alignment:
1) Projecting duplicate nodes of first circle to the 2nd plane
2) Equivalencing the 2nd plane nodes to the duplicate nodes
0 -
/profile/97129-adriano-a-koga/?do=hovercard' data-mentionid='97129' href='<___base_url___>/profile/97129-adriano-a-koga/' rel=''>@Adriano A. Koga, I tried the panel you suggested, but it displayed as that the function doesnt support for hexa element nodes.
Can anyone say how to define base node (in N1,N2,N3,B plane) through its node id?
0 -
*createplane ?
0 -
yes, when i look the tcl script it defines the plane by coordinates of nodes. I want to project nodes along y-axis at one base point. And the base point keeps on changing for each case. So it will be difficult to enter location of node in script everytime. i thought it would be easy if we can be able to define the base point through its id. or is there any other way to do projection of nodes to a plane using script?
0 -
how do we retrieve node coordinates of a node and use its coordinates to define a base point?
0 -
Altair Forum User said:
how do we retrieve node coordinates of a node and use its coordinates to define a base point?
set x [hm_getvalue nodes id=$nodeID dataname=globalx] set y [hm_getvalue nodes id=$nodeID dataname=globaly] set z [hm_getvalue nodes id=$nodeID dataname=globalz]
0 -
set node_coords [lindex [hm_nodevalue $id ] 0 ]
0 -
the spatial renumbering allows renumber with respect to axis and adjacent, but what if we require renumber along specific path,
for example A SPIRAL PATH ALONG SCREW THREAD
0