|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 20 ![]() |
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? |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 277
Rep Power: 22 ![]() |
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 |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 20 ![]() |
That solved the problem. Thank you!
|
|
|
|
|
|
|
|
|
#4 |
|
New Member
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 11
Rep Power: 15 ![]() |
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! |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Nov 2009
Posts: 17
Rep Power: 20 ![]() |
try that code:
set i 0; while {$i < 10} {\ ic_mess "I dans le boucle: $i";\ incr i;} |
|
|
|
|
|
|
|
|
#6 |
|
New Member
Felipe Mendes
Join Date: Mar 2012
Location: Lausanne
Posts: 11
Rep Power: 15 ![]() |
Thanks!
![]() It worked pretty well! |
|
|
|
|
|
|
|
|
#7 |
|
Member
Khayyamian
Join Date: Dec 2010
Posts: 46
Rep Power: 17 ![]() |
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 | Search this Thread |
| Display Modes | |
|
|
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 |