|
本帖最后由 f1405602 于 2023-10-20 16:27 编辑
) ~% V; a% |1 L( m5 v& W- S
* o* H4 w( C! m' idouble askFaceArea(tag_t objTag)
& k( z' F9 [4 {6 }5 u. X v( L" w{* V9 }3 B$ V- Y% X
string libgeom = GetugInstallPath() + "libgeom.dll";
% L; \1 _, x5 X' ^( J char library_name[256] = { '\0' };
/ ?0 }, k, e9 P% g strcpy(library_name, libgeom.c_str());. X9 m# V$ P( L/ ^/ e
typedef double(*load_ufusr_f_p_t)(unsigned int v1, double v2);//定义传参5 V1 [; I# j" J' s
load_ufusr_f_p_t MEASURE_ask_face_area = NULL;4 w# i7 L" q4 j( A1 c( @" l5 ?
UF_load_library(library_name, "?MEASURE_ask_face_area@@YANIN@Z", (UF_load_f_p_t *)&MEASURE_ask_face_area);
% f6 Z# V- x8 Y4 d if (MEASURE_ask_face_area != NULL)" p3 f9 c. [, u! U* Q% j: O
return MEASURE_ask_face_area(objTag, 0.001);
, w1 z, r! A5 J4 X) l else
; r- x0 M0 j* R: e) G9 a return 0;8 F: `# O% q& |# I2 a$ L9 h" ^# [
}
7 w3 ]9 E2 A" i
7 r6 `+ b" Q5 K6 _, i; X' v+ F |
|