]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option.
authordmv <dmv@opencascade.com>
Thu, 26 Jun 2008 05:47:14 +0000 (05:47 +0000)
committerdmv <dmv@opencascade.com>
Thu, 26 Jun 2008 05:47:14 +0000 (05:47 +0000)
src/VISU_I/VISU_PointMap3d_i.cc
src/VISU_I/VISU_PointMap3d_i.hh

index 77895bd660c80d9a67569fb8e777f6ab78b92dca..17fe55ec405ea76a118cc9348c467dfbb76630fe 100644 (file)
@@ -874,6 +874,23 @@ VISU::Scaling VISU::PointMap3d_i::GetScaling()
   return VISU::Scaling(GetSpecificPL()->GetScaling());
 }
 
+//------------------- Check Table on Positive Values ------------
+bool VISU::PointMap3d_i::IsPositiveTable()
+{
+  SALOMEDS::GenericAttribute_var anAttr;
+  mySObj->FindAttribute(anAttr, "AttributeTableOfReal");
+  SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
+
+  for (int i=1; i<=aTableOfReal->GetNbColumns(); i++)
+    for (int j=1; j<=aTableOfReal->GetNbRows(); j++) {
+      double aVal = aTableOfReal->GetValue(j, i);
+      if (aVal < 0)
+       return false;
+    }
+
+  return true;
+}
+
 //------------------- Plot3dBase Methods ------------------------
 
 void VISU::PointMap3d_i::SetScaleFactor (CORBA::Double theScaleFactor)
index fdfcda32d05f50d30c46c732056af6d77cda5674..cda3b01e62cedb692d4a3f01e5b47969bae4e2f9 100644 (file)
@@ -126,6 +126,8 @@ namespace VISU
     virtual VISU::Scaling GetScaling();
     virtual void SetScaling(VISU::Scaling theScaling);
 
+    bool IsPositiveTable();
+
     // Plot3dBase methods
 
     void SetScaleFactor (CORBA::Double theScaleFactor);