|
本帖最后由 f1405602 于 2023-10-20 16:27 编辑
3 b! f, N& H- u9 d& Y4 P! l4 u1 f
double askFaceArea(tag_t objTag)
$ P# l5 `6 Q; Q$ M. s{
. _5 N& ^5 v4 o7 m% \1 ^% Z string libgeom = GetugInstallPath() + "libgeom.dll"; V7 a, a2 u3 T6 C
char library_name[256] = { '\0' };
% P( ~' _& S9 K strcpy(library_name, libgeom.c_str());
' j7 I( |+ `1 s8 s) e typedef double(*load_ufusr_f_p_t)(unsigned int v1, double v2);//定义传参- k- L* Q$ q2 X
load_ufusr_f_p_t MEASURE_ask_face_area = NULL;
# B8 w1 S) C/ Q6 s* u8 N- M. ^ UF_load_library(library_name, "?MEASURE_ask_face_area@@YANIN@Z", (UF_load_f_p_t *)&MEASURE_ask_face_area);) N: D. a; l+ w# s& y1 p
if (MEASURE_ask_face_area != NULL)2 Z& ?1 l& H& {( {+ p3 W
return MEASURE_ask_face_area(objTag, 0.001);
3 W! G" G7 [8 A& E" T else5 l' }5 b+ s2 t! \7 V! s: p
return 0;
3 I2 M% ]8 U: L' A2 j; f) n}2 n- n! |" a! t1 v7 ]% w
: E3 }' f/ s3 P: n4 m# Z |
|