|
double AskFaceAreasByPK(tag_t face_tag, double tol)
1 V2 a- r) r- S0 n7 M8 Y{. Y5 Z( |" S( c& O" \- _( l
tag_t ps_tag = NULL_TAG;* S" O* N9 K) C% ~( N* a
double amount[3] = { 0.0, 0.0, 0.0 };/ n9 C2 M' E" B& @, h9 X2 i
double mass[3] = { 0.0, 0.0, 0.0 };
$ _5 e: h) M- G/ ? double c_of_g[3] = { 0.0, 0.0, 0.0 };
' S/ s) ]* ?6 T4 G j# g- ^ double m_of_i[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };7 }9 Z5 G* |" \: v& G
double periphery[3] = { 0.0, 0.0, 0.0 };
/ i8 P' P. _& _9 N% w; J double areas = 0.0;
5 Y- W1 {, o. c1 E PK_FACE_t pkFace = 0;6 @. J5 I. |& L. t
PK_TOPOL_eval_mass_props_o_t props_o_t;
) ]* a! m# ~5 w: e. G if (NULL_TAG == face_tag || UF_PS_ask_ps_tag_of_object(face_tag, &ps_tag))6 T7 S5 x$ i9 _3 R0 D% R0 Z# T
return 0;2 V/ r# Q; W6 a
pkFace = ps_tag;
/ u; W4 N9 |( F5 I- R- @* E, d if (tol < 0.99)3 n% V( ?3 E) |5 N
tol = 0.99;
9 }+ V+ H$ v" c& w% C1 L) b& u if (tol > 1.0), W7 y9 u8 f/ F: Q6 y
tol = 1.0;. n% b7 V8 A0 p$ c) O
PK_TOPOL_eval_mass_props_o_m(props_o_t);' b& K2 C3 d Q! s
props_o_t.mass = PK_mass_c_of_g_c;
& ]$ P$ b2 `) O, ^ PK_TOPOL_eval_mass_props(1, &pkFace, tol, &props_o_t, amount, mass, c_of_g, m_of_i, periphery);
2 u4 q G3 e1 ]5 o2 f6 V areas = amount[0] * 1000.0 * 1000.0;
& ]' a9 r/ x) L: } return areas;
5 `1 j+ r6 V# R+ m! d& O}
6 @+ X: ?( `/ I' ]% x2 F5 j- g7 e% R
: w6 \/ ]0 a n |
|