1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 6 //创建一个B面 7 int NumPoleU = 4;//U方向极数 8 int NumPoleV = 4;//V方向极数 9 int UOrd = 4;//U方向规则 10 int VoRD = 4;//V方向规则 11 double UKnot[9] = {0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0};//U方向数列 12 double VKnot[9] = {0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0};//V方向数列 13 14 int i, j, k = 0; 15 double Weight = 1.0; 16 double Pole[64];//极点数组 17 for (i = 0; i < 4; i++) 18 { 19 for (j = 0; j < 4; j++) { 20 Pole[k++] = i; 21 Pole[k++] = j; 22 Pole[k++] = 0.0; 23 Pole[k++] = Weight; 24 } 25 } 26 tag_t BaseSheetId; 27 int KnotFix; 28 int PoleFix; 29 30 UF_MODL_create_bsurf(NumPoleU, NumPoleV, UOrd, VoRD, UKnot, VKnot, Pole, &BaseSheetId, &KnotFix, &PoleFix); 31 32 UF_terminate();