Synopsis
PDX_MSGT gdx_ModelReadANF(long option, char *file, int *model, char **header, MDA_APP_DATA **ad_ptr)
Purpose
Converts an ANSYS Neutral File Format to GDX model
Description
Converts an ANSYS Neutral File Format to a gdx model allocated by this function. Optionally this function allocate MDA_APP_DATA to store the ANF file attribute (id, and cadid). If MDA_APP_DATA is passed in, attribute can be obtained on the following entities (id and cadid): GDX ANF ----------------------------------------------- gdx_solid vbody gdx_face asurf gdx_edge lcurv (if pointed by asurf) gdx_vertex kpt gdx_nurb_curve lcurv (if pointed by asurf, edge also has same attribure information)
To access to these attribute, use mda_ReadAppData with the MDA_APP_DATA returned by this function.
ad_ptr is passed in to this function, and allocated. gdx_db_ptr is the entities mentioned above, if accessed with the entities not mentioned above will not cause error, however, returned id should be 0. gdx_anf_attr is the structure to be filled with anf infomation. { GDX_ANF_ATTR gdx_anf_attr;
mda_ReadAppData(ad_ptr, gdx_db_ptr, &gdx_anf_attr); : : } Note that there is no equivalent data structure exist in gdx to store kpt atrribute for independent wireframe, therefore kpt for lcurv will be lost. If asurf without vbody shares edges in the topology, this function creates a gdx_shell for those gdx_face's sharing edges.
Input
option
Option (not used)
file
Input File name
header
Optionally retrieves header (start with '/com') as a 'n' concatenated text. Memroy will be allocated by the function. If header is not required, specify NULL.
ad_ptr
This function allocate MDA_APP_DATA for GDX_ANF_ATTR and store the original information, if it is not NULL.
Output
model
Model Id for allocated GDX Model
header
Text of all header start with '/com,' before any geometry command. '/com' will be removed in returned text. The memory is allocated by malloc if it is sepecified, therefore caller is responsible to free the allocated memory.
ad_ptr
returns MDA_APP_DATA allocated for GDX_ANF_ATTR
Return
GDX_NOERR or error