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
72
74
75class VTKFILTERSMODELING_EXPORT vtkTrimmedExtrusionFilter : public vtkPolyDataAlgorithm
76{
77public:
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
85
87
90 vtkSetVector3Macro(ExtrusionDirection, double);
91 vtkGetVectorMacro(ExtrusionDirection, double, 3);
93
95
104
106
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
191 vtkGetObjectMacro(Locator, vtkAbstractCellLocator);
193
194protected:
197
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
210 vtkPolyData* mesh, vtkIdType inCellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
211
214
215private:
217 void operator=(const vtkTrimmedExtrusionFilter&) = delete;
218};
219
220#endif
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
list of point or cell ids
Definition vtkIdList.h:34
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
extrude polygonal data trimmed by a second input surface
void SetCappingStrategyToMaximumDistance()
Specify a strategy for capping.
vtkPolyData * GetTrimSurface(vtkInformationVector *sourceInfo)
Return a pointer to the enclosing surface.
void ExtrudeEdges(vtkPolyData *input, vtkPolyData *output, vtkIdType numPts, vtkIdType numCells)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetCappingStrategyToIntersection()
Specify a strategy for capping.
static vtkTrimmedExtrusionFilter * New()
Create object with extrusion direction (0,0,1) and capping on.
void SetLocator(vtkAbstractCellLocator *locator)
Specify a cell locator.
void SetTrimSurfaceData(vtkPolyData *pd)
Specify the surface which trims the surface.
vtkIdType GetNeighborCount(vtkPolyData *mesh, vtkIdType inCellId, vtkIdType p1, vtkIdType p2, vtkIdList *cellIds)
void SetTrimSurfaceConnection(vtkAlgorithmOutput *algOutput)
Specify the surface which trims the surface.
void SetExtrusionStrategyToAllEdges()
Specify a strategy for extrusion.
~vtkTrimmedExtrusionFilter() override
void SetExtrusionStrategyToBoundaryEdges()
Specify a strategy for extrusion.
void AdjustPoints(vtkPolyData *mesh, vtkIdType numPts, vtkIdType numCells, unsigned char *hots, vtkPoints *newPts)
void SetCappingStrategyToMinimumDistance()
Specify a strategy for capping.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * GetTrimSurface()
Return a pointer to the enclosing surface.
void SetCappingStrategyToAverageDistance()
Specify a strategy for capping.
int vtkIdType
Definition vtkType.h:332