/****************************************************************************** Copyright (c) 1999 Unigraphics Solutions, Inc. Unpublished - All Rights Reserved *******************************************************************************/ /* The following example selects the Three Points default mode and then creates a plane over the temporary plane specified by the three selected points. */ #include #include #include void ufusr(char *param, int *retcod, int param_len) { double orientation[9] = {0,0,0,0,0,0,0,0,0}; double origin[3] = {0,0,0}; double pts[6] = {0,0,0,0,0,0}; int i, error_code = 0; int mode, display, response; tag_t plane_eid; mode = 1; /* set mode to Three Points */ display = 0; /* display temporary plane */ UF_initialize(); error_code = UF_UI_specify_plane( "Click OK to accept Three Points default mode", &mode, displa y, &response, orientation, origin, &plane_eid); /* if there's no error in specifying plane and the response */ /* wasn't BACK or CANCEL, then create a plane from the */ /* specified temporary plane */ if ( !error_code && response != 1 && response != 2) { /* get a point on the X-axis */ for (i=0; i<3; i++) pts[i] = origin[i] + orientation[i]; /* get a point on the Y-axis */ for (i=3; i<6; i++) pts[i] = origin[i-3] + orientation[i]; FTN(uf5374)(origin,pts,&pts[3],&plane_eid); } UF_terminate(); }