]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
*** empty log message ***
authorvsv <vsv@opencascade.com>
Fri, 12 Sep 2008 10:55:26 +0000 (10:55 +0000)
committervsv <vsv@opencascade.com>
Fri, 12 Sep 2008 10:55:26 +0000 (10:55 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/PIPELINE/VISU_DataSetMapperHolder.cxx
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_PointSpriteMapperHolder.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.cxx
src/PIPELINE/VISU_PolyDataMapperHolder.hxx
src/VISUGUI/VisuGUI_ClippingPanel.cxx
src/VISU_I/VISU_GaussPoints_i.cc

index 4dad7b29702b403a69685f65de0f8d97ca3061a2..da9e7e06a844f75d66b8140097d6ae37bd418d0c 100644 (file)
@@ -531,6 +531,7 @@ VISU_GaussPtsAct
 ::SetVisibility(int theMode)
 {
   Superclass::SetVisibility(theMode);
+  myDeviceActor->SetVisibility(GetVisibility()); // VSV
   myScalarBarCtrl->SetVisibility(theMode);
   Highlight(isHighlighted());
 }
@@ -1293,16 +1294,16 @@ VISU_GaussPtsAct1
 {
   Superclass::AddToRender(theRenderer);
 
-  myInsideDeviceActor->AddToRender(theRenderer);
-  myOutsideDeviceActor->AddToRender(theRenderer);
+  //myInsideDeviceActor->AddToRender(theRenderer);
+  //myOutsideDeviceActor->AddToRender(theRenderer);
 }
 
 void 
 VISU_GaussPtsAct1
 ::RemoveFromRender(vtkRenderer* theRenderer)
 {
-  myInsideDeviceActor->RemoveFromRender(theRenderer);
-  myOutsideDeviceActor->RemoveFromRender(theRenderer);
+  //myInsideDeviceActor->RemoveFromRender(theRenderer);
+  //myOutsideDeviceActor->RemoveFromRender(theRenderer);
 
   Superclass::RemoveFromRender(theRenderer);
 }
@@ -1358,18 +1359,18 @@ VISU_GaussPtsAct1
 
   Superclass::SetMapperInput(theDataSet);
 
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myInsideDeviceActor->SetPipeLine(aPipeLine);
-    aPipeLine->Delete();
-  }
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myInsideDeviceActor->SetPipeLine(aPipeLine);
+//     aPipeLine->Delete();
+//   }
 
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myOutsideDeviceActor->SetPipeLine(aPipeLine);
-    aPipeLine->Delete();
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myOutsideDeviceActor->SetPipeLine(aPipeLine);
+//     aPipeLine->Delete();
 
-    aPipeLine->SetExtractBoundaryCells(true);
-    aPipeLine->SetExtractInside(true);
-  }
+//     aPipeLine->SetExtractBoundaryCells(true);
+//     aPipeLine->SetExtractInside(true);
+//   }
 }
 
 
@@ -1440,7 +1441,7 @@ VISU_GaussPtsAct1
 
   bool aVisisbility = GetVisibility();
   bool anIsSegementation = IsSegmentationEnabled();
-  myDeviceActor->SetVisibility(aVisisbility && !anIsSegementation);
+  myDeviceActor->SetVisibility(aVisisbility/* && !anIsSegementation*/);
   myInsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
   myOutsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
 
@@ -1493,7 +1494,7 @@ VISU_GaussPtsAct1
 
   aPipeline->SetImplicitFunction(anImplicitFunction); // To restore
   aPipeline->SetExtractBoundaryCells(true);
-  aPipeline->SetExtractInside(true);
+  //aPipeline->SetExtractInside(true);
   aPipeline->SetMagnification( aMagnification );
 
   aPipeline->SetPrimitiveType( myOutsideCursorSettings->GetPrimitiveType() );
