Jump to content
Sign in to follow this  
Guest

how to control the node numbering?

Recommended Posts

Guest

a set of 100nodes (all connected as a straight line) was define from a large node sizes (lets say is 1000), i want to renumber the set follow a sequence (lets say from left to right, 1 to 100) ...but after i renumbering them, the set doesn't follow the desired sequence...so how to solve it...any expert..?

although this could be manually done by clicking one by one until hundread...but problem came when the node set is too large (click until your mouse spoiled...haha)

SOS!!#-o

Share this post


Link to post
Share on other sites
Guest

We are working on a in core solution for this. In the meantime we have a couple macros. Here is one that requires a mapped mesh and a couple node picks to determine the direction and sequence of the numbering. To start, the numbering range you want must be available.

proc lsubtract {list1 list2} {set ret $list1    foreach i $list2 {        set tmp [lsearch $ret $i]        set ret [lreplace $ret $tmp $tmp]    }    return $ret}set starting_id [ hm_getint "ID:" "Enter starting ID" ]set incr_1 [ hm_getint "1-dir incr:" "Enter increment in the 1-dir:" ]*clearlist nodes 1 *createlistpanel nodes 1 "Select starting node list in 2-direction:"set start_nodes [ hm_getlist nodes 1 ]*clearlist nodes 1 *createlistpanel nodes 1 "Select ending node list in 2-direction:"set end_nodes [ hm_getlist nodes 1 ]set incr_2 [ hm_getint "2-dir incr:" "Enter increment in this direction:" ]*clearlist nodes 1 *createlistpanel nodes 1 "Select middle node list in 2-direction:"set mid_nodes [ hm_getlist nodes 1 ]set i 0set k 0foreach start_node $start_nodes { 	set mid_node [ lindex $mid_nodes $i ]	set end_node [ lindex $end_nodes $i ]	set id [ expr { $starting_id + $i } ]		incr i	*clearlist nodes 1	*nodelistbypath $start_node $mid_node 1	set list1 [ hm_getlist nodes 1 ]		*clearlist nodes 1		*clearlist nodes 2	*nodelistbypath $mid_node $end_node 2	set list2 [ hm_getlist nodes 2 ]		*clearlist nodes 2		set list2 [ lsubtract $list2 $mid_node ]		set list_of_nodes [ concat $list1 $list2 ]		set j 0		foreach node $list_of_nodes {				set id [ expr { $starting_id + $j + $k } ]		incr j $incr_1			*clearmark nodes 1		*createmark nodes 1 $node		*renumbersolverid nodes 1 $id 1 0 0 0 0 0		}		incr k $incr_2	}

Share this post


Link to post
Share on other sites
Guest

a set of 100nodes (all connected as a straight line) was define from a large node sizes (lets say is 1000), i want to renumber the set follow a sequence (lets say from left to right, 1 to 100) ...but after i renumbering them, the set doesn't follow the desired sequence...so how to solve it...any expert..?

although this could be manually done by clicking one by one until hundread...but problem came when the node set is too large (click until your mouse spoiled...haha)

SOS!!#-o

I mean, why you want to re-number the nodes. If you want to use the nodes in a certain order, you can select them into a list by using *createlistpanel, choose option of by path. (*createmarkpanel does not do the work by order!) Then you can do foreach loop on the node list, which comes out by order, say, from left to right.

If you really want it done, you can sort them along a vector. You may need to translate from one coordinates to another.

Share this post


Link to post
Share on other sites
Guest
We are working on a in core solution for this. In the meantime we have a couple macros. Here is one that requires a mapped mesh and a couple node picks to determine the direction and sequence of the numbering. To start' date=' the numbering range you want must be available.

proc lsubtract {list1 list2} {
set ret $list1
foreach i $list2 {
set tmp [lsearch $ret $i]
set ret [lreplace $ret $tmp $tmp]
}
return $ret
}

...

}

[/quote']

Dambach, thanks so much for providing this macro. I was trying to renumber the nodes of a mesh with 380 nodes by hand. It was driving me insane. This macro made it super simple.

Share this post


Link to post
Share on other sites

Hi! I want to do something similar but just in one direction. I want to mesh a spring, made by beams, but when I trie to renumber by path, hypermesh do it without any order.

I cannot apply this macro, because it needs  two directions, do you hace any idea?

 

 

 

Thank you in advance!

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...