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] Script Commands (https://www.cfd-online.com/Forums/ansys-meshing/124698-script-commands.html)

Tobi-R October 11, 2013 02:57

Script Commands
 
Hi,

can someone tell me, how the following commands work and can give me an example for them?

1) ic_geo_project_point
I don't really understand how this command work.
2) ic_geo_nearest_object

3) ic_geo_cre_bsp_crv_n_pnts_cons
Always get this error message when i try to use this:
{Unable to fit spline to points}
{Parameter out of range in GM126J}
{Error creating constrained BSpline curve: crv.3}

There was a Tutorial for this command in the Ansys folder, where is written that "tangent constraints weren't working", but this entry was from 2002.

FJSJ October 11, 2013 05:22

Hi Tobi,

maybe this links (posted by Far) can help you in your answer :)

Scripting lenguage version for ICEM 14.0 on win 7 64 bit

Tobi-R October 11, 2013 08:54

Hi Javi,

thank you for your answer, but I already found these links and they don't help me, because it's the same that is in the ICEM help.

macfly October 21, 2013 17:07

Hi Tobi,

Here's a code that gets the nearest surface at given coordinates, renames the surface and create a part that contains only the surface. Load the code in Replay Control and run it to see how it works (and turn on Show Surface Names):

Code:

# close geometry
ic_csystem_display all 0
ic_csystem_set_current global
ic_unload_tetin
ic_empty_tetin
ic_geo_set_modified 0
#
#
# draw a cube
ic_undo_group_begin
ic_geo_new_family GEOM
ic_boco_set_part_color GEOM
ic_vid_object box8 GEOM 00 {0 0 0} 1 1 1
ic_set_dormant_pickable point 0 {}
ic_set_dormant_pickable curve 0 {}
ic_undo_group_end
#
#
# create list of all surfaces in GEOM...get nearest surface at given coordinates among the list...rename it and create new part...
ic_undo_group_begin
set s_names[list [ic_geo_get_objects surface GEOM]]
set s_names [lindex $s_names 0] ;# read about tcl scripting to understand this...
set face [ic_geo_nearest_surface_list {0.5 0.5 1} $s_names] ;# get nearest surface from these coordinates
ic_geo_set_name surface $face newname 1 0
ic_geo_set_part surface newname NEWPART 0
ic_undo_group_end

I have a script that builds my geometry and then renames the inlets, outlets, etc. with the ic_geo_nearest_surface_list function. Very convenient instead of doing it manually.

macfly October 21, 2013 22:23

and the ic_geo_nearest_object function seems to work only for surfaces, for example to find the nearest surface at coordinates {0 0 0}: ic_geo_nearest_object surface {0 0 0}

The ICEM CFD Programmer's Guide: so incomplete...:confused:


All times are GMT -4. The time now is 13:44.