CFD Online Logo CFD Online URL
Home > Forums > ANSYS Meshing & Geometry

[ICEM] TCL scripting error (parameter use in functions)

Register Blogs Members List Search Today's Posts Mark Forums Read

Sponsored Links

LinkBack Thread Tools Display Modes
Old   July 25, 2011, 05:46
Default [ICEM] TCL scripting error (parameter use in functions)
New Member
Join Date: Apr 2011
Posts: 3
Rep Power: 8
firesoul is on a distinguished road

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:
# 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}
I'd like now to replace the number by a parameter, which may be used in a loop:

# 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
I get the following error

Error in replay of ic_point crv_par GEOM pnt.$pnt_nr {crv.01  $param}:
{Error in scanning curve parameter: $param}
I figured I had the wrong format so I tried several approaches to get it to work, without success.

{expr $param}
Thanks for any Ideas on how to get it working!
Attached Files
File Type: txt param.txt (497 Bytes, 20 views)
firesoul is offline   Reply With Quote
Sponsored Links

Old   July 25, 2011, 11:55
fox000002's Avatar
Join Date: Apr 2009
Posts: 46
Rep Power: 10
fox000002 is on a distinguished road
{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.

set crvl {crv.01}
lappend crvl $param

ic_point crv_par GEOM pnt.$pnt_nr $crvl
fox000002 is offline   Reply With Quote

Old   July 25, 2011, 12:36
New Member
Join Date: Apr 2011
Posts: 3
Rep Power: 8
firesoul is on a distinguished road
Good to know that these functions work with lists. Thanks fox!
firesoul is offline   Reply With Quote


icem tcl script parameter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 08:18

Sponsored Links

All times are GMT -4. The time now is 07:24.