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 =========================================================================*/
64 #ifndef vtkTrimmedExtrusionFilter_h
65 #define vtkTrimmedExtrusionFilter_h
66 
67 #include "vtkFiltersModelingModule.h" // For export macro
68 #include "vtkPolyDataAlgorithm.h"
69 
71 
72 class VTKFILTERSMODELING_EXPORT vtkTrimmedExtrusionFilter : public vtkPolyDataAlgorithm
73 {
74 public:
76  void PrintSelf(ostream& os, vtkIndent indent) override;
77 
82 
84 
87  vtkSetVector3Macro(ExtrusionDirection,double);
88  vtkGetVectorMacro(ExtrusionDirection,double,3);
90 
92 
98  void SetTrimSurfaceData(vtkPolyData *pd);
99  void SetTrimSurfaceConnection(vtkAlgorithmOutput* algOutput);
101 
103 
106  vtkPolyData *GetTrimSurface();
107  vtkPolyData *GetTrimSurface(vtkInformationVector *sourceInfo);
109 
111 
114  vtkSetMacro(Capping,int);
115  vtkGetMacro(Capping,int);
116  vtkBooleanMacro(Capping,int);
118 
119  // How to extrude data. Either determine boundary edges and sweep them; or
120  // sweep all edges.
122  {
123  BOUNDARY_EDGES=0,
124  ALL_EDGES=1
125  };
126 
128 
137  vtkSetMacro(ExtrusionStrategy,int);
138  vtkGetMacro(ExtrusionStrategy,int);
140  { this->SetExtrusionStrategy(BOUNDARY_EDGES); }
142  { this->SetExtrusionStrategy(ALL_EDGES); }
144 
145  // How to cap data.
147  {
148  INTERSECTION=0,
149  MINIMUM_DISTANCE=1,
150  MAXIMUM_DISTANCE=2,
151  AVERAGE_DISTANCE=3,
152  };
153 
155 
176  vtkSetMacro(CappingStrategy,int);
177  vtkGetMacro(CappingStrategy,int);
179  { this->SetCappingStrategy(INTERSECTION); }
181  { this->SetCappingStrategy(MINIMUM_DISTANCE); }
183  { this->SetCappingStrategy(MAXIMUM_DISTANCE); }
185  { this->SetCappingStrategy(AVERAGE_DISTANCE); }
187 
189 
193  void SetLocator(vtkAbstractCellLocator *locator);
194  vtkGetObjectMacro(Locator,vtkAbstractCellLocator);
196 
197 protected:
199  ~vtkTrimmedExtrusionFilter() override;
200 
201  int Capping;
202  double ExtrusionDirection[3];
206 
207  void AdjustPoints(vtkPolyData *mesh, vtkIdType numPts, vtkIdType numCells,
208  unsigned char *hots, vtkPoints *newPts);
209 
210  void ExtrudeEdges(vtkPolyData *input, vtkPolyData *output,
211  vtkIdType numPts, vtkIdType numCells);
212 
213  vtkIdType GetNeighborCount(vtkPolyData *mesh, vtkIdType inCellId,
214  vtkIdType p1, vtkIdType p2, vtkIdList *cellIds);
215 
217  int FillInputPortInformation(int, vtkInformation *) override;
218 
219 private:
221  void operator=(const vtkTrimmedExtrusionFilter&) = delete;
222 };
223 
224 #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:79
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:33
list of point or cell ids
Definition: vtkIdList.h:30
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:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.