From: dmv Date: Thu, 26 Jun 2008 05:47:14 +0000 (+0000) Subject: IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option. X-Git-Tag: V4_1_0_maintainance_20080627~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3138ee68e2841efc0ce92cadb685d0a8a3499e05;p=modules%2Fvisu.git IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option. --- diff --git a/src/VISU_I/VISU_PointMap3d_i.cc b/src/VISU_I/VISU_PointMap3d_i.cc index 77895bd6..17fe55ec 100644 --- a/src/VISU_I/VISU_PointMap3d_i.cc +++ b/src/VISU_I/VISU_PointMap3d_i.cc @@ -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) diff --git a/src/VISU_I/VISU_PointMap3d_i.hh b/src/VISU_I/VISU_PointMap3d_i.hh index fdfcda32..cda3b01e 100644 --- a/src/VISU_I/VISU_PointMap3d_i.hh +++ b/src/VISU_I/VISU_PointMap3d_i.hh @@ -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);