Jump to content

Recommended Posts

Hello everyone,

 

I will give a element id.

 

I want to find the nodes attached to this element

and also nodes attached to nodes found in previous step 

In hyperview and probe results to all these nodes.

 

which command I can use for find attached in hyperview

 

Thank you

Share this post


Link to post
Share on other sites

I can take element id (primary element)

 

find adjacent as tinh suggested, and find nodes attached to them.

 

however I need nodes from adjacent element only attached to primary element given in first step, how would I filter other nodes?

Share this post


Link to post
Share on other sites

first take 4 nodes of primary element => store in NodeList1

then find adjacent elems

then find attached nodes of them => store in NodeList2

now take nodes in NodeList2 but not in NodeList1

Share this post


Link to post
Share on other sites
30 minutes ago, tinh said:

first take 4 nodes of primary element => store in NodeList1

then find adjacent elems

then find attached nodes of them => store in NodeList2

now take nodes in NodeList2 but not in NodeList1

 

you did not get my question correctly, I might have mislead you somewhere.

 

I do not want entire NodeList2, I need only nodes which are attched to NodeList1.

 

In fact to go in more details, I need to process entire NodeList1. 

Suppose my element id is x

corresponding to this id x I will find attached nodes (suppose for hex element, nodes =8) node ids [1 2 3 4 5 6 7 8 ]

 

Now for each node from above set I need to find attached node from adjacent element and find distance from it

For node id 1 (first node from list), need to find attached nodes and find distance between node id 1 and all attached nodes

Share this post


Link to post
Share on other sites

OK. I see

first find all elems attached with element x,  for example you find (e1, e2, e3, e4, e5, e6)

now do a loop for each NodeId in ids [1 2 3 4 5 6 7 8 ] of x :

- find which elems (e1, e2, e3, e4, e5, e6) have this NodeId, by with each element => get its nodes => and search for NodeId, if found => measure distance

Share this post


Link to post
Share on other sites

Hello everyone,

 

I am still working on above mentioned script.

I am stuck at following point

Now I can get node numbers, I have two node numbers, how do I measure distance between two nodes. (I am working with poIPost AddMeasure  not able to figure out how it works)

 

does anybody have any reference example for same?

 

have created following codes please review

 

I want distance between nodes 519626 and 519457

Quote

 

......

......

client_handle GetModelHandle m [client_handle GetActiveModel]

client_handle AddMeasure     distance

distance Distance Between

distance AddNode "1 519626 519457 %1"

 

 

Share this post


Link to post
Share on other sites

found solution on measure

 

thank you

:)


 

Quote

 

::post::GetPostHandle post1

##To create a distance between measures and plot it:

set measure_Dist [post1 AddMeasure]

post1 GetMeasureHandle Dist $measure_Dist 

Dist SetType "distance between"

set model_id 1

Dist AddNode "$model_id 519625"

Dist AddNode "$model_id 519457"

::post::Draw

Dist GetValueList mag

post1 RemoveMeasure $measure_Dist

Dist ReleaseHandle

 

 

tinh and Livil Lyle like this

Share this post


Link to post
Share on other sites

Hello Everyone,

 

found a simple way to find attached nodes

 

with this can easily find the find attached nodes

 

Quote

                    ::post::GetActiveModelHandle m
                    
                    ##unset TempMasterElementNodes
                    
                    m GetSelectionSetHandle TempAdjMasterElementNodes [m AddSelectionSet node]
                    
                    #add all nodes attached to the current selection
                    
                    TempAdjMasterElementNodes Add "id $kk "
                    
                    TempAdjMasterElementNodes Add "adjacent"
                    
                    TempAdjMasterElementNodes Subtract "id $kk "
                    
                    TempAdjMasterElementNodes GetList

 

tinh likes this

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.


×
×
  • Create New...