|
double AskFaceAreasByPK(tag_t face_tag, double tol)
' o3 ]; F8 v5 j v3 y" ~6 k: W{
; V r' X4 p! w* [' U( I3 ^ tag_t ps_tag = NULL_TAG;
5 T# H1 N, p/ J( F8 u% Z double amount[3] = { 0.0, 0.0, 0.0 };4 z6 W! m* c6 J% t
double mass[3] = { 0.0, 0.0, 0.0 };% `! u, A% d3 w/ i3 V( o h
double c_of_g[3] = { 0.0, 0.0, 0.0 };0 I6 u$ p- N$ I# t9 Q' r
double m_of_i[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };* L+ K$ h# s( j9 c
double periphery[3] = { 0.0, 0.0, 0.0 };0 R9 p) E/ F. P/ x- P% }9 Y0 h
double areas = 0.0;
8 A+ z& Y8 p- U* T. D- f" k PK_FACE_t pkFace = 0;. \" |$ w- p% v3 E# `: b- k: }; x) ?6 ]
PK_TOPOL_eval_mass_props_o_t props_o_t; 4 e, Y4 @. e4 k1 q: K" g. l3 s
if (NULL_TAG == face_tag || UF_PS_ask_ps_tag_of_object(face_tag, &ps_tag)) z; F" |* Y# u7 t
return 0;+ T9 ]; B7 Z8 Y: H, L& h5 R
pkFace = ps_tag;
8 V7 r% {8 a- r, }- d6 ]. Y! ~ if (tol < 0.99) r% k0 C3 H2 _ H+ w+ e) T! v
tol = 0.99;
' o% ^# k& l* n l4 a' j9 B if (tol > 1.0)
. J3 g, }! f8 K" Z tol = 1.0;7 r9 i. L3 m4 q) s/ X- e" l2 y
PK_TOPOL_eval_mass_props_o_m(props_o_t);
- N3 m. e+ ?; c- x* ?- o props_o_t.mass = PK_mass_c_of_g_c;
5 f* \ z" I7 h/ b% e: [2 [' Q! b PK_TOPOL_eval_mass_props(1, &pkFace, tol, &props_o_t, amount, mass, c_of_g, m_of_i, periphery);
4 M! E# c. p4 t+ g5 x areas = amount[0] * 1000.0 * 1000.0;
& E( I/ B+ \- f: g/ _1 h return areas;
; e( {; u2 [1 l. K}: u/ M" {: Y# @3 C
2 l% @# M/ `9 m
|
|