Version: 9.16.0
VTKViewer_GeometryFilter.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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, or (at your option) any later version.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef VTKVIEWER_GEOMETRYFILTER_H
24#define VTKVIEWER_GEOMETRYFILTER_H
25
26#include "VTKViewer.h"
27
28#include <vtkGeometryFilter.h>
29
30#include <map>
31#include <vector>
32
33#ifdef WIN32
34#pragma warning ( disable:4251 )
35#endif
36
37class vtkUnstructuredGrid;
38
42{
43public:
47
56 void SetInside(int theShowInside);
61 int GetInside();
66 int GetAppendCoincident3D() const;
71 void SetAppendCoincident3D(int theFlag);
76 void SetWireframeMode(int theIsWireframeMode);
81 int GetWireframeMode();
86 void SetStoreMapping(int theStoreMapping);
91 int GetStoreMapping();
96 virtual vtkIdType GetNodeObjId(vtkIdType theVtkID) { return theVtkID;}
101 virtual vtkIdType GetElemObjId(vtkIdType theVtkID);
102
103 virtual void SetQuadraticArcMode(bool theFlag);
104 virtual bool GetQuadraticArcMode() const;
105
106 virtual void SetQuadraticArcAngle(double theMaxAngle);
107 virtual double GetQuadraticArcAngle() const;
108
109 typedef std::vector<vtkIdType> TVectorId;
110 //typedef std::map<vtkIdType, TVectorId> TMapOfVectorId;
111 typedef std::vector<TVectorId> TMapOfVectorId;
112
113 static void InsertId( const vtkIdType theCellId,
114 const vtkIdType theCellType,
115 TVectorId& /*theVTK2ObjIds*/,
116 TMapOfVectorId& theDimension2VTK2ObjIds );
117
118protected:
127
128 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
129
130 //special cases for performance
131
135 int UnstructuredGridExecute (vtkDataSet *, vtkPolyData *, vtkInformation *);
136
137
138 void BuildArcedPolygon(vtkIdType cellId,
139 vtkUnstructuredGrid* input,
140 vtkPolyData *output,
141 TMapOfVectorId& theDimension2VTK2ObjIds,
142 bool triangulate = false);
143
148 void FillVTK2ObjIds(vtkPolyData *output);
149
150 // Delegate VTKViewer_GeometryFilter::UnstructuredGridExecute to vtkGeometryFilter::UnstructuredGridExecute
151 bool delegateToVtk = false;
152
153private:
159
160 double myMaxArcAngle; // define max angle for mesh 2D quadratic element in the degrees
161 bool myIsBuildArc; // flag for representation 2D quadratic element as arked polygon
162};
163
164#ifdef WIN32
165#pragma warning ( default:4251 )
166#endif
167
168#endif
#define VTKVIEWER_EXPORT
Definition: VTKViewer.h:33
This class used same as vtkGeometryFilter. See documentation on VTK for more information.
Definition: VTKViewer_GeometryFilter.h:42
virtual vtkIdType GetNodeObjId(vtkIdType theVtkID)
Return input value theVtkID.
Definition: VTKViewer_GeometryFilter.h:96
int myAppendCoincident3D
Definition: VTKViewer_GeometryFilter.h:158
TVectorId myVTK2ObjIds
Definition: VTKViewer_GeometryFilter.h:154
std::vector< vtkIdType > TVectorId
Definition: VTKViewer_GeometryFilter.h:109
int myIsWireframeMode
Definition: VTKViewer_GeometryFilter.h:157
static VTKViewer_GeometryFilter * New()
double myMaxArcAngle
Definition: VTKViewer_GeometryFilter.h:160
std::vector< TVectorId > TMapOfVectorId
Definition: VTKViewer_GeometryFilter.h:111
bool myIsBuildArc
Definition: VTKViewer_GeometryFilter.h:161
VTKViewer_GeometryFilter()
Constructor which sets myShowInside = 0 and myStoreMapping = 0.
int myShowInside
Definition: VTKViewer_GeometryFilter.h:155
int myStoreMapping
Definition: VTKViewer_GeometryFilter.h:156