VTK  9.2.6
vtkTrimmedExtrusionFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTrimmedExtrusionFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
67 #ifndef vtkTrimmedExtrusionFilter_h
68 #define vtkTrimmedExtrusionFilter_h
69 
70 #include "vtkFiltersModelingModule.h" // For export macro
71 #include "vtkPolyDataAlgorithm.h"
72 
74 
75 class VTKFILTERSMODELING_EXPORT vtkTrimmedExtrusionFilter : public vtkPolyDataAlgorithm
76 {
77 public:
79  void PrintSelf(ostream& os, vtkIndent indent) override;
80 
85 
87 
90  vtkSetVector3Macro(ExtrusionDirection, double);
91  vtkGetVectorMacro(ExtrusionDirection, double, 3);
93 
95 
101  void SetTrimSurfaceData(vtkPolyData* pd);
102  void SetTrimSurfaceConnection(vtkAlgorithmOutput* algOutput);
104 
106 
109  vtkPolyData* GetTrimSurface();
110  vtkPolyData* GetTrimSurface(vtkInformationVector* sourceInfo);
112 
114 
117  vtkSetMacro(Capping, int);
118  vtkGetMacro(Capping, int);
119  vtkBooleanMacro(Capping, int);
121 
122  // How to extrude data. Either determine boundary edges and sweep them; or
123  // sweep all edges.
125  {
126  BOUNDARY_EDGES = 0,
127  ALL_EDGES = 1
128  };
129 
131 
140  vtkSetMacro(ExtrusionStrategy, int);
141  vtkGetMacro(ExtrusionStrategy, int);
142  void SetExtrusionStrategyToBoundaryEdges() { this->SetExtrusionStrategy(BOUNDARY_EDGES); }
143  void SetExtrusionStrategyToAllEdges() { this->SetExtrusionStrategy(ALL_EDGES); }
145 
146  // How to cap data.
148  {
149  INTERSECTION = 0,
150  MINIMUM_DISTANCE = 1,
151  MAXIMUM_DISTANCE = 2,
152  AVERAGE_DISTANCE = 3,
153  };
154 
156 
177  vtkSetMacro(CappingStrategy, int);
178  vtkGetMacro(CappingStrategy, int);
179  void SetCappingStrategyToIntersection() { this->SetCappingStrategy(INTERSECTION); }
180  void SetCappingStrategyToMinimumDistance() { this->SetCappingStrategy(MINIMUM_DISTANCE); }
181  void SetCappingStrategyToMaximumDistance() { this->SetCappingStrategy(MAXIMUM_DISTANCE); }
182  void SetCappingStrategyToAverageDistance() { this->SetCappingStrategy(AVERAGE_DISTANCE); }
184 
186 
190  void SetLocator(vtkAbstractCellLocator* locator);
191  vtkGetObjectMacro(Locator, vtkAbstractCellLocator);
193 
194 protected:
196  ~vtkTrimmedExtrusionFilter() override;
197 
198  int Capping;
199  double ExtrusionDirection[3];
203 
204  void AdjustPoints(vtkPolyData* mesh, vtkIdType numPts, vtkIdType numCells, unsigned char* hots,
205  vtkPoints* newPts);
206 
207  void ExtrudeEdges(vtkPolyData* input, vtkPolyData* output, vtkIdType numPts, vtkIdType numCells);
208 
209  vtkIdType GetNeighborCount(
210  vtkPolyData* mesh, vtkIdType inCellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
211 
213  int FillInputPortInformation(int, vtkInformation*) override;
214 
215 private:
217  void operator=(const vtkTrimmedExtrusionFilter&) = delete;
218 };
219 
220 #endif
void SetCappingStrategyToMaximumDistance()
Specify a strategy for capping.
Store vtkAlgorithm input/output information.
void SetExtrusionStrategyToAllEdges()
Specify a strategy for extrusion.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
an abstract base class for locators which find cells
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
void SetCappingStrategyToAverageDistance()
Specify a strategy for capping.
void SetExtrusionStrategyToBoundaryEdges()
Specify a strategy for extrusion.
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:33
void SetCappingStrategyToIntersection()
Specify a strategy for capping.
vtkAbstractCellLocator * Locator
void SetCappingStrategyToMinimumDistance()
Specify a strategy for capping.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
extrude polygonal data trimmed by a second input surface
represent and manipulate 3D points
Definition: vtkPoints.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.