|
double AskFaceAreasByPK(tag_t face_tag, double tol)+ u4 B) ^. }8 R0 [+ I. \" M$ s
{
5 o7 i, f6 s! B1 q' g/ f6 Q8 ? tag_t ps_tag = NULL_TAG;
& C4 h+ J- L; X: K6 t7 V' a( H' ? double amount[3] = { 0.0, 0.0, 0.0 };* h/ r$ p& [0 `) d3 t
double mass[3] = { 0.0, 0.0, 0.0 };
% H! \% [7 y, d6 a2 ?0 s S& o double c_of_g[3] = { 0.0, 0.0, 0.0 };
3 |- f/ J; R+ q% V double m_of_i[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };8 l6 ?: h: L" s; [6 q4 x% ^
double periphery[3] = { 0.0, 0.0, 0.0 };+ m) |4 u U3 Z2 e
double areas = 0.0;
2 |& @0 Y/ Z" O; a+ o# g" n5 d PK_FACE_t pkFace = 0;
1 C, h K# L: l; @6 G! ~0 x+ h3 W PK_TOPOL_eval_mass_props_o_t props_o_t; - R+ r o. {5 U* r' X U6 `1 z9 A
if (NULL_TAG == face_tag || UF_PS_ask_ps_tag_of_object(face_tag, &ps_tag)). d0 G* D7 W4 h4 a5 k) C+ }: E! K
return 0;, b, D' m) w) n0 [
pkFace = ps_tag;0 U) L4 }5 a N" N8 F" e
if (tol < 0.99)4 b7 a% U# W/ g8 |0 w/ w5 g
tol = 0.99;
1 v* m- w$ I5 x3 r' I2 J5 {& F7 x if (tol > 1.0)9 S" N1 G$ m- Q7 d4 E$ t
tol = 1.0;0 p: p0 `3 \. z# z5 r1 G t" n
PK_TOPOL_eval_mass_props_o_m(props_o_t);
! n% e5 W, t9 q; P props_o_t.mass = PK_mass_c_of_g_c;' J) o( C# H+ A+ c& w
PK_TOPOL_eval_mass_props(1, &pkFace, tol, &props_o_t, amount, mass, c_of_g, m_of_i, periphery);
C( F' h) N4 R9 U/ `) x areas = amount[0] * 1000.0 * 1000.0;
$ E6 ]7 W% N: c7 s3 [ return areas;% M& m6 t4 y3 o- D% S) [- q
}
0 f* Q: ~) z3 x' q( \+ W; A$ ?9 r8 m1 i2 R- |/ {
|
|