@@ -1563,7 +1564,7 @@ VISU_GaussPtsAct1
   case vtkCommand::EndInteractionEvent: {
     bool aVisisbility = GetVisibility();
     bool anIsSegementation = IsSegmentationEnabled();
-    myDeviceActor->SetVisibility(aVisisbility && !anIsSegementation);
+    myDeviceActor->SetVisibility(aVisisbility/* && !anIsSegementation*/);
     myInsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
     myOutsideDeviceActor->SetVisibility(aVisisbility && anIsSegementation);
     break;
@@ -1626,15 +1627,15 @@ VISU_GaussPtsAct2
 ::SetMapperInput(vtkDataSet* theDataSet) 
 {
   if(MYDEBUG2) MESSAGE("VISU_GaussPtsAct2::SetMapperInput - this = "<<this);
-
-  if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
-    myDeviceActor->SetPipeLine(aPipeLine);
-    myCurrentPL = aPipeLine;
-    aPipeLine->Delete();
-
-    myMapper->SetInput(myCurrentPL->GetPickableDataSet());
-    SetMapper(myMapper.GetPointer());
-  }
+  Superclass::SetMapperInput(theDataSet);
+//   if(VISU_GaussPointsPL* aPipeLine = CreatePipeLine(GetGaussPointsPL())){
+//     myDeviceActor->SetPipeLine(aPipeLine);
+//     myCurrentPL = aPipeLine;
+//     aPipeLine->Delete();
+
+//     myMapper->SetInput(myCurrentPL->GetPickableDataSet());
+//     SetMapper(myMapper.GetPointer());
+//   }
 }
 
 //----------------------------------------------------------------------------
index 0bc9e0deb98c4a7c6b40c7a0545f12f50e5d67bd..06337bd034adf05713f4af37c5d97a8332e252c5 100644 (file)
@@ -92,6 +92,7 @@ VISU_DataSetMapperHolder
     VISU::CopyDataSetMapper(GetDataSetMapper(), 
                            aMapperHolder->GetDataSetMapper(), 
                            theIsCopyInput);
+    myExtractGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
index 0f5ba427e500796c4eebb9ed6d998027ebea1a3a..36ae4c7418122652f5ad59a0b6752bebdcb9cd29 100644 (file)
@@ -245,7 +245,7 @@ VISU_GaussPointsPL
 {
   Superclass::Init();
 
-  SetExtractInside(false);
+  //SetExtractInside(false);
 
   vtkDataSet* aDataSet = GetParentMesh();
   vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
index 69c9be266c204dedd9873c979b750f77cd7664af..6497e48986a440e1fec693313ce88812b85354b1 100644 (file)
@@ -30,6 +30,7 @@
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 
 #include "VISU_PipeLineUtils.hxx"
+#include "SALOME_ExtractPolyDataGeometry.h"
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -73,6 +74,7 @@ VISU_PointSpriteMapperHolder
     VISU::CopyPointSpriteDataMapper(GetPointSpriteMapper(), 
                                    aMapperHolder->GetPointSpriteMapper(), 
                                    theIsCopyInput);
+    myExtractPolyDataGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
index 55abef8092155e07922f9498b6701db4640bc3c8..43ece1713636d8a59bd546173070a85045bd2f58 100644 (file)
@@ -40,6 +40,7 @@
 #include <vtkImplicitFunction.h>
 #include <vtkImplicitFunctionCollection.h>
 #include <vtkMath.h>
+//#include <vtkExtractPolyDataGeometry.h>
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -67,6 +68,7 @@ VISU_PolyDataMapperHolder
   myExtractPolyDataGeometry->SetImplicitFunction(anImplicitBoolean);
   anImplicitBoolean->SetOperationTypeToIntersection();
   anImplicitBoolean->Delete();
+  //myExtractPolyDataGeometry->ExtractInsideOn();
 }
 
 
@@ -92,6 +94,7 @@ VISU_PolyDataMapperHolder
     VISU::CopyPolyDataMapper(GetPolyDataMapper(), 
                             aMapperHolder->GetPolyDataMapper(), 
                             theIsCopyInput);
