/* An example function that asks the silhouettes of a given body in a given drawing member view and then asks the faces of those silhouettes. */ #include #include #include #include #include #include #include #include void ufusr(char *param, int *retcod, int param_len) { int ifail = 0; int num_silhouettes = 0; int ndx = 0; tag_t body_tag = NULL_TAG; tag_t view_tag = NULL_TAG; tag_t face_tag = NULL_TAG; tag_t * silhouette_tags = NULL; char error_message[133]; char * body_name = "body1"; char * view_name = "TOP@1"; char * face_name = "face1"; ifail = UF_initialize(); /* Find the tags of the body and view from their names. */ if( ifail == 0 ) ifail = UF_OBJ_cycle_by_name( body_name, &body_tag ); if( ifail == 0 ) ifail = UF_VIEW_ask_tag_of_view_name( view_name, &view_tag ); /* Retrieve the sils of the body in the top view. */ if( ifail == 0 ) ifail = UF_DRAW_ask_body_sils_in_view( body_tag, view_tag, &num_silhouettes, &silhouette_tags ); if( ifail == 0 ) { for( ndx=0; ndx 0 ) { ifail = UF_get_fail_message( ifail, error_message ); printf( "fails.\nError is: %s\n", error_message ); } else printf( "is successful.\n" ); ifail = UF_terminate(); }