VTK  9.4.20241222
vtkTrimmedExtrusionFilter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
55#ifndef vtkTrimmedExtrusionFilter_h
56#define vtkTrimmedExtrusionFilter_h
57
58#include "vtkFiltersModelingModule.h" // For export macro
60
61VTK_ABI_NAMESPACE_BEGIN
63
64class VTKFILTERSMODELING_EXPORT vtkTrimmedExtrusionFilter : public vtkPolyDataAlgorithm
65{
66public:
68 void PrintSelf(ostream& os, vtkIndent indent) override;
69
74
76
79 vtkSetVector3Macro(ExtrusionDirection, double);
80 vtkGetVectorMacro(ExtrusionDirection, double, 3);
82
84
93
95
101
103
106 vtkSetMacro(Capping, int);
107 vtkGetMacro(Capping, int);
108 vtkBooleanMacro(Capping, int);
110
111 // How to extrude data. Either determine boundary edges and sweep them; or
112 // sweep all edges.
114 {
115 BOUNDARY_EDGES = 0,
116 ALL_EDGES = 1
117 };
118
120
129 vtkSetMacro(ExtrusionStrategy, int);
130 vtkGetMacro(ExtrusionStrategy, int);
131 void SetExtrusionStrategyToBoundaryEdges() { this->SetExtrusionStrategy(BOUNDARY_EDGES); }
132 void SetExtrusionStrategyToAllEdges() { this->SetExtrusionStrategy(ALL_EDGES); }
134
135 // How to cap data.
137 {
138 INTERSECTION = 0,
139 MINIMUM_DISTANCE = 1,
140 MAXIMUM_DISTANCE = 2,
141 AVERAGE_DISTANCE = 3,
142 };
143
145
166 vtkSetMacro(CappingStrategy, int);
167 vtkGetMacro(CappingStrategy, int);
168 void SetCappingStrategyToIntersection() { this->SetCappingStrategy(INTERSECTION); }
169 void SetCappingStrategyToMinimumDistance() { this->SetCappingStrategy(MINIMUM_DISTANCE); }
170 void SetCappingStrategyToMaximumDistance() { this->SetCappingStrategy(MAXIMUM_DISTANCE); }
171 void SetCappingStrategyToAverageDistance() { this->SetCappingStrategy(AVERAGE_DISTANCE); }
173
175
180 vtkGetObjectMacro(Locator, vtkAbstractCellLocator);
182
183protected:
186
188 double ExtrusionDirection[3];
192
193 void AdjustPoints(vtkPolyData* mesh, vtkIdType numPts, vtkIdType numCells, unsigned char* hots,
194 vtkPoints* newPts);
195
196 void ExtrudeEdges(vtkPolyData* input, vtkPolyData* output, vtkIdType numPts, vtkIdType numCells);
197
199 vtkPolyData* mesh, vtkIdType inCellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
200
203
204private:
206 void operator=(const vtkTrimmedExtrusionFilter&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#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:133
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
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:315