VTK  9.2.6
vtkBooleanOperationPolyDataFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBooleanOperationPolyDataFilter.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=========================================================================*/
49#ifndef vtkBooleanOperationPolyDataFilter_h
50#define vtkBooleanOperationPolyDataFilter_h
51
52#include "vtkFiltersGeneralModule.h" // For export macro
54
55#include "vtkDataSetAttributes.h" // Needed for CopyCells() method
56
57class vtkIdList;
58
59class VTKFILTERSGENERAL_EXPORT vtkBooleanOperationPolyDataFilter : public vtkPolyDataAlgorithm
60{
61public:
66
68
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72 {
73 VTK_UNION = 0,
75 VTK_DIFFERENCE
76 };
77
79
82 vtkSetClampMacro(Operation, int, VTK_UNION, VTK_DIFFERENCE);
83 vtkGetMacro(Operation, int);
84 void SetOperationToUnion() { this->SetOperation(VTK_UNION); }
85 void SetOperationToIntersection() { this->SetOperation(VTK_INTERSECTION); }
86 void SetOperationToDifference() { this->SetOperation(VTK_DIFFERENCE); }
88
90
94 vtkSetMacro(ReorientDifferenceCells, vtkTypeBool);
95 vtkGetMacro(ReorientDifferenceCells, vtkTypeBool);
96 vtkBooleanMacro(ReorientDifferenceCells, vtkTypeBool);
98
100
104 vtkSetMacro(Tolerance, double);
105 vtkGetMacro(Tolerance, double);
107
108protected:
111
115 void SortPolyData(vtkPolyData* input, vtkIdList* intersectionList, vtkIdList* unionList);
116
119
120private:
122 void operator=(const vtkBooleanOperationPolyDataFilter&) = delete;
123
129 void CopyCells(vtkPolyData* in, vtkPolyData* out, int idx,
131 vtkIdList* cellIds, bool reverseCells);
132
137 double Tolerance;
138
143 int Operation;
144
146
150 vtkTypeBool ReorientDifferenceCells;
152};
153
154#endif
Computes the boundary of the union, intersection, or difference volume computed from the volumes defi...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SortPolyData(vtkPolyData *input, vtkIdList *intersectionList, vtkIdList *unionList)
Labels triangles in mesh as part of the intersection or union surface.
void SetOperationToIntersection()
Set the boolean operation to perform.
static vtkBooleanOperationPolyDataFilter * New()
Construct object that computes the boolean surface.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetOperationToUnion()
Set the boolean operation to perform.
void SetOperationToDifference()
Set the boolean operation to perform.
helps manage arrays from multiple vtkDataSetAttributes.
list of point or cell ids
Definition vtkIdList.h:43
a simple class to control print indentation
Definition vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
int vtkTypeBool
Definition vtkABI.h:69