![]() |
ICEM Script use of a loop
Hello everyone, I am posting this question on ICEMCFD scripting hoping that someone would know the answer and anyone looking at this thread in the future would benefit from this. I have the following lines of scripts generated in ICEMCFD. Instead of making a copy of the curves and surfaces and translating them one by one, I wanna be able to do this in a loop where i would know the number of iterations (n) beforehand. The arguments for translation (here i have used 0.1,0.2,0.3,0.4 for simplicity} would depend on the value of n.
Also, when the duplicate copies of the curves and surfaces are being made, i wanna name them in such a way that i can reuse them in the future. Perhaps create a loft using two curves by writing a code that may look like ic_geo_duplicate_set_fam_and_data curve crv0 Firstcurve {} _0 ic_geo_duplicate_set_fam_and_data curve crv1 Secondcurve {} _0 ic_geo_cre_srf_loft_crvs SURFS FirstSurface 0.1 {Firstcurve Secondcurve} 4 0 1 Any help is appreciated. Let me know if anything i said is not clear. 1. ic_undo_group_begin 2. ic_geo_cre_geom_input C:wdir/import.txt 0.001 input PNTS pnt CRVS crv SURFS srf 10. ic_undo_group_begin 11. ic_geo_duplicate_set_fam_and_data surface srf0 srf0.0 {} _0 12. ic_geo_duplicate_set_fam_and_data curve crv1 crv1.0 {} _0 13. ic_geo_duplicate_set_fam_and_data curve crv0 crv0.0 {} _0 14. ic_move_geometry surface names srf0.0 translate {0.1 0.1 0.1} 15. ic_move_geometry curve names {crv1.0 crv0.0} translate {0.1 0.1 0.1} 16. ic_undo_group_end 17. ic_geo_duplicate_set_fam_and_data surface srf0 srf0.1 {} _1 18. ic_geo_duplicate_set_fam_and_data curve crv1 crv1.1 {} _1 19. ic_geo_duplicate_set_fam_and_data curve crv0 crv0.1 {} _1 20. ic_move_geometry surface names srf0.1 translate {0.2 0.2 0.2} 21. ic_move_geometry curve names {crv1.1 crv0.1} translate {0.2 0.2 0.2} 22. ic_undo_group_end 23. ic_geo_duplicate_set_fam_and_data surface srf0 srf0.2 {} _2 24. ic_geo_duplicate_set_fam_and_data curve crv1 crv1.2 {} _2 25. ic_geo_duplicate_set_fam_and_data curve crv0 crv0.2 {} _2 26. ic_move_geometry surface names srf0.2 translate {0.3 0.3 0.3} 27. ic_move_geometry curve names {crv1.2 crv0.2} translate {0.3 0.3 0.3} 28. ic_undo_group_end 29. ic_geo_duplicate_set_fam_and_data surface srf0 srf0.3 {} _3 30. ic_geo_duplicate_set_fam_and_data curve crv1 crv1.3 {} _3 31. ic_geo_duplicate_set_fam_and_data curve crv0 crv0.3 {} _3 32. ic_move_geometry surface names srf0.3 translate {0.4 0.4 0.4} 33. ic_move_geometry curve names {crv1.3 crv0.3} translate {0.4 0.4 0.4} 34. ic_undo_group_end |
| All times are GMT -4. The time now is 07:43. |