|
[Sponsors] |
November 19, 2011, 20:31 |
prametric geometry script
|
#1 |
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 19 |
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: 277
Rep Power: 21 |
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 |
|
November 22, 2011, 16:33 |
|
#3 |
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 19 |
That solved the problem. Thank you!
|
|
March 28, 2012, 04:40 |
|
#4 |
New Member
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 11
Rep Power: 14 |
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, 16:35 |
|
#5 |
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 19 |
try that code:
set i 0; while {$i < 10} {\ ic_mess "I dans le boucle: $i";\ incr i;} |
|
March 29, 2012, 04:11 |
|
#6 |
New Member
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 11
Rep Power: 14 |
Thanks!
It worked pretty well! |
|
May 14, 2012, 14:55 |
|
#7 |
Member
Khayyamian
Join Date: Dec 2010
Posts: 46
Rep Power: 16 |
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem Importing Geometry ProE to CFX | fatb0y | CFX | 3 | January 14, 2012 20:42 |
[ICEM] Problem in geometry creation by script | lavoz | ANSYS Meshing & Geometry | 4 | March 12, 2010 11:56 |
Simulation of Flow through Complex 3D Geometry | EmersonKB | CFX | 5 | July 2, 2009 09:17 |
creating geometry using "Script files" in ICEMCFD | jaber | Main CFD Forum | 1 | November 11, 2007 10:28 |
vitual _ real | deneb | FLUENT | 3 | January 22, 2007 05:31 |