/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ /* This example creates symbolic_thread.part. The code creates a block with a symbolic thread. */ #include #include #include #include #include #define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X))) static int report( char *file, int line, char *call, int irc) { if (irc) { char messg[133]; printf("%s, line %d: %s\n", file, line, call); (UF_get_fail_message(irc, messg)) ? printf(" returned a %d\n", irc) : printf(" returned error %d: %s\n", irc, messg); } return(irc); } static void do_ugopen_api(void) { tag_t part_tag; tag_t blk_id, feature_eid, boss_id; tag_t face, s_face, c_face; char *part_name = "symbolic_thread"; char *edge_len[3]; double point[3], dir[3], box[6], radius, rad; int i, num, type, sen; uf_list_p_t list; UF_MODL_symb_thread_data_t thread; UF_CALL(UF_PART_new(part_name,ENGLISH,&part_tag)); /* Create block(10x10x10) at (0,0,0) */ edge_len[0] = "10.0"; edge_len[1] = "10.0"; edge_len[2] = "10.0"; point[0] = 0.0, point[1] = 0.0, point[2] = 0.0; UF_CALL(UF_MODL_create_block1(UF_NULLSIGN,point,edge_len,&blk_id)); /* Get faces of the block */ UF_CALL(UF_MODL_ask_feat_faces(blk_id,&list)); UF_CALL(UF_MODL_ask_list_count(list,&num)); /* Get face data */ for (i=0; i