From aeb7cec23a3e4a70fb00df7d27cd06fe3d280f9c Mon Sep 17 00:00:00 2001 From: enk Date: Tue, 21 Mar 2006 08:05:09 +0000 Subject: [PATCH] Fix for Bug IPAL11013: Hexahedron that created with "Polyhedron" functionality breaks VTK viewer and "Aspect Ratio 3D" --- src/Controls/SMESH_Controls.cxx | 2 ++ src/Controls/SMESH_ControlsDef.hxx | 1 + 2 files changed, 3 insertions(+) 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; }; -- 2.39.2