Defining Initial velocity by tcl script
hi, i'm trying to define an initial velocity by the tcl script.
At first, i have tried to use macro to record the script to define an initial velocity. As following,
the comman is *loadcreateonentity_curve(nodes,1,8,2,-7157.98626,6287.04714,0,0,0,9527,0,0,0,0,0)
there is no detail for the velocity on the hyperwork online documentation
when i try to use arguments to replace the vectors and the magnitude.
*createmarkpanel nodes 1 'Please pick one node'
set magnitude [hm_getint 'magnitude= ' 'Please specify the magnitude of velocity']
set plane [hm_getplanepanel 'Please define a plane']
foreach {nx ny nz} [lindex [lindex $plane 0] 0] {}
foreach {bx by bz} [lindex [lindex $plane 0] 1] {}
*loadcreateonentity_curve nodes 1 8 2 $nx $ny $nz 0 0 $magnitude 0 0 0 0 0
the results showed me an initial velocity with correct vector direction but wrong magnitude. (Magnitude = 1 )
does anyone can help me to solve this problem?
Answers
-
Maybe... a software bug!
Anyway, try setting magnitude by vector length:
*loadcreateonentity_curve nodes 1 8 2 [expr $nx* $magnitude] [expr $ny* $magnitude] [expr $nz* $magnitude] 0 0 $magnitude 0 0 0 0 0
0 -
Hi , tinh,
Thanks a lot! Your suggestion is very helpful
0