|
[Sponsors] |
[ICEM] TCL scripting error (parameter use in functions) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 25, 2011, 05:46 |
[ICEM] TCL scripting error (parameter use in functions)
|
#1 |
New Member
Join Date: Apr 2011
Posts: 3
Rep Power: 15 |
Hi,
I'm having a problem using parameters in Icem's geometry functions. I'm trying to create points on a curve having a distance of 0.05 of the curves length. No problem by using the command with an actual number: Code:
# Create Point+Curve ic_point {} SPLINE pnt.01 0,0,0 ic_point {} SPLINE pnt.02 1,0,0 ic_curve point SPLINE crv.01 {pnt.01 pnt.02} # Create point on curve at position 0.05 ic_point crv_par SPLINE pnt.03 {crv.01 0.05} Code:
# set point number and start param set pnt_nr 3 set param 0.0 #---Loop Start # Set the parameter to create the point; output of correct value set param [expr {$param+0.05}] mess "set param to: $param \n" # Create point on curve ic_point crv_par GEOM pnt.$pnt_nr {crv.01 $param} incr pnt_nr #---Loop End Code:
Error in replay of ic_point crv_par GEOM pnt.$pnt_nr {crv.01 $param}: {Error in scanning curve parameter: $param} Code:
{expr $param} [$param] "$param" |
|
July 25, 2011, 11:55 |
|
#2 |
Member
Join Date: Apr 2009
Posts: 46
Rep Power: 17 |
{crv.01 0.05} is a list.
No substitutions are performed on the characters between the braces here. Use list operations to construct the list variable. Code:
set crvl {crv.01} lappend crvl $param ic_point crv_par GEOM pnt.$pnt_nr $crvl |
|
July 25, 2011, 12:36 |
|
#3 |
New Member
Join Date: Apr 2011
Posts: 3
Rep Power: 15 |
Good to know that these functions work with lists. Thanks fox!
|
|
Tags |
icem tcl script parameter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] What are sub-loops and help my failing mesh. | siw | ANSYS Meshing & Geometry | 3 | March 13, 2010 07:18 |