1342-基于UG二次開發(fā)技術(shù)的麻花鉆、擴(kuò)孔鉆、鉸刀設(shè)計(jì)系統(tǒng)研究
1342-基于UG二次開發(fā)技術(shù)的麻花鉆、擴(kuò)孔鉆、鉸刀設(shè)計(jì)系統(tǒng)研究,基于,ug,二次開發(fā),技術(shù),麻花,擴(kuò)孔,鉸刀,設(shè)計(jì),系統(tǒng),研究,鉆研
錐柄麻花鉆程序#include #include #include #include #include #include #include #include #include #include "design_drill.h"#define DESIGN_DRILL_CB_COUNT ( 5 + 1 )static UF_STYLER_callback_info_t DESIGN_DRILL_cbs[DESIGN_DRILL_CB_COUNT] = {{UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, DESIGN_DRILL_constructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_DESTRUCTOR_CB , 0, DESIGN_DRILL_destructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, DESIGN_DRILL_ok_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 0, DESIGN_DRILL_apply_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, DESIGN_DRILL_cancel_cb},{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }};static UF_MB_styler_actions_t actions[] = {{ "design_drill.dlg", NULL, DESIGN_DRILL_cbs, UF_MB_STYLER_IS_NOT_TOP },{ NULL, NULL, NULL, 0 } /* This is a NULL terminated list */};extern void ufsta (char *param, int *retcode, int rlen){int error_code;if ( (UF_initialize()) != 0) return;if ( (error_code = UF_MB_add_styler_actions ( actions ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return;}#ifdef DISPLAY_FROM_CALLBACKextern int ( int *response ){int error_code = 0;if ( ( error_code = UF_initialize() ) != 0 ) return (0) ;if ( ( error_code = UF_STYLER_create_dialog ( "design_drill.dlg",DESIGN_DRILL_cbs, /* Callbacks from dialog */DESIGN_DRILL_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */response ) ) != 0 ){char fail_message[133];/* Get the user function fail message based on the fail code.*/UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return (error_code);}#endif /* DISPLAY_FROM_CALLBACK */#ifdef DISPLAY_FROM_USER_EXITextern void (char *param, int *retcode, int rlen){int response = 0;int error_code = 0;if ( ( UF_initialize() ) != 0 ) return;if ( ( error_code = UF_STYLER_create_dialog ( "design_drill.dlg",DESIGN_DRILL_cbs, /* Callbacks from dialog */DESIGN_DRILL_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */&response ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return;}extern int ufusr_ask_unload (void){ return ( UF_UNLOAD_IMMEDIATELY ); }extern void ufusr_cleanup (void){return;}#endifint DESIGN_DRILL_constructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){UF_STYLER_item_value_type_tdata;if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_0;UF_MODL_eval_exp("angle0",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_1;UF_MODL_eval_exp("angle1",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_2;UF_MODL_eval_exp("R",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_3;UF_MODL_eval_exp("rc",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_4;UF_MODL_eval_exp("h",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_REAL_5;UF_MODL_eval_exp("d",&data.value.real); UF_STYLER_set_value(dialog_id,&data);UF_terminate ();UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG);int DESIGN_DRILL_destructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG);int DESIGN_DRILL_ok_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );double angle0;double angle1;double R;double rc;double h;double d;char exps_string[11][20];UF_STYLER_item_value_type_t data[11];data[0].item_attr=UF_STYLER_VALUE;data[0].item_id=DESIGN_DRILL_REAL_0;UF_STYLER_ask_value(dialog_id,&data[0]);data[1].item_attr=UF_STYLER_VALUE;data[1].item_id=DESIGN_DRILL_REAL_1;UF_STYLER_ask_value(dialog_id,&data[1]);data[2].item_attr=UF_STYLER_VALUE;data[2].item_id=DESIGN_DRILL_REAL_2;UF_STYLER_ask_value(dialog_id,&data[2]);data[3].item_attr=UF_STYLER_VALUE;data[3].item_id=DESIGN_DRILL_REAL_3;UF_STYLER_ask_value(dialog_id,&data[3]); data[4].item_attr=UF_STYLER_VALUE;data[4].item_id=DESIGN_DRILL_REAL_4;UF_STYLER_ask_value(dialog_id,&data[4]);data[5].item_attr=UF_STYLER_VALUE;data[5].item_id=DESIGN_DRILL_REAL_5;UF_STYLER_ask_value(dialog_id,&data[5]);angle0=data[0].value.real;angle1=data[1].value.real;R=data[2].value.real;rc=data[3].value.real;h=data[4].value.real;d=data[5].value.real;sprintf(exps_string[0],"angle0=%f",angle0);sprintf(exps_string[1],"angle1=%f",angle1);sprintf(exps_string[2],"R=%f",R);sprintf(exps_string[3],"rc=%f",rc);sprintf(exps_string[4],"h=%f",h);sprintf(exps_string[5],"d=%f",d);UF_MODL_edit_exp(exps_string[0]);UF_MODL_edit_exp(exps_string[1]);UF_MODL_edit_exp(exps_string[2]);UF_MODL_edit_exp(exps_string[3]);UF_MODL_edit_exp(exps_string[4]);UF_MODL_edit_exp(exps_string[5]);UF_MODL_update();uc1601("模型已更新,請(qǐng)將文件另存",1);UF_terminate ();return (UF_UI_CB_EXIT_DIALOG); }int DESIGN_DRILL_apply_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );double angle0;double angle1;double R; double rc;double h;double d;char exps_string[11][20];UF_STYLER_item_value_type_t data[11];data[0].item_attr=UF_STYLER_VALUE;data[0].item_id=DESIGN_DRILL_REAL_0;UF_STYLER_ask_value(dialog_id,&data[0]);data[1].item_attr=UF_STYLER_VALUE;data[1].item_id=DESIGN_DRILL_REAL_1;UF_STYLER_ask_value(dialog_id,&data[1]);data[2].item_attr=UF_STYLER_VALUE;data[2].item_id=DESIGN_DRILL_REAL_2;UF_STYLER_ask_value(dialog_id,&data[2]);data[3].item_attr=UF_STYLER_VALUE;data[3].item_id=DESIGN_DRILL_REAL_3;UF_STYLER_ask_value(dialog_id,&data[3]);data[4].item_attr=UF_STYLER_VALUE;data[4].item_id=DESIGN_DRILL_REAL_4;UF_STYLER_ask_value(dialog_id,&data[4]);data[5].item_attr=UF_STYLER_VALUE;data[5].item_id=DESIGN_DRILL_REAL_5;UF_STYLER_ask_value(dialog_id,&data[5]);angle0=data[0].value.real;angle1=data[1].value.real;R=data[2].value.real;rc=data[3].value.real;h=data[4].value.real;d=data[5].value.real;sprintf(exps_string[0],"angle0=%f",angle0);sprintf(exps_string[1],"angle1=%f",angle1);sprintf(exps_string[2],"R=%f",R);sprintf(exps_string[3],"rc=%f",rc);sprintf(exps_string[4],"h=%f",h);sprintf(exps_string[5],"d=%f",d); UF_MODL_edit_exp(exps_string[0]);UF_MODL_edit_exp(exps_string[1]);UF_MODL_edit_exp(exps_string[2]);UF_MODL_edit_exp(exps_string[3]);UF_MODL_edit_exp(exps_string[4]);UF_MODL_edit_exp(exps_string[5]);UF_MODL_update();uc1601("模型已更新,請(qǐng)將文件另存",1);UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_DRILL_cancel_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_terminate ();/* back rather than UF_UI_CB_CONTINUE_DIALOG. */return ( UF_UI_CB_EXIT_DIALOG ); }直柄麻花鉆程序#include #include #include #include #include #include #include #include #include #include "design_drill_spur.h"#define DESIGN_DRILL_SPUR_CB_COUNT ( 5 + 1 )static UF_STYLER_callback_info_t DESIGN_DRILL_SPUR_cbs[DESIGN_DRILL_SPUR_CB_COUNT] = {{UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, DESIGN_DRILL_SPUR_constructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_DESTRUCTOR_CB , 0, DESIGN_DRILL_SPUR_destructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, DESIGN_DRILL_SPUR_ok_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 0, DESIGN_DRILL_SPUR_apply_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, DESIGN_DRILL_SPUR_cancel_cb},{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }};static UF_MB_styler_actions_t actions[] = {{ "design_drill_spur.dlg", NULL, DESIGN_DRILL_SPUR_cbs, UF_MB_STYLER_IS_NOT_TOP },{ NULL, NULL, NULL, 0 } /* This is a NULL terminated list */};extern void ufsta (char *param, int *retcode, int rlen){int error_code;if ( (UF_initialize()) != 0) return;if ( (error_code = UF_MB_add_styler_actions ( actions ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message); printf ( "%s\n", fail_message ); }UF_terminate(); return;}#ifdef DISPLAY_FROM_CALLBACKextern int ( int *response ){int error_code = 0;if ( ( error_code = UF_initialize() ) != 0 ) return (0) ;if ( ( error_code = UF_STYLER_create_dialog ( "design_drill_spur.dlg",DESIGN_DRILL_SPUR_cbs, /* Callbacks from dialog */DESIGN_DRILL_SPUR_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */response ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return (error_code);}#endif#ifdef DISPLAY_FROM_USER_EXITextern void (char *param, int *retcode, int rlen){int response = 0;int error_code = 0;if ( ( UF_initialize() ) != 0 ) return;if ( ( error_code = UF_STYLER_create_dialog ( "design_drill_spur.dlg",DESIGN_DRILL_SPUR_cbs, /* Callbacks from dialog */DESIGN_DRILL_SPUR_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */ &response ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return;}extern int ufusr_ask_unload (void){ return ( UF_UNLOAD_IMMEDIATELY );}extern void ufusr_cleanup (void){ return;}#endif int DESIGN_DRILL_SPUR_constructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ UF_STYLER_item_value_type_t data;if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_SPUR_REAL_1;UF_MODL_eval_exp("angle",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_SPUR_REAL_2;UF_MODL_eval_exp("R",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_SPUR_REAL_3;UF_MODL_eval_exp("rc",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_SPUR_REAL_4;UF_MODL_eval_exp("l",&data.value.real);UF_STYLER_set_value(dialog_id,&data); data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_DRILL_SPUR_REAL_5;UF_MODL_eval_exp("a",&data.value.real);UF_STYLER_set_value(dialog_id,&data);UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_DRILL_SPUR_destructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_DRILL_SPUR_ok_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );double angle;double R;double rc;double l;double a;char exps_string[11][20];UF_STYLER_item_value_type_t data[11];data[1].item_attr=UF_STYLER_VALUE;data[1].item_id=DESIGN_DRILL_SPUR_REAL_1;UF_STYLER_ask_value(dialog_id,&data[1]);data[2].item_attr=UF_STYLER_VALUE;data[2].item_id=DESIGN_DRILL_SPUR_REAL_2;UF_STYLER_ask_value(dialog_id,&data[2]);data[3].item_attr=UF_STYLER_VALUE;data[3].item_id=DESIGN_DRILL_SPUR_REAL_3; UF_STYLER_ask_value(dialog_id,&data[3]);data[4].item_attr=UF_STYLER_VALUE;data[4].item_id=DESIGN_DRILL_SPUR_REAL_4;UF_STYLER_ask_value(dialog_id,&data[4]);data[5].item_attr=UF_STYLER_VALUE;data[5].item_id=DESIGN_DRILL_SPUR_REAL_5;UF_STYLER_ask_value(dialog_id,&data[5]);angle=data[1].value.real;R=data[2].value.real;rc=data[3].value.real;l=data[4].value.real;a=data[5].value.real;sprintf(exps_string[1],"angle=%f",angle);sprintf(exps_string[2],"R=%f",R);sprintf(exps_string[3],"rc=%f",rc);sprintf(exps_string[4],"l=%f",l);sprintf(exps_string[5],"a=%f",a);UF_MODL_edit_exp(exps_string[1]);UF_MODL_edit_exp(exps_string[2]);UF_MODL_edit_exp(exps_string[3]);UF_MODL_edit_exp(exps_string[4]);UF_MODL_edit_exp(exps_string[5]);UF_MODL_update();uc1601("模型已更新,請(qǐng)將文件另存",1);UF_terminate ();return (UF_UI_CB_EXIT_DIALOG); }int DESIGN_DRILL_SPUR_apply_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );double angle;double R; double rc;double l;double a;char exps_string[11][20];UF_STYLER_item_value_type_t data[11];data[1].item_attr=UF_STYLER_VALUE;data[1].item_id=DESIGN_DRILL_SPUR_REAL_1;UF_STYLER_ask_value(dialog_id,&data[1]);data[2].item_attr=UF_STYLER_VALUE;data[2].item_id=DESIGN_DRILL_SPUR_REAL_2;UF_STYLER_ask_value(dialog_id,&data[2]);data[3].item_attr=UF_STYLER_VALUE;data[3].item_id=DESIGN_DRILL_SPUR_REAL_3;UF_STYLER_ask_value(dialog_id,&data[3]);data[4].item_attr=UF_STYLER_VALUE;data[4].item_id=DESIGN_DRILL_SPUR_REAL_4;UF_STYLER_ask_value(dialog_id,&data[4]);data[5].item_attr=UF_STYLER_VALUE;data[5].item_id=DESIGN_DRILL_SPUR_REAL_5;UF_STYLER_ask_value(dialog_id,&data[5]);angle=data[1].value.real;R=data[2].value.real;rc=data[3].value.real;l=data[4].value.real;a=data[5].value.real;sprintf(exps_string[1],"angle=%f",angle);sprintf(exps_string[2],"R=%f",R);sprintf(exps_string[3],"rc=%f",rc);sprintf(exps_string[4],"l=%f",l);sprintf(exps_string[5],"a=%f",a);UF_MODL_edit_exp(exps_string[1]);UF_MODL_edit_exp(exps_string[2]);UF_MODL_edit_exp(exps_string[3]);UF_MODL_edit_exp(exps_string[4]);UF_MODL_edit_exp(exps_string[5]); UF_MODL_update();uc1601("模型已更新,請(qǐng)將文件另存",1);UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_DRILL_SPUR_cancel_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_terminate ();return ( UF_UI_CB_EXIT_DIALOG ); }擴(kuò)孔鉆程序#include #include #include #include #include #include #include #include #include #include "design_1.h"#define DESIGN_1_CB_COUNT ( 5 + 1 )static UF_STYLER_callback_info_t DESIGN_1_cbs[DESIGN_1_CB_COUNT] = {{UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, DESIGN_1_constructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_DESTRUCTOR_CB , 0, DESIGN_1_destructor_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, DESIGN_1_ok_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_APPLY_CB , 0, DESIGN_1_apply_cb},{UF_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, DESIGN_1_cancel_cb},{UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 }};static UF_MB_styler_actions_t actions[] = {{ "design_1.dlg", NULL, DESIGN_1_cbs, UF_MB_STYLER_IS_NOT_TOP },{ NULL, NULL, NULL, 0 } /* This is a NULL terminated list */};extern void ufsta (char *param, int *retcode, int rlen){int error_code;if ( (UF_initialize()) != 0) return;if ( (error_code = UF_MB_add_styler_actions ( actions ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return;}#ifdef DISPLAY_FROM_CALLBACKextern int ( int *response ){int error_code = 0;if ( ( error_code = UF_initialize() ) != 0 ) return (0) ;if ( ( error_code = UF_STYLER_create_dialog ( "design_1.dlg",DESIGN_1_cbs, /* Callbacks from dialog */DESIGN_1_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */response ) ) != 0 ){char fail_message[133];UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return (error_code);}#endif#ifdef DISPLAY_FROM_USER_EXITextern void (char *param, int *retcode, int rlen){int response = 0;int error_code = 0;if ( ( UF_initialize() ) != 0 ) return;if ( ( error_code = UF_STYLER_create_dialog ( "design_1.dlg",DESIGN_1_cbs, /* Callbacks from dialog */DESIGN_1_CB_COUNT, /* number of callbacks*/NULL, /* This is your client data */&response ) ) != 0 ){char fail_message[133];/* Get the user function fail message based on the fail code.*/UF_get_fail_message(error_code, fail_message);UF_UI_set_status (fail_message);printf ( "%s\n", fail_message ); }UF_terminate(); return;}extern int ufusr_ask_unload (void){return ( UF_UNLOAD_IMMEDIATELY );}extern void ufusr_cleanup (void){return;}#endif /* DISPLAY_FROM_USER_EXIT */int DESIGN_1_constructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_STYLER_item_value_type_tdata;data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_2;UF_MODL_eval_exp("R",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_3;UF_MODL_eval_exp("angle1",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_4;UF_MODL_eval_exp("dao",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_5;UF_MODL_eval_exp("a",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_6;UF_MODL_eval_exp("j",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_7;UF_MODL_eval_exp("d1",&data.value.real); UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_8;UF_MODL_eval_exp("d2",&data.value.real);UF_STYLER_set_value(dialog_id,&data);data.item_attr=UF_STYLER_VALUE;data.item_id=DESIGN_1_REAL_9;UF_MODL_eval_exp("b",&data.value.real);UF_STYLER_set_value(dialog_id,&data);UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_1_destructor_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );UF_terminate ();return (UF_UI_CB_CONTINUE_DIALOG); }int DESIGN_1_ok_cb ( int dialog_id,void * client_data,UF_STYLER_item_value_type_p_t callback_data){ if ( UF_initialize() != 0) return ( UF_UI_CB_CONTINUE_DIALOG );double a;double angle1;double b;double d1;double d2;double dao;double j;double R;char exps_string[11][20];UF_STYLER_item_value_type_t data[11];data[0].item_attr=UF_STYLER_VALUE; data[0].item_id=DESIGN_1_REAL_2;UF_STYLER_ask_value(dialog_id,&data[0]);data[1].item_attr=UF_STYLER_VALUE;data[1].item_id=DESIGN_1_REAL_3;UF_STYLER_ask_value(dialog_id,&data[1]);data[2].item_attr=UF_STYLER_VALUE;data[2].item_id=DESIGN_1_REAL_4;UF_STYLER_ask_value(dialog_id,&data[2]);data[3].item_attr=UF_STYLER_VALUE;data[3].item_id=DESIGN_1_REAL_5;UF_STYLER_ask_value(dialog_id,&data[3]);data[4].item_attr=UF_STYLER_VALUE;data[4].item_id=DESIGN_1_REAL_6;UF_STYLER_ask_value(dialog_id,&data[4]);data[5].item_attr=UF_STYLER_VALUE;data[5].item_id=DESIGN_1_REAL_7;UF_STYLER_ask_value(dialog_id,&data[5]);data[6].item_attr=UF_STYLER_VALUE;data[6].item_id=DESIGN_1_REAL_8;UF_STYLER_ask_value(dialog_id,&data[6]);data[7].item_attr=UF_STYLER_VALUE;data[7].item_id=DESIGN_1_REAL_9;UF_STYLER_ask_value(dialog_id,&data[7]);R=data[0].value.real;angle1=data[1].value.real;dao=data[2].value.real;a=data[3].value.real;j=data[4].value.real;d1=data[5].value.real;d2=data[6].value.real;b=data[7].value.real;sprintf(exps_string[0],"R=%f",R);sprintf(exps_string[1],"angle1=%f",angle1);sprintf(exps_string[2],"dao=%f",dao); sprintf(exps_string[3],"a=%f",a);sprintf(exps_string[4],"j=%f",j);sprintf(exps_string[5],"d1=%f",d1);sp
收藏