Salome HOME
Fix for Bug IPAL11013:
authorenk <enk@opencascade.com>
Tue, 21 Mar 2006 08:05:09 +0000 (08:05 +0000)
committerenk <enk@opencascade.com>
Tue, 21 Mar 2006 08:05:09 +0000 (08:05 +0000)
Hexahedron that created with "Polyhedron" functionality breaks VTK viewer and "Aspect Ratio 3D"

src/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx

index c00cbae43554bcf0c5ea8f40f2d46537bad8eed7..2537cbd74caed32c204f403a8dbf6c034a735c7c 100644 (file)
@@ -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:{
index 576b1e8e011b9cec6f90c939fc040d6db3f9a9ae..a4018959f7536a9b545e7553bfa764d9ce55421e 100644 (file)
@@ -126,6 +126,7 @@ namespace SMESH{
                            TSequenceOfXYZ& theRes);
     protected:
       const SMDS_Mesh* myMesh;
+      const SMDS_MeshElement* myCurrElement;
       long       myPrecision;
     };