# [ICEM] prametric geometry script

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

 November 19, 2011, 20:31 prametric geometry script #1 New Member   Join Date: Nov 2009 Posts: 17 Rep Power: 9 Hi, I would like to have a simple parametric geometry (translated circle). To do that I generated following Tcl script: 1: ic_vdefine r variable 2 2: ic_point {} GEOM pnt.00 0,0,0 3: ic_point {} GEOM pnt.01 1,0,0 4: ic_point {} GEOM pnt.02 1,1,0 5: ic_curve arc_ctr_rad GEOM crv.01 {pnt.01 pnt.02 pnt.00 r 0 360} 6: ic_move_geometry curve names crv.01 translate {0 r 0} the problem is with line 6, the circle stays at initial position and no error is displayed. Does anybody know the reason/solution?

 November 22, 2011, 13:35 #2 Senior Member   Bruno Join Date: Mar 2009 Location: Brazil Posts: 236 Rep Power: 12 Hi, That's because {..} does not allow substitution inside the brackets. Use ".." instead and it should work: 1: set r 2 2: ic_point {} GEOM pnt.00 0,0,0 3: ic_point {} GEOM pnt.01 1,0,0 4: ic_point {} GEOM pnt.02 1,1,0 5: ic_curve arc_ctr_rad GEOM crv.01 "pnt.01 pnt.02 pnt.00 \$r 0 360" 6: ic_move_geometry curve names crv.01 translate "0 \$r 0" Cheers hadikhayyamian likes this.

 November 22, 2011, 16:33 #3 New Member   Join Date: Nov 2009 Posts: 17 Rep Power: 9 That solved the problem. Thank you!

 March 28, 2012, 03:40 #4 New Member   Felipe Mendes Join Date: Mar 2012 Location: Lausanne Posts: 11 Rep Power: 5 Hey guys, I'm also doing a parametric script using Tcl. Nevertheless, neither the while nor the for looping work: while {\$i < 10} { puts "I dans le boucle: \$i" incr i } for {set i 0} {\$i<5} {incr i} { puts "I dans le boucle: \$i" } Do you know how to make it work? Does anybody knows how to select some point or line in ICEM parametric language by specifying a location (like in ansys workbench)? Thanks a lot!

 March 28, 2012, 15:35 #5 New Member   Join Date: Nov 2009 Posts: 17 Rep Power: 9 try that code: set i 0; while {\$i < 10} {\ ic_mess "I dans le boucle: \$i";\ incr i;}

 March 29, 2012, 03:11 #6 New Member   Felipe Mendes Join Date: Mar 2012 Location: Lausanne Posts: 11 Rep Power: 5 Thanks! It worked pretty well!

 May 14, 2012, 13:55 #7 Member   Khayyamian Join Date: Dec 2010 Posts: 46 Rep Power: 6 Hi Brunoc; Thanks for your great help. I wonder if there is any book, ..... as a source for tcl/tk and its use in ICEM. Regards.

 Tags icem, parametric geometry, scripting, tcl

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post fatb0y CFX 3 January 14, 2012 20:42 lavoz ANSYS Meshing & Geometry 4 March 12, 2010 11:56 EmersonKB CFX 5 July 2, 2009 08:17 jaber Main CFD Forum 1 November 11, 2007 10:28 deneb FLUENT 3 January 22, 2007 05:31

All times are GMT -4. The time now is 20:10.