Beginning and ending of joints betwwen components
Hi all,
I am creating a new script which detects joints between several components and identifies the start node and the end node. I show an example in the image below:
I am able to detect all joints with the *findmark command, but I don't know how to identify the node which 'starts' or 'ends' the joint. The start/end nodes are those which have temp nodes in the image.
Can anyone help me to do this? Any suggestion?
Thanks in advance,
Alex
Answers
-
Hi Alex,
Find shared nodes using hm_getnodessharedbyothercomps in mark 1, find edges and get all edge nodes in mark 2.
Then get markintersection?!
0 -
Hi vipin,
I think that could work but I forget to say another restriction. I show it in the image below:
Is there any possibility to specify a 'break angle' which allows to put more temp nodes, like in the image?
0 -
-
Hi
If you don't find an 'hm_' command to get these vertices:
*features_advanced (as vipin suggestion)
*createmark elems 1 'by comp name' ^feature
set NodeList [join [hm_getvalue elems mark=1 dataname=nodes]]
array set Count {}
set Vertices {}
foreach NodeId $NodeList {
if {[incr Count($NodeId)]>2} {lappend Vertices $NodeId}
}
puts $Vertices
Before version 13 we don't have command 'hm_getvalue', so looping through each element by tcl and get its nodes is quite long. at that time, to query such data i had to use an hm template to fasten script.
0 -
I really thank you guys, you helped me a lot.
0