1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // VISU OBJECT : interactive object for VISU entities implementation
24 // File: VISU_CutPlanesPL.hxx
25 // Author: Alexey PETROV
28 #ifndef VISU_CutPlanesPL_HeaderFile
29 #define VISU_CutPlanesPL_HeaderFile
31 #include "VISUPipeline.hxx"
32 #include "VISU_ScalarMapPL.hxx"
33 #include "VISU_OptionalDeformationPL.hxx"
34 #include "VISU_MapperHolder.hxx"
38 class vtkAppendPolyData;
41 //----------------------------------------------------------------------------
42 class VISU_PIPELINE_EXPORT VISU_CutPlanesPL : public VISU_ScalarMapPL,
43 public VISU_OptionalDeformationPL
46 vtkTypeMacro(VISU_CutPlanesPL, VISU_ScalarMapPL);
56 //----------------------------------------------------------------------------
57 enum PlaneOrientation {XY, YZ, ZX};
61 SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
67 const PlaneOrientation&
68 GetPlaneOrientation(int theNum = 0);
72 GetRotateX(int theNum = 0);
76 GetRotateY(int theNum = 0);
80 GetDisplacement(int theNum = 0);
84 SetDisplacement(double theDisp,
89 SetPartPosition(int thePartNumber,
90 double thePartPosition);
94 GetPartPosition(int thePartNumber,
99 SetPartDefault(int thePartNumber);
103 IsPartDefault(int thePartNumber);
107 SetNbParts(int theNb);
122 //! Gets memory size used by the instance (bytes).
131 return myAppendPolyData;
137 GetRx(double theRx[3][3],
142 GetRy(double theRy[3][3],
147 GetRz(double theRz[3][3],
152 CorrectPnt(double thePnt[3],
153 const double BoundPrj[6]);
157 GetBoundProject(double BoundPrj[3],
158 const double BoundBox[6],
159 const double Dir[3]);
163 GetDir(double theDir[3],
164 const double theAng[3],
165 const PlaneOrientation& theBasePlane);
169 ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData);
173 CutWithPlane(vtkAppendPolyData* theAppendPolyData,
174 vtkDataSet* theDataSet,
180 CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
181 vtkDataSet* theDataSet,
185 const std::vector<double>& thePlanePosition,
186 const std::vector<int>& thePlaneCondition,
187 double theDisplacement);
189 virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper);
190 VISU::PUnstructuredGridIDMapper getVectorialField();
194 SetMapScale(double theMapScale = 1.0);
209 DoShallowCopy(VISU_PipeLine *thePipeLine,
210 bool theIsCopyInput);
213 SetPartPosition(int theNum = 0);
216 PlaneOrientation myBasePlane[2];
217 double myAng[2][3], myDisplacement[2];
218 vtkAppendPolyData *myAppendPolyData;
219 std::vector<double> myPartPosition;
220 std::vector<int> myPartCondition;
223 VISU_CutPlanesPL(const VISU_CutPlanesPL&); // Not implemented.
224 void operator=(const VISU_CutPlanesPL&); // Not implemented.