VTK
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);
143  { this->SetExtrusionStrategy(BOUNDARY_EDGES); }
145  { this->SetExtrusionStrategy(ALL_EDGES); }
147 
148  // How to cap data.
150  {
151  INTERSECTION=0,
152  MINIMUM_DISTANCE=1,
153  MAXIMUM_DISTANCE=2,
154  AVERAGE_DISTANCE=3,
155  };
156 
158 
179  vtkSetMacro(CappingStrategy,int);
180  vtkGetMacro(CappingStrategy,int);
182  { this->SetCappingStrategy(INTERSECTION); }
184  { this->SetCappingStrategy(MINIMUM_DISTANCE); }
186  { this->SetCappingStrategy(MAXIMUM_DISTANCE); }
188  { this->SetCappingStrategy(AVERAGE_DISTANCE); }
190 
192 
196  void SetLocator(vtkAbstractCellLocator *locator);
197  vtkGetObjectMacro(Locator,vtkAbstractCellLocator);
199 
200 protected:
202  ~vtkTrimmedExtrusionFilter() override;
203 
204  int Capping;
205  double ExtrusionDirection[3];
209 
210  void AdjustPoints(vtkPolyData *mesh, vtkIdType numPts, vtkIdType numCells,
211  unsigned char *hots, vtkPoints *newPts);
212 
213  void ExtrudeEdges(vtkPolyData *input, vtkPolyData *output,
214  vtkIdType numPts, vtkIdType numCells);
215 
216  vtkIdType GetNeighborCount(vtkPolyData *mesh, vtkIdType inCellId,
217  vtkIdType p1, vtkIdType p2, vtkIdList *cellIds);
218 
220  int FillInputPortInformation(int, vtkInformation *) override;
221 
222 private:
224  void operator=(const vtkTrimmedExtrusionFilter&) = delete;
225 };
226 
227 #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:347
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:36
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.