|
本帖最后由 f1405602 于 2023-10-20 16:27 编辑
+ f3 e3 z/ {3 P5 ^& A: v$ H7 B2 F" z) \4 t9 W- q2 v6 s
double askFaceArea(tag_t objTag)
2 n& k4 O' k$ n6 O7 U" v( \; r{
4 A; O) v% F, ?/ ^ string libgeom = GetugInstallPath() + "libgeom.dll";
' H; }+ c& Z. V5 @! l- t# X# A char library_name[256] = { '\0' };
- E! G! D9 F& d* Q* _% `, Z, i4 ]% e- w strcpy(library_name, libgeom.c_str());! u1 u8 ]& P! U- |8 j, @
typedef double(*load_ufusr_f_p_t)(unsigned int v1, double v2);//定义传参 O i1 o5 c. l! W) C
load_ufusr_f_p_t MEASURE_ask_face_area = NULL;- S. D4 ^* U0 D' w. F1 z* x3 I
UF_load_library(library_name, "?MEASURE_ask_face_area@@YANIN@Z", (UF_load_f_p_t *)&MEASURE_ask_face_area);7 E7 e0 f1 l L+ [8 J" g
if (MEASURE_ask_face_area != NULL)
( r' U5 t6 v3 H7 J6 Z$ V. ? return MEASURE_ask_face_area(objTag, 0.001);, g4 D$ @4 l' c5 ?
else4 j- N+ k0 o+ a8 G }! j2 y
return 0;1 W4 d6 c& f7 c! T8 `+ r5 x1 J; x# M
}. k8 N/ k, _2 j
6 m9 i1 C" n* O3 U |
|