+    myExtractPolyDataGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction());
   }
 }
 
index 10ff1a4abeb43697d89da615b54cc0eaac10f166..ece41f4d11827092b3b94f94dfffdae20284e7e1 100644 (file)
@@ -161,6 +161,8 @@ private:
   //----------------------------------------------------------------------------
   VISU::PPolyDataIDMapper myPolyDataIDMapper;
   vtkSmartPointer<vtkPolyDataMapper> myPolyDataMapper;
+
+protected:
   vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myExtractPolyDataGeometry; //!< Clipping
 };
 
index 0714ff8a320b5137bdba2b1fda33e8fe5836166b..60bcbaf5203df6eb5f810d2aca81950d340d7527 100644 (file)
@@ -297,21 +297,38 @@ void VisuGUI_ClippingPanel::fillPrsList()
 QString VisuGUI_ClippingPanel::getPrsName(VISU::Prs3d_i* thePrs)
 {
   QString aName;
+  QString aObjName;
   QStringList aPath;
-  SALOMEDS::SObject_var aFather = thePrs->GetSObject()->GetFather();
-  while (!aFather->_is_nil()) {
-    SALOMEDS::GenericAttribute_var anAttr;
-    if (aFather->FindAttribute(anAttr, "AttributeName")) {
-      SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
-      CORBA::String_var aValue = aName->Value();
-      aPath.append(aValue.in());
+  SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
+  if (!aSObject->_is_nil()) {
+    SALOMEDS::SObject_var aFather = aSObject->GetFather();
+    while (!aFather->_is_nil()) {
+      QString aFName = aFather->GetName();
+      aPath.append(aFName);
+      if (aFName == "Post-Pro")        break;
       aFather = aFather->GetFather();
-    } else
-      break;
+    }
+    aObjName = aSObject->GetName();
+  } else {
+    VISU::ColoredPrs3d_i* aColPrs = dynamic_cast<VISU::ColoredPrs3d_i*>(thePrs);
+    if (aColPrs) {
+      _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myModule));
+      _PTR(SObject) aSObjPtr = aStudy->FindObjectID(aColPrs->GetHolderEntry().c_str());
+      if (aSObjPtr) {
+       _PTR(SObject) aFather = aSObjPtr->GetFather();
+       while (aFather) {
+         QString aFName(aFather->GetName().c_str());
+         aPath.append(aFName);
+         if (aFName == "Post-Pro")     break;
+         aFather = aFather->GetFather();
+       }
+      }
+      aObjName = aSObjPtr->GetName().c_str();
+    }
   }
   for (int j = aPath.size() - 2; j >= 0; j--)
     aName += aPath.at(j) + "/";
-  aName += thePrs->GetName().c_str();
+  aName += aObjName;
   return aName;
 }
 
@@ -435,7 +452,6 @@ void VisuGUI_ClippingPanel::onWindowDestroyed(QObject* theWnd)
 //*************************************************************************
 void VisuGUI_ClippingPanel::onPresentationCreate(VISU::Prs3d_i* thePrs)
 {
-  
   myPrsList->addItem(getPrsName(thePrs));
   myPresentations.append(thePrs);
   for (int i = 0; i < myPlanes.size(); i++) {
index 42e007a08b3fbccc7d3ac0a0412faa5f81670ea0..ab3a2aec899e74d574c9bce50b86cf8e975e457c 100644 (file)
@@ -851,7 +851,11 @@ VISU_Actor*
 VISU::GaussPoints_i
 ::CreateActor() 
 {
-  return OnCreateActor1();
+  VISU_GaussPtsAct* anActor = VISU_GaussPtsAct::New();
+  if(OnCreateActor(anActor))
+    return anActor;
+  return NULL;
+  //  return OnCreateActor1();
 }
 
 //----------------------------------------------------------------------------