From: vsv Date: Fri, 12 Sep 2008 10:55:26 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: TG_VISU_2008_2008-09-12~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=674e8b020f19e59bcced4e9eeae9083792aabcd6;p=modules%2Fvisu.git *** empty log message *** --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 4dad7b29..da9e7e06 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -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 = "<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()); +// } } //---------------------------------------------------------------------------- diff --git a/src/PIPELINE/VISU_DataSetMapperHolder.cxx b/src/PIPELINE/VISU_DataSetMapperHolder.cxx index 0bc9e0de..06337bd0 100644 --- a/src/PIPELINE/VISU_DataSetMapperHolder.cxx +++ b/src/PIPELINE/VISU_DataSetMapperHolder.cxx @@ -92,6 +92,7 @@ VISU_DataSetMapperHolder VISU::CopyDataSetMapper(GetDataSetMapper(), aMapperHolder->GetDataSetMapper(), theIsCopyInput); + myExtractGeometry->SetImplicitFunction(aMapperHolder->GetImplicitFunction()); } } diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 0f5ba427..36ae4c74 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -245,7 +245,7 @@ VISU_GaussPointsPL { Superclass::Init(); - SetExtractInside(false); + //SetExtractInside(false); vtkDataSet* aDataSet = GetParentMesh(); vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet ); diff --git a/src/PIPELINE/VISU_PointSpriteMapperHolder.cxx b/src/PIPELINE/VISU_PointSpriteMapperHolder.cxx index 69c9be26..6497e489 100644 --- a/src/PIPELINE/VISU_PointSpriteMapperHolder.cxx +++ b/src/PIPELINE/VISU_PointSpriteMapperHolder.cxx @@ -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()); } } diff --git a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx index 55abef80..43ece171 100644 --- a/src/PIPELINE/VISU_PolyDataMapperHolder.cxx +++ b/src/PIPELINE/VISU_PolyDataMapperHolder.cxx @@ -40,6 +40,7 @@ #include #include #include +//#include #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()); } } diff --git a/src/PIPELINE/VISU_PolyDataMapperHolder.hxx b/src/PIPELINE/VISU_PolyDataMapperHolder.hxx index 10ff1a4a..ece41f4d 100644 --- a/src/PIPELINE/VISU_PolyDataMapperHolder.hxx +++ b/src/PIPELINE/VISU_PolyDataMapperHolder.hxx @@ -161,6 +161,8 @@ private: //---------------------------------------------------------------------------- VISU::PPolyDataIDMapper myPolyDataIDMapper; vtkSmartPointer myPolyDataMapper; + +protected: vtkSmartPointer myExtractPolyDataGeometry; //!< Clipping }; diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.cxx b/src/VISUGUI/VisuGUI_ClippingPanel.cxx index 0714ff8a..60bcbaf5 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPanel.cxx @@ -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(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++) { diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 42e007a0..ab3a2aec 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -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(); } //----------------------------------------------------------------------------