From f637b957f4343f936926d9d1bb4397671237944b Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 12 Feb 2008 16:15:54 +0000 Subject: [PATCH] Merge from branch BR_Dev_For_4_0 (from tag mergeto_BR_QT4_Dev_12Feb08) --- configure.ac | 2 +- doc/salome/gui/VISU/images/deformedshape.png | Bin 12668 -> 15815 bytes src/CONVERTOR/VISU_Convertor_impl.cxx | 3 +- src/CONVERTOR/VISU_IDMapper.hxx | 7 +- src/CONVERTOR/VISU_MedConvertor.cxx | 68 ++++- src/CONVERTOR/VISU_MedConvertor.hxx | 10 + src/CONVERTOR/VISU_Structures.hxx | 12 +- src/CONVERTOR/VISU_Structures_impl.cxx | 294 ++++++++++++++++++- src/CONVERTOR/VISU_Structures_impl.hxx | 33 ++- src/OBJECT/VISU_Actor.cxx | 1 + src/OBJECT/VISU_GaussPtsAct.cxx | 148 +++++++--- src/OBJECT/VISU_GaussPtsAct.h | 2 +- src/VISUGUI/VISU_msg_en.ts | 18 +- src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx | 68 +++-- src/VISUGUI/VisuGUI_DeformedShapeDlg.h | 3 + src/VISU_I/VISU_Prs3d_i.cc | 25 +- src/VVTK/VVTK_PickingDlg.cxx | 278 +++++++++++++++++- src/VVTK/VVTK_PickingDlg.h | 20 ++ 18 files changed, 878 insertions(+), 114 deletions(-) diff --git a/configure.ac b/configure.ac index 4e752299..b5113abc 100644 --- a/configure.ac +++ b/configure.ac @@ -308,7 +308,7 @@ echo --------------------------------------------- echo echo Configure -variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok Med_ok" +variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok Med_ok SalomeGUI_ok" for var in $variables do diff --git a/doc/salome/gui/VISU/images/deformedshape.png b/doc/salome/gui/VISU/images/deformedshape.png index 9b36a8d62a6b3bb5ddaded9345a61608674785f8..aea062713810177aa42c006703c59dd0357a5ed6 100644 GIT binary patch literal 15815 zcmeIZXIN8fyDl0;L{Y>7A{_*j7O;SHP!S=Zfb`B(M0%0l0ybod0vehiRXRwAgqqAL zN((h~0tvl`NDUAI`^`LOt!u4o?Q{0G|9|`-B#ewP-sgSFec#VB-W%v?v9fTpKp+rS znD%``2!!Di1aj=t$rIp{3Nxw45QrcIcK@!i(<{akGD6`y&T;OH zi{Q&z!E@|Pp*EHuoD9NiTsW5B<(hmbVYz2w-SJKEiABb@p(n*Y2%fy*_T=)gR=$DWXc zL`Rt0ScCV8$hNfP$7;7E9gyzW%I}+H=D!xaDvD0FqOWvLJvHHog$J$0m9erBpDf(} ziD+D}ok}lU9+0ZEzIp;u!0XSek`qe|yyrSxTJyc2KrG~keHnIWG-Y=G6vO~&ZJPI* z&)M4|+1t{>+nhhhEq~nqQ|0P8huY>@Mat91iZLX24LzafYDda-2qPoEtD>8$EQtZ9 z9PdFg2Ncs1$34i5-|!%i)ZLWi|fRBdd?!x_K);Az2iK zhekGMO-}w1@%F9QNJ5sNR-($|wJsxk%^StaLNe&h|dRZt>M`we3j>o`j2ybm@S5#iVTWf1lVK5c;Wj7qg&|^BIUqq_3ief zo&v|s`J%ys3~SahL(AZ(7}3yz8TIfI`;ZHBUJAalVIN$EKK2R~HyIkp(_|fC9P-;K`WjvNC?tn$;z;ozyP9@|se5N0hvz_t0uV;vZ*@6{V- z;|71yz1GB8*EeY^r{3uz3~`NYzZ0cK6QS6h@Dm$wOFLpu%=g5x#u-j{lV5thKjC{G z)SXW`%<{;F(iArSRit>2=6zpwFf2*qu7!|}x~-Xqa)Vgw?F=N;rP#lD$GeVqA8(go znt?nE-zm{J>uB(5CBW5AKibkdZ?bo}-mRA$jdXrWAeIjQrmAl=tfhZ#Sc-XH=F-)A z3+$Ub{Q6M_cipOyoD-p{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Ts5*`qZ(H^*9(k)&F_W0%=KT9HRuU`*)2*n4WP~j6tqKrWRr_g~%FB2E3&n{`xc~qF diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index d0fb2975..024ccf7c 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -398,7 +398,8 @@ namespace vtkIdType aNbCells = aSource->GetNumberOfCells(); for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){ - anElemObj2VTKID[aSubProfile->GetElemObjID(aCell)] = aCellID; + vtkIdType anObjID = aSubProfile->GetElemObjID(aCell); + anElemObj2VTKID[anObjID] = aCellID; } aSubProfileArr[anInputID++] = aSubProfile; diff --git a/src/CONVERTOR/VISU_IDMapper.hxx b/src/CONVERTOR/VISU_IDMapper.hxx index 635d2f56..767def57 100644 --- a/src/CONVERTOR/VISU_IDMapper.hxx +++ b/src/CONVERTOR/VISU_IDMapper.hxx @@ -229,10 +229,15 @@ namespace VISU TGaussPointID GetObjID(vtkIdType theID) const = 0; + //! Gets VTK ID by its complex Gauss Point ID + virtual + vtkIdType + GetVTKID(const TGaussPointID& theID) const = 0; + //! Gets parent TNamedIDMapper, which contains reference mesh cells virtual TNamedIDMapper* - GetParent() = 0; + GetParent() const = 0; }; typedef MED::SharedPtr PGaussPtsIDMapper; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 882a8213..2ea4ef21 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -1197,14 +1197,33 @@ namespace VISU TMEDSubProfile ::GetElemObjID(vtkIdType theID) const { - if(mySubMeshID.empty()) - if(myIsElemNum) - return (*myElemNum)[theID]; - else - return theID; - return mySubMeshID[theID]; + if ( !mySubMeshID.empty() ) + theID = mySubMeshID[theID]; + + if ( myIsElemNum ) + return (*myElemNum)[theID]; + else + return theID; } + + //--------------------------------------------------------------- + vtkIdType + TMEDSubProfile + ::GetElemVTKID(vtkIdType theID) const + { + if ( myIsElemNum ) + for ( size_t anId = 0; anId < (*myElemNum).size(); anId++ ) + if ( (*myElemNum)[ anId ] == theID ) { + theID = anId; + break; + } + + return TSubProfileImpl::GetElemVTKID( theID ); + } + + + //---------------------------------------------------------------- unsigned long int TMEDSubProfile ::GetMemorySize() @@ -1238,17 +1257,44 @@ namespace VISU TMEDGaussSubMesh ::GetObjID(vtkIdType theID) const { - TCellID aCellID = theID / myGauss->myNbPoints; - TLocalPntID aLocalPntID = theID % myGauss->myNbPoints; - - if(myIsElemNum) - aCellID = (*myElemNum)[aCellID]; + vtkIdType aNbPoints = myGauss->myNbPoints; + TCellID aCellID = theID / aNbPoints; + TLocalPntID aLocalPntID = theID % aNbPoints; + + if ( myIsElemNum ) + aCellID = GetElemObjID(aCellID); else aCellID += myStartID; return TGaussPointID(aCellID, aLocalPntID); } + + //--------------------------------------------------------------- + vtkIdType + TMEDGaussSubMesh + ::GetVTKID(const TGaussPointID& theID, + vtkIdType theStartID) const + { + vtkIdType aResult = -1; + + TCellID aCellID = theID.first; + TLocalPntID aLocalPntID = theID.second; + + vtkIdType aNbPoints = myGauss->myNbPoints; + if ( aLocalPntID >= aNbPoints ) + return aResult; + + if ( myIsElemNum ) { + aCellID = GetElemVTKID( aCellID ); + } else + aCellID -= theStartID; + + return aCellID * aNbPoints + aLocalPntID + theStartID; + } + + + //--------------------------------------------------------------- unsigned long int TMEDGaussSubMesh ::GetMemorySize() diff --git a/src/CONVERTOR/VISU_MedConvertor.hxx b/src/CONVERTOR/VISU_MedConvertor.hxx index 7b2c6b80..4529ecb3 100644 --- a/src/CONVERTOR/VISU_MedConvertor.hxx +++ b/src/CONVERTOR/VISU_MedConvertor.hxx @@ -196,6 +196,11 @@ namespace VISU vtkIdType GetElemObjID(vtkIdType theID) const; + //! Reimplement the TSubProfileImpl::GetElemVTKID + virtual + vtkIdType + GetElemVTKID(vtkIdType theID) const; + //! Gets memory size used by the instance (bytes). virtual unsigned long int @@ -238,6 +243,11 @@ namespace VISU TGaussPointID GetObjID(vtkIdType theID) const; + virtual + vtkIdType + GetVTKID(const TGaussPointID& theID, + vtkIdType theStartID) const; + //! Gets memory size used by the instance (bytes). virtual unsigned long int diff --git a/src/CONVERTOR/VISU_Structures.hxx b/src/CONVERTOR/VISU_Structures.hxx index 7c2257ff..06d2fadc 100644 --- a/src/CONVERTOR/VISU_Structures.hxx +++ b/src/CONVERTOR/VISU_Structures.hxx @@ -104,7 +104,17 @@ namespace VISU //--------------------------------------------------------------- //! Define a basic class which corresponds to MED PROFILE entity struct VISU_CONVERTOR_EXPORT TSubProfile: virtual TBaseStructure - {}; + { + //! Get object number of mesh cell by its VTK one + virtual + vtkIdType + GetElemObjID(vtkIdType theID) const = 0; + + //! Get cell VTK ID for corresponding object ID + virtual + vtkIdType + GetElemVTKID(vtkIdType theID) const = 0; + }; //--------------------------------------------------------------- diff --git a/src/CONVERTOR/VISU_Structures_impl.cxx b/src/CONVERTOR/VISU_Structures_impl.cxx index 8a922fc0..a00e8e90 100644 --- a/src/CONVERTOR/VISU_Structures_impl.cxx +++ b/src/CONVERTOR/VISU_Structures_impl.cxx @@ -38,9 +38,208 @@ #include #include #include +#include namespace VISU { + /* vtkIdType + VISUGeom2NbNodes(EGeometry theGeom) + { + switch(theGeom){ +#ifndef VISU_ENABLE_QUADRATIC + case VISU::eSEG3: + return 2; + case VISU::eTRIA6: + return 3; + case VISU::eQUAD8: + return 4; + case VISU::eTETRA10: + return 4; + case VISU::eHEXA20: + return 8; + case VISU::ePENTA15: + return 6; + case VISU::ePYRA13: + return 5; +#endif + case VISU::ePOLYGONE: + case VISU::ePOLYEDRE: + return -1; + default: + return theGeom % 100; + } + } + + vtkIdType + VISUGeom2VTK(EGeometry theGeom) + { + switch(theGeom){ + case VISU::ePOINT1: + return VTK_VERTEX; + case VISU::eSEG2: + return VTK_LINE; + case VISU::eTRIA3: + return VTK_TRIANGLE; + case VISU::eQUAD4: + return VTK_QUAD; + case VISU::eTETRA4: + return VTK_TETRA; + case VISU::eHEXA8: + return VTK_HEXAHEDRON; + case VISU::ePENTA6: + return VTK_WEDGE; + case VISU::ePYRA5: + return VTK_PYRAMID; + + case VISU::ePOLYGONE: + return VTK_POLYGON; + case VISU::ePOLYEDRE: + return VTK_CONVEX_POINT_SET; + +#ifndef VISU_ENABLE_QUADRATIC + case VISU::eSEG3: + return VTK_LINE; + case VISU::eTRIA6: + return VTK_TRIANGLE; + case VISU::eQUAD8: + return VTK_QUAD; + case VISU::eTETRA10: + return VTK_TETRA; + case VISU::eHEXA20: + return VTK_HEXAHEDRON; + case VISU::ePENTA15: + return VTK_WEDGE; + case VISU::ePYRA13: + return VTK_PYRAMID; + +#else + + case VISU::eSEG3: +#if defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_EDGE; +#else + return VTK_POLY_LINE; +#endif + + case VISU::eTRIA6: +#if defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_TRIANGLE; +#else + return VTK_POLYGON; +#endif + + case VISU::eQUAD8: +#if defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_QUAD; +#else + return VTK_POLYGON; +#endif + + case VISU::eTETRA10: +#if defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_TETRA; +#else + return VTK_CONVEX_POINT_SET; +#endif + + case VISU::eHEXA20: +#if defined(VTK_QUADRATIC_HEXAHEDRON) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_HEXAHEDRON; +#else + return VTK_CONVEX_POINT_SET; +#endif + + case VISU::ePENTA15: +#if defined(VTK_QUADRATIC_WEDGE) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_WEDGE; +#else + return VTK_CONVEX_POINT_SET; +#endif + + case VISU::ePYRA13: +#if defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC) + return VTK_QUADRATIC_PYRAMID; +#else + return VTK_CONVEX_POINT_SET; +#endif + +#endif //VISU_ENABLE_QUADRATIC + + default: + return -1; + } + }*/ + + + EGeometry + VTKGeom2VISU(vtkIdType theGeom) + { + switch(theGeom){ + case VTK_VERTEX: + return VISU::ePOINT1; + case VTK_LINE: + return VISU::eSEG2; + case VTK_TRIANGLE: + return VISU::eTRIA3; + case VTK_QUAD: + return VISU::eQUAD4; + case VTK_TETRA: + return VISU::eTETRA4; + case VTK_HEXAHEDRON: + return VISU::eHEXA8; + case VTK_WEDGE: + return VISU::ePENTA6; + case VTK_PYRAMID: + return VISU::ePYRA5; + + case VTK_POLYGON: + return VISU::ePOLYGONE; + case VTK_CONVEX_POINT_SET: + return VISU::ePOLYEDRE; + +#if defined(VISU_ENABLE_QUADRATIC) && defined(VISU_USE_VTK_QUADRATIC) + #if defined(VTK_QUADRATIC_EDGE) + case VTK_QUADRATIC_EDGE: + return VISU::eSEG3; + #endif + + #if defined(VTK_QUADRATIC_TRIANGLE) + case VTK_QUADRATIC_TRIANGLE: + return VISU::eTRIA6; + #endif + + #if defined(VTK_QUADRATIC_QUAD) + case VTK_QUADRATIC_QUAD: + return VISU::eQUAD8; + #endif + + #if defined(VTK_QUADRATIC_TETRA) + case VTK_QUADRATIC_TETRA: + return VISU::eTETRA10; + #endif + + #if defined(VTK_QUADRATIC_HEXAHEDRON) + case VTK_QUADRATIC_HEXAHEDRON: + return VISU::eHEXA20; + #endif + + #if defined(VTK_QUADRATIC_WEDGE) + case VTK_QUADRATIC_WEDGE: + return VISU::ePENTA15; + #endif + + #if defined(VTK_QUADRATIC_PYRAMID) + case VTK_QUADRATIC_PYRAMID: + return VISU::ePYRA13; + #endif + +#endif //VISU_ENABLE_QUADRATIC + + default: + return EGeometry(-1); + } + } + //--------------------------------------------------------------- /*! Computes number of points by the given number of cells * in assumption of regular hexahedral mesh structure @@ -289,6 +488,22 @@ namespace VISU TSubProfileImpl ::GetElemObjID(vtkIdType theID) const { + if ( !mySubMeshID.empty() ) + return mySubMeshID[theID]; + + return theID; + } + + + vtkIdType + TSubProfileImpl + ::GetElemVTKID(vtkIdType theID) const + { + if ( !mySubMeshID.empty() ) + for ( size_t anId = 0; anId < mySubMeshID.size(); anId++ ) + if ( mySubMeshID[ anId ] == theID ) + return anId; + return theID; } @@ -651,6 +866,37 @@ namespace VISU return TGaussPointID(aCellID, aLocalPntID); } + vtkIdType + TGaussSubMeshImpl + ::GetVTKID(const TGaussPointID& theID) const + { + vtkIdType aResult = -1; + + TCellID aCellID = theID.first; + TLocalPntID aLocalPntID = theID.second; + + vtkIdType aNbPoints = myGauss->myNbPoints; + if ( aLocalPntID >= aNbPoints ) + return aResult; + + return ( aCellID - myStartID ) * aNbPoints + aLocalPntID; + } + + vtkIdType + VISU::TGaussSubMeshImpl + ::GetElemObjID(vtkIdType theID) const + { + return mySubProfile->GetElemObjID( theID ); + } + + + vtkIdType + VISU::TGaussSubMeshImpl + ::GetElemVTKID(vtkIdType theID) const + { + return mySubProfile->GetElemVTKID( theID ); + } + vtkIdType TGaussSubMeshImpl ::GetGlobalID(vtkIdType theID) const @@ -702,6 +948,43 @@ namespace VISU return VISU::GetObjID(aFilter->GetOutput(), theID); } + vtkIdType + TGaussMeshImpl + ::GetVTKID(const TGaussPointID& theID) const + { + vtkIdType aResult = -1; + + TCellID aCellID = theID.first; + + vtkIdType aVTKCellId = GetParent()->GetElemVTKID( aCellID ); + if ( aVTKCellId < 0 ) + return aResult; + + vtkCell* aCell = GetParent()->GetElemCell( aCellID ); + if ( !aCell ) + return aResult; + + EGeometry aVGeom = VISU::VTKGeom2VISU( aCell->GetCellType() ); + if ( aVGeom < EGeometry(0) ) + return aResult; + + TGeom2GaussSubMesh::const_iterator anIter = myGeom2GaussSubMesh.find( aVGeom ); + if ( anIter == myGeom2GaussSubMesh.end() ) + return aResult; + + size_t aSubMeshEnd = myGaussSubMeshArr.size(); + const PAppendFilter& anAppendFilter = GetFilter(); + const PGaussSubMeshImpl& aGaussSubMesh = anIter->second; + for ( size_t aSubMeshId = 0; aSubMeshId < aSubMeshEnd; aSubMeshId++ ) { + const PGaussSubMeshImpl& aSubMesh = myGaussSubMeshArr[aSubMeshId]; + if ( aGaussSubMesh.get() == aSubMesh.get() ) { + return aGaussSubMesh->GetVTKID(theID); + } + } + + return aResult; + } + vtkPolyData* TGaussMeshImpl ::GetPolyDataOutput() @@ -726,7 +1009,7 @@ namespace VISU TNamedIDMapper* TGaussMeshImpl - ::GetParent() + ::GetParent() const { return myParent; } @@ -739,10 +1022,17 @@ namespace VISU { return myGaussPtsIDMapper->GetObjID(theID); } + + vtkIdType + TGaussPtsIDFilter + ::GetVTKID(const TGaussPointID& theID) const + { + return myGaussPtsIDMapper->GetVTKID(theID); + } TNamedIDMapper* TGaussPtsIDFilter - ::GetParent() + ::GetParent() const { return myGaussPtsIDMapper->GetParent(); } diff --git a/src/CONVERTOR/VISU_Structures_impl.hxx b/src/CONVERTOR/VISU_Structures_impl.hxx index 08461db1..fe6a7cc5 100644 --- a/src/CONVERTOR/VISU_Structures_impl.hxx +++ b/src/CONVERTOR/VISU_Structures_impl.hxx @@ -252,6 +252,11 @@ namespace VISU vtkIdType GetElemObjID(int theVtkI) const; + //! Get cell VTK ID for corresponding object ID + virtual + vtkIdType + GetElemVTKID(vtkIdType theID) const; + //! Gets memory size used by the instance (bytes). virtual unsigned long int @@ -487,6 +492,19 @@ namespace VISU virtual TGaussPointID GetObjID(vtkIdType theID) const; + + //! To implement the TGaussPtsIDMapper::GetVTKID + virtual + vtkIdType + GetVTKID(const TGaussPointID& theID) const; + + virtual + vtkIdType + GetElemObjID(vtkIdType theID) const; + + virtual + vtkIdType + GetElemVTKID(vtkIdType theID) const; virtual vtkIdType @@ -526,6 +544,11 @@ namespace VISU TGaussPointID GetObjID(vtkIdType theID) const; + //! Reimplements the TGaussPtsIDMapper::GetVTKID + virtual + vtkIdType + GetVTKID(const TGaussPointID& theID) const; + //! Reimplement the TGaussPtsIDMapper::GetPolyDataOutput virtual vtkPolyData* @@ -539,7 +562,7 @@ namespace VISU //! Reimplement the TGaussPtsIDMapper::GetParent virtual TNamedIDMapper* - GetParent(); + GetParent() const; TNamedIDMapper* myParent; //!< Refer to parent mesh TGaussSubMeshArr myGaussSubMeshArr; //!< Keeps sequence of TGaussSubMesh as they were added into TAppendFilterHolder @@ -559,10 +582,16 @@ namespace VISU TGaussPointID GetObjID(vtkIdType theID) const; + //! Reimplements the TGaussPtsIDMapper::GetVTKID + virtual + vtkIdType + GetVTKID(const TGaussPointID& theID) const; + + //! Reimplements the TGaussPtsIDMapper::GetParent //! Reimplement the TGaussPtsIDMapper::GetParent virtual TNamedIDMapper* - GetParent(); + GetParent() const; //! Reimplement the TNamedIDMapper::GetUnstructuredGridOutput virtual diff --git a/src/OBJECT/VISU_Actor.cxx b/src/OBJECT/VISU_Actor.cxx index de0ddc51..8d448e7f 100644 --- a/src/OBJECT/VISU_Actor.cxx +++ b/src/OBJECT/VISU_Actor.cxx @@ -131,6 +131,7 @@ VISU_Actor ::ShallowCopyPL(VISU_PipeLine* thePipeLine) { myPipeLine->ShallowCopy(thePipeLine, true); + GetMapper()->Update(); } //---------------------------------------------------------------------------- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index c9d5880d..045da66f 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -85,6 +85,31 @@ static int MYDEBUG2 = 0; #endif +namespace +{ + bool + CheckIsSameValue(vtkFloatingPointType theTarget, + vtkFloatingPointType theSource) + { + static vtkFloatingPointType TOL = 10.0 / VTK_LARGE_FLOAT; + return fabs(theTarget - theSource) < TOL; + } + + bool + CheckIsSameVector(vtkFloatingPointType* theTarget, + vtkFloatingPointType* theSource, + size_t theLength) + { + for ( size_t anId = 0; anId < theLength; anId++ ) { + if ( !CheckIsSameValue( theTarget[ anId ], theSource[ anId ] ) ) + return false; + } + + return true; + } + +} + //============================================================================ vtkStandardNewMacro(VISU_GaussPtsAct); @@ -96,7 +121,7 @@ VISU_GaussPtsAct myDeviceActor(VISU_GaussPtsDeviceActor::New()), myWidgetCtrl(NULL), myGaussPointsPL(NULL), - myLastObjPointID(-1), + myLastPreHighlightObjID(-1), myTextActor(VISU_FramedTextActor::New()), myCursorPyramid(VISU_CursorPyramid::New()), myCursorPyramidSelected(VISU_CursorPyramid::New()), @@ -678,7 +703,7 @@ VISU_GaussPtsAct if(!theIsHighlight) - myLastObjPointID = -1; + myLastPreHighlightObjID = -1; Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode; @@ -706,7 +731,7 @@ VISU_GaussPtsAct vtkIdType anObjId = GetNodeObjId( aVtkId ); myIsPreselected = (anObjId >= 0); if(myIsPreselected){ - anIsChanged = (myLastObjPointID != anObjId); + anIsChanged = (myLastPreHighlightObjID != anObjId); if(anIsChanged){ vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); vtkDataSet* aDataSet = GetInput(); @@ -729,7 +754,7 @@ VISU_GaussPtsAct aNodeCoord, aColor); } - myLastObjPointID = anObjId; + myLastPreHighlightObjID = anObjId; } myCursorPyramid->SetVisibility(true); } @@ -747,21 +772,20 @@ VISU_GaussPtsAct inline void ChangeZoom(VISU_PickingSettings *thePickingSettings, - vtkInteractorStyle* theInteractorStyle, - int theInitialHasIndex, - int theCurrentHasIndex, - const Handle(SALOME_InteractiveObject)& theIO) + vtkRenderer* theRenderer, + vtkIdType theInitialHasIndex, + vtkIdType theCurrentHasIndex) { if(theInitialHasIndex + theCurrentHasIndex == 1){ - vtkRenderer *aRenderer = theInteractorStyle->GetCurrentRenderer(); - vtkCamera *aCamera = aRenderer->GetActiveCamera(); + vtkCamera *aCamera = theRenderer->GetActiveCamera(); + vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor(); double aScale = aCamera->GetParallelScale(); - if (!theInitialHasIndex && theCurrentHasIndex) { - aCamera->SetParallelScale(aScale/aZoomFactor); + if ( !theInitialHasIndex && theCurrentHasIndex ) { + aCamera->SetParallelScale( aScale/aZoomFactor ); } else { - aCamera->SetParallelScale(aScale*aZoomFactor); + aCamera->SetParallelScale( aScale*aZoomFactor ); } } @@ -776,20 +800,20 @@ VISU_GaussPtsAct if ( !GetPickable() ) return false; - int anInitialHasIndex = myIsHighlighted && mySelectionMode == GaussPointSelection; + // int anInitialHasIndex = myIsHighlighted && mySelectionMode == GaussPointSelection; Handle(SALOME_InteractiveObject) anIO = getIO(); - myIsHighlighted = false; + // myIsHighlighted = false; Selection_Mode aSelectionMode = theSelectionEvent->mySelectionMode; if(!theIsHighlight && aSelectionMode == GaussPointSelection){ mySelector->RemoveIObject(anIO); - ChangeZoom(myPickingSettings, + /* ChangeZoom(myPickingSettings, theInteractorStyle, anInitialHasIndex, false, - anIO); + anIO);*/ return true; } @@ -814,11 +838,11 @@ VISU_GaussPtsAct if(myPointPicker->GetActor() != this) { mySelector->ClearIObjects(); - ChangeZoom(myPickingSettings, + /* ChangeZoom(myPickingSettings, theInteractorStyle, anInitialHasIndex, false, - anIO); + anIO);*/ return true; } @@ -827,7 +851,7 @@ VISU_GaussPtsAct if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId, true ) && hasIO()) { vtkIdType anObjId = GetNodeObjId( aVtkId ); if(anObjId >= 0){ - myIsHighlighted = true; + // myIsHighlighted = true; // Update the Selector if(mySelector->IsSelected(myIO)) mySelector->AddOrRemoveIndex(myIO,anObjId,theSelectionEvent->myIsShift); @@ -838,7 +862,7 @@ VISU_GaussPtsAct mySelector->AddOrRemoveIndex(myIO,anObjId,theSelectionEvent->myIsShift); mySelector->AddIObject(this); } - // + /* vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); // // FlyTo @@ -853,27 +877,26 @@ VISU_GaussPtsAct anInteractor->SetDolly(aDollyWas); anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas); - anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord); + anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord);*/ mySelectionMode = aSelectionMode; - ChangeZoom(myPickingSettings, + /* ChangeZoom(myPickingSettings, theInteractorStyle, anInitialHasIndex, true, - anIO); + anIO);*/ return true; - // }// if( anObjId >= 0 ) { }//if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId, true ) && hasIO()) }//if(!theSelectionEvent->myIsRectangle){ - ChangeZoom(myPickingSettings, + /* ChangeZoom(myPickingSettings, theInteractorStyle, anInitialHasIndex, false, - anIO); + anIO);*/ return false; } @@ -889,34 +912,79 @@ VISU_GaussPtsAct if(!mySelector.GetPointer()) return; + Selection_Mode aSelectionMode = mySelector->SelectionMode(); + + bool anInitialHasIndex = isHighlighted() && mySelectionMode == GaussPointSelection; + + TColStd_IndexedMapOfInteger aMapIndex; + mySelector->GetIndex( getIO(), aMapIndex ); + bool aCurrentHasIndex = aMapIndex.Extent() == 1; + bool anIsVisible = GetVisibility() && aCurrentHasIndex && theIsHighlight; + myOutlineActor->SetVisibility(false); - myTextActor->SetVisibility(false); - myCursorPyramidSelected->SetVisibility(false); myCursorPyramid->SetVisibility(false); - myCellActor->SetVisibility(false); - GetScalarBarCtrl()->SetIsMarked(false); - GetScalarBarCtrl()->Update(); + + myTextActor->SetVisibility(anIsVisible); + myCellActor->SetVisibility(anIsVisible); + GetScalarBarCtrl()->SetIsMarked(anIsVisible); + myCursorPyramidSelected->SetVisibility(anIsVisible); + //GetScalarBarCtrl()->Update(); + + myIsHighlighted = aCurrentHasIndex; + + // Zoom if necessary + ChangeZoom(myPickingSettings, + GetRenderer(), + anInitialHasIndex, + aCurrentHasIndex); if(!theIsHighlight) return; - bool anIsVisible = GetVisibility(); + if( aSelectionMode == ActorSelection ) { + Superclass::highlight(theIsHighlight); + return; + } - Selection_Mode aSelectionMode = mySelector->SelectionMode(); + if( aSelectionMode != GaussPointSelection ) + return; - if(aSelectionMode == ActorSelection) - Superclass::highlight(theIsHighlight); - else if(aSelectionMode != GaussPointSelection) + if ( !aCurrentHasIndex || !myBarVisibility ) return; - TColStd_IndexedMapOfInteger aMapIndex; + // TColStd_IndexedMapOfInteger aMapIndex; mySelector->GetIndex( getIO(), aMapIndex ); if(aMapIndex.Extent() != 1 || !myBarVisibility) { return; } + + vtkRenderer *aRenderer = GetRenderer(); + vtkCamera* aCamera = aRenderer->GetActiveCamera(); + + int anObjId = aMapIndex(1); + vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId); + + vtkFloatingPointType aFocalPnt[3]; + aCamera->GetFocalPoint(aFocalPnt); + + if ( CheckIsSameVector( aNodeCoord, aFocalPnt, 3 ) ) + return; + + // FlyTo + vtkRenderWindowInteractor* anInteractor = myInteractor; + vtkFloatingPointType aDollyWas = anInteractor->GetDolly(); + int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames(); + + anInteractor->SetDolly(0.0); + anInteractor->SetNumberOfFlyFrames(myPickingSettings->GetStepNumber()); + anInteractor->FlyTo(aRenderer, aNodeCoord); + aRenderer->ResetCameraClippingRange(); + anInteractor->SetDolly(aDollyWas); + anInteractor->SetNumberOfFlyFrames(aNumberOfFlyFramesWas); + anInteractor->InvokeEvent(SVTK::ChangeRotationPoint, aNodeCoord); // std::ostringstream aStr; - int anObjId = aMapIndex(1); + // int anObjId = aMapIndex(1); aStr<<"Global ID: "<GetScalars()){ vtkFloatingPointType aVal = aScalarArray->GetTuple1(aVtkId); // - GetScalarBarCtrl()->SetIsMarked(true); + // GetScalarBarCtrl()->SetIsMarked(true); GetScalarBarCtrl()->SetMarkValue(aVal); GetScalarBarCtrl()->Update(); // diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 7396f591..5cf5086f 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -316,7 +316,7 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor vtkSmartPointer myMapper; - vtkIdType myLastObjPointID; + vtkIdType myLastPreHighlightObjID; vtkSmartPointer myTextActor; diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index b7b69fc6..4b926fc8 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -547,6 +547,18 @@ ZOOM_FACTOR Zoom at first selected point (ratio) : + + DATA_POSITION + Position + + + PARENT_ELEMENT + Parent mesh element ID: + + + LOCAL_POINT + Local Gauss Point ID: + VVTK_PrimitiveBox @@ -930,7 +942,7 @@ MEN_DISPLAY_ONLY - Display Only + Show Only MEN_DISPLAY_SELECTION @@ -954,7 +966,7 @@ MEN_ERASE_ALL - Erase All + Hide All MEN_EXPORT_TABLE @@ -3171,7 +3183,7 @@ LBL_SHOW_UNITS - Display units + Show units LBL_UNITS_FORMAT diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index 27494747..e9b26850 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -64,6 +64,7 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule) setWindowTitle(tr("DLG_TITLE")); setSizeGripEnabled(TRUE); myModule = theModule; + isApplyed = false; QVBoxLayout* TopLayout = new QVBoxLayout (this); TopLayout->setSpacing(6); @@ -184,6 +185,30 @@ int VisuGUI_DeformedShapeDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) return anIsOk; } +void VisuGUI_DeformedShapeDlg::updatePrsCopy() +{ + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(); + VisuGUI* aVisuGUI = dynamic_cast (myModule); + if ( myPrsCopy->GetNumberOfActors() == 0 ) { + PublishInView(aVisuGUI, myPrsCopy, aViewWindow); + aViewWindow->onFitAll(); + int aPos = VISU::GetFreePositionOfDefaultScalarBar(aVisuGUI, aViewWindow); + VISU::AddScalarBarPosition(aVisuGUI, aViewWindow, myPrsCopy, aPos); + } else { + try { + myPrsCopy->UpdateActors(); + } catch (std::runtime_error& exc) { + myPrsCopy->RemoveActors(); + + INFOS(exc.what()); + SUIT_MessageBox::warning(VISU::GetDesktop(myModule), + tr("WRN_VISU"), + tr("ERR_CANT_BUILD_PRESENTATION") + ": " + exc.what()); + } + aViewWindow->Repaint(); + } +} + void VisuGUI_DeformedShapeDlg::accept() { VisuGUI_ScalarBarBaseDlg::done( isValid() ); @@ -191,7 +216,7 @@ void VisuGUI_DeformedShapeDlg::accept() void VisuGUI_DeformedShapeDlg::reject() { - if ( myPrsCopy->GetNumberOfActors() != 0 ) + if ( isApplyed ) VisuGUI_ScalarBarBaseDlg::done( 1 ); else VisuGUI_ScalarBarBaseDlg::reject(); @@ -206,25 +231,8 @@ bool VisuGUI_DeformedShapeDlg::onApply() { if ( storeToPrsObject( myPrsCopy ) ) { - if ( myPrsCopy->GetNumberOfActors() == 0 ) { - SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(); - VisuGUI* aVisuGUI = dynamic_cast (myModule); - PublishInView(aVisuGUI, myPrsCopy, aViewWindow); - aViewWindow->onFitAll(); - int aPos = VISU::GetFreePositionOfDefaultScalarBar(aVisuGUI, aViewWindow); - VISU::AddScalarBarPosition(aVisuGUI, aViewWindow, myPrsCopy, aPos); - } else { - try { - myPrsCopy->UpdateActors(); - } catch (std::runtime_error& exc) { - myPrsCopy->RemoveActors(); - - INFOS(exc.what()); - SUIT_MessageBox::warning - (VISU::GetDesktop(myModule), QObject::tr("WRN_VISU"), - QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what())); - } - } + updatePrsCopy(); + isApplyed = true; return true; } return false; @@ -265,6 +273,7 @@ void VisuGUI_DeformedShapeDlg::CreatePrs3d(VisuGUI* theModule) VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule); aDlg->initFromPrsObject(aPrs3d, true); + aDlg->UseMagn->setChecked(true); VisuGUI_DialogRunner r(aDlg); int dlgResult = r.run( false ); @@ -294,6 +303,14 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP if (TPrs3d_i* aPrs3d = dynamic_cast(thePrs3d)) { VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule); aDlg->initFromPrsObject(aPrs3d, true); + aDlg->updatePrsCopy(); + + //Hide thePrs3d from Viewer + SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow(theModule); + if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d)) + if (anActor->GetVisibility()) + anActor->VisibilityOff(); + VisuGUI_DialogRunner r(aDlg); int dlgResult = r.run( false ); @@ -301,17 +318,22 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP aDlg->storeToPrsObject( aPrs3d ); try { - aPrs3d->UpdateActors(); + thePrs3d->UpdateActors(); } catch (std::runtime_error& exc) { - aPrs3d->RemoveActors(); + thePrs3d->RemoveActors(); INFOS(exc.what()); SUIT_MessageBox::warning (VISU::GetDesktop(theModule), QObject::tr("WRN_VISU"), QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what())); } - delete aDlg; + + if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d)) + if (!anActor->GetVisibility()) + anActor->VisibilityOn(); + + delete aDlg; } } diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.h b/src/VISUGUI/VisuGUI_DeformedShapeDlg.h index 4fe8d6cc..099fc006 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.h +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.h @@ -74,6 +74,8 @@ public: static void CreatePrs3d(VisuGUI* theModule); static void EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* thePrs3d, Handle(SALOME_InteractiveObject)& theIO); + void updatePrsCopy(); + protected: virtual QString GetContextHelpFilePath(); int isValid(); @@ -89,6 +91,7 @@ private: VisuGUI_InputPane* myInputPane; SalomeApp_Module* myModule; SALOME::GenericObjPtr myPrsCopy; + bool isApplyed; }; #endif // VISUGUI_DEFORMEDSHAPEDLS_H diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 0df4282e..baabd4a1 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -48,8 +48,7 @@ static int MYDEBUG = 0; //---------------------------------------------------------------------------- -VISU::Prs3d_i -::Prs3d_i() : +VISU::Prs3d_i::Prs3d_i() : PrsObject_i(SALOMEDS::Study::_nil()), myActorCollection(vtkActorCollection::New()), myIsActiveSatate(true) @@ -96,8 +95,7 @@ namespace VISU } //---------------------------------------------------------------------------- -VISU::Prs3d_i -::~Prs3d_i() +VISU::Prs3d_i::~Prs3d_i() { if(MYDEBUG) MESSAGE("Prs3d_i::~Prs3d_i - this = "<Destroy(); - } -}; - + virtual + void + Execute() + { + //TInvokeSignalEvent::Execute(); + myRemovable->Destroy(); + } + }; ProcessVoidEvent(new TEvent(myRemoveActorsFromRendererSignal, this)); } diff --git a/src/VVTK/VVTK_PickingDlg.cxx b/src/VVTK/VVTK_PickingDlg.cxx index 6c72bc9a..5e05ceac 100644 --- a/src/VVTK/VVTK_PickingDlg.cxx +++ b/src/VVTK/VVTK_PickingDlg.cxx @@ -25,6 +25,7 @@ #include "VISU_GaussPtsAct.h" #include "VISU_GaussPtsSettings.h" +#include "VISU_GaussPointsPL.hxx" #include "SUIT_MessageBox.h" #include "SUIT_ResourceMgr.h" @@ -32,9 +33,13 @@ #include "CAM_Module.h" +#include "SVTK_Selector.h" #include "SVTK_MainWindow.h" #include "SVTK_RenderWindowInteractor.h" +#include "VTKViewer_Algorithm.h" +#include "SVTK_Functor.h" + #include #include #include @@ -53,6 +58,7 @@ #include #include #include +#include #include "QtxAction.h" #include "QtxDoubleSpinBox.h" @@ -61,7 +67,178 @@ #include "LightApp_Application.h" -using namespace std; +namespace +{ + struct SelectorHelper + { + public: + SelectorHelper( SVTK_RenderWindowInteractor* theInteractor ): + myInteractor( theInteractor ) + {} + + bool + get() + { + bool aResult = false; + myMapIndex.Clear(); + mySelector = NULL; + myPipeLine = NULL; + myActor = NULL; + + if ( !myInteractor ) + return aResult; + + mySelector = myInteractor->GetSelector(); + if ( !mySelector ) + return aResult; + + const SALOME_ListIO& aListIO = mySelector->StoredIObjects(); + if ( aListIO.Extent() != 1 ) + return aResult; + + myIO = aListIO.First(); + if ( mySelector->HasIndex( myIO ) ) + mySelector->GetIndex(myIO, myMapIndex); + + myActor = SVTK::Find(myInteractor->getRenderer()->GetActors(), + SVTK::TIsSameIObject( myIO )); + if ( !myActor ) + return aResult; + + myPipeLine = myActor->GetGaussPointsPL(); + + return true; + } + + SVTK_RenderWindowInteractor* myInteractor; + TColStd_IndexedMapOfInteger myMapIndex; + Handle(SALOME_InteractiveObject) myIO; + SVTK_Selector* mySelector; + + VISU_GaussPointsPL* myPipeLine; + VISU_GaussPtsAct* myActor; + }; + + + + class GaussPtsIDValidator: public QIntValidator + { + public: + GaussPtsIDValidator( SVTK_RenderWindowInteractor* theInteractor, + QObject * theParent ): + QIntValidator( 0, VTK_LARGE_ID, theParent ), + myHelper(theInteractor) + {} + + virtual + State + validate ( QString & theInput, int & thePos ) const + { + if ( QIntValidator::validate( theInput, thePos ) == QValidator::Invalid) + return QValidator::Invalid; + + if ( !myHelper.get() ) + return QValidator::Invalid; + + return QValidator::Acceptable; + } + + protected: + mutable SelectorHelper myHelper; + }; + + + class GaussCellIDValidator: public GaussPtsIDValidator + { + public: + GaussCellIDValidator( QLineEdit* theLocalPointLabel, + SVTK_RenderWindowInteractor* theInteractor, + QObject * theParent ): + GaussPtsIDValidator( theInteractor, theParent ), + myLocalPointLineEdit( theLocalPointLabel ) + {} + + virtual + State + validate ( QString & theInput, int & thePos ) const + { + if ( GaussPtsIDValidator::validate( theInput, thePos ) == QValidator::Invalid) + return QValidator::Invalid; + + VISU::TCellID aCellID = theInput.toInt(); + VISU::TLocalPntID aLocalPntID = myLocalPointLineEdit->text().toInt(); + VISU::PGaussPtsIDMapper anIDMapper = myHelper.myPipeLine->GetGaussPtsIDMapper(); + if ( anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ) < 0 ) + return QValidator::Intermediate; + + return QValidator::Acceptable; + } + + private: + QLineEdit* myLocalPointLineEdit; + }; + + + class GaussLocalPointIDValidator: public GaussPtsIDValidator + { + public: + GaussLocalPointIDValidator( QLineEdit* theParentElementLineEdit, + SVTK_RenderWindowInteractor* theInteractor, + QObject * theParent ): + GaussPtsIDValidator( theInteractor, theParent ), + myParentElementLineEdit( theParentElementLineEdit ) + {} + + virtual + State + validate ( QString & theInput, int & thePos ) const + { + if ( GaussPtsIDValidator::validate( theInput, thePos ) == QValidator::Invalid) + return QValidator::Invalid; + + VISU::TLocalPntID aLocalPntID = theInput.toInt(); + VISU::TCellID aCellID = myParentElementLineEdit->text().toInt(); + VISU::PGaussPtsIDMapper anIDMapper = myHelper.myPipeLine->GetGaussPtsIDMapper(); + if ( anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ) < 0 ) + return QValidator::Intermediate; + + return QValidator::Acceptable; + } + + private: + QLineEdit* myParentElementLineEdit; + }; +} + + +VVTK_ValidatedLineEdit::VVTK_ValidatedLineEdit( QWidget* parent ): + QLineEdit( parent ) +{ + connect( this, SIGNAL( textChanged( const QString& ) ), this, SLOT( MarkValidated( const QString& ) ) ); +} + +void VVTK_ValidatedLineEdit::MarkValidated( const QString& theText ) +{ + if ( !validator() ) + return; + + int aPos; + QString aText( theText ); + QPalette pal = palette(); + switch ( validator()->validate( aText, aPos ) ) { + case QValidator::Invalid: + case QValidator::Intermediate: + pal.setColor( foregroundRole(), QColor( 255, 0, 0 )); + setPalette( pal ); + break; + case QValidator::Acceptable: + pal.setColor( foregroundRole(), QColor( 0, 0, 0 )); + setPalette( pal ); + break; + } +} + +//--------------------------------------------------------------------------------- VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction, SVTK_MainWindow* theParent, @@ -207,20 +384,33 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction, BoxLayout->addWidget( CameraGroup ); // Display parent mesh element - QGroupBox* ParentMeshGroup = new QGroupBox( tr( "PARENT_MESH_TITLE" ), aBox ); - //ParentMeshGroup->setColumnLayout(0, Qt::Vertical ); - //ParentMeshGroup->layout()->setSpacing( 0 ); - //ParentMeshGroup->layout()->setMargin( 0 ); + QGroupBox* PositionGroup = new QGroupBox( tr( "DATA_POSITION" ), aBox ); + //PositionGroup->setColumnLayout(0, Qt::Vertical ); + //PositionGroup->layout()->setSpacing( 0 ); + //PositionGroup->layout()->setMargin( 0 ); + + QGridLayout* PositionGroupLayout = new QGridLayout (PositionGroup); + PositionGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft); + PositionGroupLayout->setSpacing(6); + PositionGroupLayout->setMargin(11); + + QLabel* ParentElementLabel = new QLabel( tr( "PARENT_ELEMENT" ), PositionGroup ); + + myParentElementLineEdit = new VVTK_ValidatedLineEdit( PositionGroup ); - QGridLayout* ParentMeshGroupLayout = new QGridLayout (ParentMeshGroup); - ParentMeshGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft); - ParentMeshGroupLayout->setSpacing(6); - ParentMeshGroupLayout->setMargin(11); + QLabel* LocalPointLabel = new QLabel( tr( "LOCAL_POINT" ), PositionGroup ); - myDisplayParentMeshCheckBox = new QCheckBox( tr( "DISPLAY_PARENT_MESH" ), ParentMeshGroup ); - ParentMeshGroupLayout->addWidget( myDisplayParentMeshCheckBox, 0, 0 ); + myLocalPointLineEdit = new VVTK_ValidatedLineEdit( PositionGroup ); - BoxLayout->addWidget( ParentMeshGroup ); + myDisplayParentMeshCheckBox = new QCheckBox( tr( "DISPLAY_PARENT_MESH" ), PositionGroup ); + + PositionGroupLayout->addWidget( ParentElementLabel, 0, 0, 1, 3 ); + PositionGroupLayout->addWidget( myParentElementLineEdit, 0, 3 ); + PositionGroupLayout->addWidget( LocalPointLabel, 1, 0, 1, 3 ); + PositionGroupLayout->addWidget( myLocalPointLineEdit, 1, 3 ); + PositionGroupLayout->addWidget( myDisplayParentMeshCheckBox, 2, 0, 1, 4 ); + + BoxLayout->addWidget( PositionGroup ); // Common buttons =========================================================== QGroupBox* GroupButtons = new QGroupBox( this ); @@ -252,6 +442,10 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction, connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onClickApply() ) ); connect( buttonClose, SIGNAL( clicked() ), this, SLOT( onClickClose() ) ); connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( onClickHelp() ) ); + + connect( myParentElementLineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onSelectionValidate() ) ); + connect( myLocalPointLineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onSelectionValidate() ) ); + } VVTK_PickingDlg::~VVTK_PickingDlg() @@ -341,6 +535,32 @@ void VVTK_PickingDlg::Update() onClickApply(); } +void VVTK_PickingDlg::onSelectionValidate() +{ + myParentElementLineEdit->MarkValidated( myParentElementLineEdit->text() ); + myLocalPointLineEdit->MarkValidated( myLocalPointLineEdit->text() ); +} + +void VVTK_PickingDlg::onSelectionEvent() +{ + SelectorHelper aHelper( myInteractor ); + if ( !aHelper.get() ) + return; + + const TColStd_IndexedMapOfInteger& aMapIndex = aHelper.myMapIndex; + if ( aMapIndex.Extent() != 1 ) + return; + + int anObjId = aHelper.myMapIndex(1); + + VISU::TGaussPointID aGaussPointID = aHelper.myPipeLine->GetObjID( anObjId ); + + VISU::TCellID aCellID = aGaussPointID.first; + myParentElementLineEdit->setText( QString::number( aCellID ) ); + + VISU::TLocalPntID aLocalPntID = aGaussPointID.second; + myLocalPointLineEdit->setText( QString::number( aLocalPntID ) ); +} VISU_PickingSettings* VVTK_PickingDlg @@ -356,9 +576,19 @@ void VVTK_PickingDlg::SetInteractor( SVTK_RenderWindowInteractor* theInteractor theInteractor->GetDevice()->AddObserver(vtkCommand::KeyPressEvent, myEventCallbackCommand.GetPointer(), myPriority); + theInteractor->GetDevice()->AddObserver(vtkCommand::EndPickEvent, + myEventCallbackCommand.GetPointer(), + myPriority); + { + QValidator* aValidator = new GaussCellIDValidator( myLocalPointLineEdit, theInteractor, myParentElementLineEdit ); + myParentElementLineEdit->setValidator( aValidator ); + } + { + QValidator* aValidator = new GaussLocalPointIDValidator( myParentElementLineEdit, theInteractor, myLocalPointLineEdit ); + myLocalPointLineEdit->setValidator( aValidator ); + } } - void VVTK_PickingDlg::ProcessEvents(vtkObject* vtkNotUsed(theObject), unsigned long theEvent, void* theClientData, @@ -370,6 +600,9 @@ void VVTK_PickingDlg::ProcessEvents(vtkObject* vtkNotUsed(theObject), case vtkCommand::KeyPressEvent: self->KeyPressed(); break; + case vtkCommand::EndPickEvent: + self->onSelectionEvent(); + break; } } @@ -407,7 +640,24 @@ void VVTK_PickingDlg::onClickApply() aColor[2] = aButtonColor.blue() / 255.0; myPickingSettings->SetColor( aColor ); - myPickingSettings->InvokeEvent(VISU::UpdatePickingSettingsEvent,NULL); + myPickingSettings->InvokeEvent( VISU::UpdatePickingSettingsEvent,NULL ); + + SelectorHelper aHelper( myInteractor ); + if ( !aHelper.get() ) + return; + + VISU::TCellID aCellID = myParentElementLineEdit->text().toInt(); + VISU::TLocalPntID aLocalPntID = myLocalPointLineEdit->text().toInt(); + VISU::PGaussPtsIDMapper anIDMapper = aHelper.myPipeLine->GetGaussPtsIDMapper(); + vtkIdType anObjId = anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ); + if ( anObjId < 0 ) + return; + + aHelper.myMapIndex.Clear(); + aHelper.myMapIndex.Add( anObjId ); + aHelper.mySelector->AddOrRemoveIndex( aHelper.myIO, aHelper.myMapIndex, false ); + aHelper.myActor->Highlight( aHelper.myIO ); + myInteractor->GetDevice()->CreateTimer( VTKI_TIMER_FIRST ); } void VVTK_PickingDlg::onClickClose() diff --git a/src/VVTK/VVTK_PickingDlg.h b/src/VVTK/VVTK_PickingDlg.h index 1026285d..cc95f596 100644 --- a/src/VVTK/VVTK_PickingDlg.h +++ b/src/VVTK/VVTK_PickingDlg.h @@ -29,6 +29,8 @@ #include #include +#include + class vtkActorCollection; class vtkCallbackCommand; class vtkImageData; @@ -48,6 +50,7 @@ class VISU_PickingSettings; class SVTK_MainWindow; class SVTK_RenderWindowInteractor; +class VVTK_ValidatedLineEdit; //! Picking Dialog. /*! @@ -77,11 +80,13 @@ public: void SetInteractor( SVTK_RenderWindowInteractor* ); protected slots: + void onSelectionEvent(); void onClickApply(); void onClickClose(); void onClickHelp(); //void onColorButtonPressed(); + void onSelectionValidate(); private: static void ProcessEvents(vtkObject* theObject, @@ -107,6 +112,11 @@ private: vtkSmartPointer myPickingSettings; + VVTK_ValidatedLineEdit* + myParentElementLineEdit; + VVTK_ValidatedLineEdit* + myLocalPointLineEdit; + SVTK_RenderWindowInteractor* myInteractor; @@ -115,4 +125,14 @@ private: myEventCallbackCommand; }; +class VVTK_ValidatedLineEdit : public QLineEdit +{ + Q_OBJECT; +public: + VVTK_ValidatedLineEdit( QWidget* parent ); + +public slots: + void MarkValidated( const QString& theText ); +}; + #endif -- 2.39.2