VTK  9.1.0
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
69
71
72class VTKFILTERSMODELING_EXPORT vtkTrimmedExtrusionFilter : public vtkPolyDataAlgorithm
73{
74public:
76 void PrintSelf(ostream& os, vtkIndent indent) override;
77
82
84
87 vtkSetVector3Macro(ExtrusionDirection, double);
88 vtkGetVectorMacro(ExtrusionDirection, double, 3);
90
92
101
103
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);
139 void SetExtrusionStrategyToBoundaryEdges() { this->SetExtrusionStrategy(BOUNDARY_EDGES); }
140 void SetExtrusionStrategyToAllEdges() { this->SetExtrusionStrategy(ALL_EDGES); }
142
143 // How to cap data.
145 {
146 INTERSECTION = 0,
147 MINIMUM_DISTANCE = 1,
148 MAXIMUM_DISTANCE = 2,
149 AVERAGE_DISTANCE = 3,
150 };
151
153
174 vtkSetMacro(CappingStrategy, int);
175 vtkGetMacro(CappingStrategy, int);
176 void SetCappingStrategyToIntersection() { this->SetCappingStrategy(INTERSECTION); }
177 void SetCappingStrategyToMinimumDistance() { this->SetCappingStrategy(MINIMUM_DISTANCE); }
178 void SetCappingStrategyToMaximumDistance() { this->SetCappingStrategy(MAXIMUM_DISTANCE); }
179 void SetCappingStrategyToAverageDistance() { this->SetCappingStrategy(AVERAGE_DISTANCE); }
181
183
188 vtkGetObjectMacro(Locator, vtkAbstractCellLocator);
190
191protected:
194
196 double ExtrusionDirection[3];
200
201 void AdjustPoints(vtkPolyData* mesh, vtkIdType numPts, vtkIdType numCells, unsigned char* hots,
202 vtkPoints* newPts);
203
204 void ExtrudeEdges(vtkPolyData* input, vtkPolyData* output, vtkIdType numPts, vtkIdType numCells);
205
207 vtkPolyData* mesh, vtkIdType inCellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
208
211
212private:
214 void operator=(const vtkTrimmedExtrusionFilter&) = delete;
215};
216
217#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:140
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:143
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
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.
vtkAbstractCellLocator * Locator
void SetCappingStrategyToAverageDistance()
Specify a strategy for capping.
int vtkIdType
Definition: vtkType.h:332