tcl programme for node move
hello
I am working on tcl programme which will move selected node
in a vector defined by selecting nodes
I have written programme for that put node is not moving in direction I wanted
have look at programme
and how clearmark command works??
Find more posts tagged with
so finally I have found solution for this problem
*createmarkpanel nodes 1 'select node'
set node_list [hm_getmark nodes 1 ]
if {[llength $node_list] == 0} {
hm_errormessage 'no'
return
}
#*clearmark nodes 1
*createlistpanel nodes 2 'Select direction by node1->node2'
set vectnodelist [hm_getlist nodes 2]set nodeid1 [hm_getentityvalue nodes [lindex $vectnodelist 0] 'id' 0];
set nodeid2 [hm_getentityvalue nodes [lindex $vectnodelist 1] 'id' 0];
foreach {tot x y z} [hm_getdistance nodes $nodeid1 $nodeid2 0] {
*createvector 1 $x $y $zset elemsize [hm_getfloat 'elemsize' 'Enter elem size']
*translatemark nodes 1 1 $elemsize
}*clearmark nodes 1
Thank you everyone on forum
I have made this based on previous post only
thank you
while 1 {
*createmarkpanel nodes 1 'select node'
set node_list [hm_getmark nodes 1 ]
if {[llength $node_list] == 0} {
hm_errormessage 'no'
return
}
#*clearmark nodes 1
*createlistpanel nodes 2 'Select direction by node1->node2'
set vectnodelist [hm_getlist nodes 2]
set nodeid1 [hm_getentityvalue nodes [lindex $vectnodelist 0] 'id' 0];
set nodeid2 [hm_getentityvalue nodes [lindex $vectnodelist 1] 'id' 0];
foreach {tot x y z} [hm_getdistance nodes $nodeid1 $nodeid2 0] {
*createvector 1 $x $y $z
#set elemsize [hm_getfloat 'elemsize' 'Enter elem size']
*translatemark nodes 1 1 0.196
}
*clearmark nodes 1
hm_setpanelproc {hm_callpanel 'edit element';}
return
}
so this is my program
at the end there is a call panel so I think because of that its not working
after I split when I press return it should return to '*createmarkpanel nodes 1 'select node''
so????
I think it is not possible to call hm panels in a loop as you expect
So try redefining your problem
Your button had wrong constructor:
*createbutton(5,'SURFACETRIM',00,5,GRAY,'Launch the succsesful.tcl script','EvalTcl','succsesful.tcl')
should be
*createbutton(5,'SURFACETRIM',0,0,5,GRAY,'Launch the succsesful.tcl script','EvalTcl','succsesful.tcl')
hello
so I continue working on my script
So I think error lies in the *createvector comand I am not able to provide proper x and y component for the vector creation
So am I right??