From: ageay Date: Fri, 2 Oct 2009 08:07:48 +0000 (+0000) Subject: bug mantis 20457 X-Git-Tag: V5_1_main_FINAL~324 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=450cdf409e97b76505f039df800c4419ebaa5b9e;p=tools%2Fmedcoupling.git bug mantis 20457 --- diff --git a/src/INTERP_KERNEL/VolSurfFormulae.hxx b/src/INTERP_KERNEL/VolSurfFormulae.hxx index 7effb8eff..6e4a3d18a 100644 --- a/src/INTERP_KERNEL/VolSurfFormulae.hxx +++ b/src/INTERP_KERNEL/VolSurfFormulae.hxx @@ -373,9 +373,9 @@ namespace INTERP_KERNEL + 2.0*(I + R + U + X + Y + Z) + AA ) / 27.0 ; } - // ========================= - // Calculate Volume for Poly - // ========================= + // ========================================================================================================================= + // Calculate Volume for Generic Polyedron, even not convex one, WARNING !!! The polyedron's faces must be correctly ordered + // ========================================================================================================================= inline double calculateVolumeForPolyh(const double ***pts, const int *nbOfNodesPerFaces, int nbOfFaces, @@ -397,6 +397,30 @@ namespace INTERP_KERNEL return -volume/3.; } + // ============================================================================================================================================ + // Calculate Volume for NON Generic Polyedron. Only polydrons with bary included in pts is supported by this method. Result is always positive. + // ============================================================================================================================================ + inline double calculateVolumeForPolyhAbs(const double ***pts, + const int *nbOfNodesPerFaces, + int nbOfFaces, + const double *bary) + { + double volume=0.; + + for ( int i=0; i inline double addComponentsOfVec(const double **pts, int rk) {