-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dCache_i.cc
// Author : Oleg UVAROV
// Module : VISU
//
+#ifdef WNT
+#define NOGDI
+#endif
+
#include "VISU_ColoredPrs3dCache_i.hh"
#include "VISU_ColoredPrs3dHolder_i.hh"
#include "VISU_Actor.h"
#include "VISU_PipeLine.hxx"
+#include "VISU_Tools.h"
#include "SALOME_Event.h"
theRequiredMemory = int( aMemoryUsed + aMemoryNeeded ) + 1;
size_t aMb = 1024 * 1024;
- double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*aMb)) / double(aMb);
+ double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*(double)aMb)) / double(aMb);
anEnlargeType = aMemoryNeeded < aFreeMemory ?
VISU::ColoredPrs3dCache::ENLARGE : VISU::ColoredPrs3dCache::IMPOSSIBLE;
}
return;
size_t aMb = 1024 * 1024;
- double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*aMb)) / double(aMb);
+ double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(8192*(double)aMb)) / double(aMb);
CORBA::Float aMemoryUsed = GetDeviceMemorySize();
CORBA::Float aMemoryNeeded = theMemorySize - aMemoryUsed;
if( aMemoryNeeded > aFreeMemory )
CORBA::String_var anIOR = GetID();
SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectIOR(anIOR.in());
VISU::RemoveFromStudy(aSObject, false, true);
- Destroy();
+ UnRegister();
}
std::string
TPrs3dPtr aPrs3d(thePrs3d);
myHolderMap[theHolderEntry].push_front(aPrs3d);
thePrs3d->SetHolderEntry( theHolderEntry );
- thePrs3d->Destroy();
+ thePrs3d->UnRegister();
}
return thePrs3d;
}
aPrs3d->SameAs(thePrs);
+ // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+ // special case for the "Gauss Points" presentation,
+ // update the LookupTable in the mapper, after assign properties of the presentation
+ // using SameAs(...) method.
+ VISU::GaussPoints_i* gPoints = dynamic_cast<VISU::GaussPoints_i*>( aPrs3d.get() );
+ if(gPoints) {
+ gPoints->UpdateMapperLookupTable();
+ }
+
// special case for deformed shape
VISU::DeformedShapeAndScalarMap_i* dShape =
dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>( aPrs3d.get() );
ProcessVoidEvent(new TAddActorEvent(anActor,aViewWindow));
//aViewWindow->AddActor(anActor);
anActor->SetVisibility(true);
+ SetVisibilityState( aHolderEntry, Qtx::ShownState);
}
if(aPrs3d != aLastVisitedPrs3d)
aNewActor = aPrs3d->CreateActor();
ProcessVoidEvent(new TAddActorEvent(aNewActor,aViewWindow));
//aViewWindow->AddActor(aNewActor);
- }else
+ }else {
aNewActor->SetVisibility(true);
+ SetVisibilityState( aHolderEntry, Qtx::ShownState);
+ }
aNewActor->DeepCopy(anActor);
aPrs3d->SetActiveState(true);