CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] One question about ICEM script failure (https://www.cfd-online.com/Forums/ansys-meshing/105115-one-question-about-icem-script-failure.html)

lnk July 23, 2012 12:07

One question about ICEM script failure
 
Why this work

'
ic_undo_group_begin
ic_geo_new_family GEOM
ic_boco_set_part_color GEOM
ic_empty_tetin
ic_point {} GEOM pnt.00 1,2,3
ic_undo_group_end
ic_undo_group_begin
ic_undo_group_end
ic_undo_group_begin
ic_geo_new_family BODY
ic_boco_set_part_color BODY
ic_geo_create_volume {1 2 3} {} BODY
ic_undo_group_end
ic_undo_group_begin
ic_undo_group_end

'

but this doesn't work

'
set a 1
set b 2
set c 3

ic_undo_group_begin
ic_geo_new_family GEOM
ic_boco_set_part_color GEOM
ic_empty_tetin
ic_point {} GEOM pnt.00 1,2,3
ic_undo_group_end
ic_undo_group_begin
ic_geo_new_family HAHA
ic_boco_set_part_color HAHA
ic_geo_create_volume {$a $b $c} {} HAHA
ic_undo_group_end
ic_undo_group_begin
ic_undo_group_end
'
?


Can you parameterize the button 'Create Body'?
Best regard and many thanks,
lnk

Far July 23, 2012 23:45

may be you need to create the new procedure.

lnk July 24, 2012 05:41

Quote:

Originally Posted by Far (Post 373124)
may be you need to create the new procedure.

Thanks for your answer, Far. My problem is I can't find a way to parameterize the button 'create body'. ( I also tried to create the body by the middle of two points. But the coordinate is also showed as numbers but not the name of the points I used. :( )

Is there any way to make 'ic_geo_create_volume {$a $b $c} {} HAHA' works?

Best regards and many thanks,
lnk

PSYMN July 25, 2012 00:07

I think the curly brackets are your problem...

You could do it this way...

Quote:

ic_geo_create_volume [ic_geo_get_point_location pnt.00] {} BODY
Or this way...

Quote:

set loc [ic_geo_get_point_location pnt.00]
ic_geo_create_volume $loc {} BODY
I have not had a chance to mess with trying to define each point as a separate parameter, but I am sure it can be done also...

lnk July 25, 2012 02:28

Quote:

Originally Posted by PSYMN (Post 373362)
I think the curly brackets are your problem...

You could do it this way...



Or this way...



I have not had a chance to mess with trying to define each point as a separate parameter, but I am sure it can be done also...


Thank you very much for your answer!

macfly November 6, 2013 10:40

Late answer but... here is another way to do it:
Code:

set a 1
set b 2
set c 3
set abc [format "%.0f %.0f %.0f" $a $b $c]

ic_undo_group_begin
ic_geo_new_family GEOM
ic_boco_set_part_color GEOM
ic_empty_tetin
ic_point {} GEOM pnt.00 $abc
ic_undo_group_end
ic_undo_group_begin
ic_geo_new_family HAHA
ic_boco_set_part_color HAHA
ic_geo_create_volume $abc {} HAHA
ic_undo_group_end



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