From 3138ee68e2841efc0ce92cadb685d0a8a3499e05 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 26 Jun 2008 05:47:14 +0000 Subject: [PATCH] IPAL20025 4.x: wrong presentation is created with checked "Logarithmic Scaling" option. --- src/VISU_I/VISU_PointMap3d_i.cc | 17 +++++++++++++++++ src/VISU_I/VISU_PointMap3d_i.hh | 2 ++ 2 files changed, 19 insertions(+) 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); -- 2.39.2