移动特征的例子:将方块沿X方向移动10mm,采用点到到的方式。
extern DllExport void ufusr( char *parm, int *returnCode, int rlen )
{
/* Initialize the API environment */
if( UF_CALL(UF_initialize()) )
{
/* Failed to initialize */
return;
}
/* TODO: Add your application code here */
double adCornerPnt[3] = {0.0};
char *asEdgeLen[3] = {"100", "60", "36"};
tag_t tBlock = NULL_TAG;
UF_MODL_create_block1(UF_NULLSIGN, adCornerPnt, asEdgeLen, &tBlock);
uf_list_p_t move_list;
UF_MODL_create_list(&move_list);
UF_MODL_put_list_item(move_list, tBlock);
double adRealData[2][12] = {{ 0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0},
{ 10.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0}
};
UF_CALL(UF_MODL_move_feature(move_list, 0, adRealData));
UF_MODL_update();
/* Terminate the API environment */
UF_CALL(UF_terminate());
} |