From: enk Date: Tue, 21 Mar 2006 08:05:09 +0000 (+0000) Subject: Fix for Bug IPAL11013: X-Git-Tag: T3_2_0b1_pre1~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aeb7cec23a3e4a70fb00df7d27cd06fe3d280f9c;p=modules%2Fsmesh.git Fix for Bug IPAL11013: Hexahedron that created with "Polyhedron" functionality breaks VTK viewer and "Aspect Ratio 3D" --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index c00cbae43..2537cbd74 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -246,6 +246,7 @@ void NumericalFunctor::SetPrecision( const long thePrecision ) double NumericalFunctor::GetValue( long theId ) { + myCurrElement = myMesh->FindElement( theId ); TSequenceOfXYZ P; if ( GetPoints( theId, P )) { @@ -484,6 +485,7 @@ namespace{ double AspectRatio3D::GetValue( const TSequenceOfXYZ& P ) { double aQuality = 0.0; + if(myCurrElement->IsPoly()) return aQuality; int nbNodes = P.size(); switch(nbNodes){ case 4:{ diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 576b1e8e0..a4018959f 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -126,6 +126,7 @@ namespace SMESH{ TSequenceOfXYZ& theRes); protected: const SMDS_Mesh* myMesh; + const SMDS_MeshElement* myCurrElement; long myPrecision; };