VTK  9.4.20241226
vtkIntersectionPolyDataFilter.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
73#ifndef vtkIntersectionPolyDataFilter_h
74#define vtkIntersectionPolyDataFilter_h
75
76#include "vtkFiltersGeneralModule.h" // For export macro
78
79VTK_ABI_NAMESPACE_BEGIN
80class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
81{
82public:
85 void PrintSelf(ostream& os, vtkIndent indent) override;
86
88
91 vtkGetMacro(NumberOfIntersectionPoints, int);
92 vtkGetMacro(NumberOfIntersectionLines, int);
94
96
100 vtkGetMacro(SplitFirstOutput, vtkTypeBool);
101 vtkSetMacro(SplitFirstOutput, vtkTypeBool);
102 vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
104
106
110 vtkGetMacro(SplitSecondOutput, vtkTypeBool);
111 vtkSetMacro(SplitSecondOutput, vtkTypeBool);
112 vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
114
116
120 vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
121 vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
122 vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
124
126
129 vtkGetMacro(CheckInput, vtkTypeBool);
130 vtkSetMacro(CheckInput, vtkTypeBool);
131 vtkBooleanMacro(CheckInput, vtkTypeBool);
133
135
139 vtkGetMacro(CheckMesh, vtkTypeBool);
140 vtkSetMacro(CheckMesh, vtkTypeBool);
141 vtkBooleanMacro(CheckMesh, vtkTypeBool);
143
145
150 vtkGetMacro(Status, int);
152
154
157 vtkGetMacro(Tolerance, double);
158 vtkSetMacro(Tolerance, double);
160
162
167 vtkGetMacro(RelativeSubtriangleArea, double);
168 vtkSetMacro(RelativeSubtriangleArea, double);
170
181 static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
182 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
183 double tolerance);
184
189 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
190
194 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
195
196protected:
198 ~vtkIntersectionPolyDataFilter() override; // Destructor
199
201 vtkInformationVector*) override; // Update
202 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
203
204private:
206 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
207
208 int NumberOfIntersectionPoints;
209 int NumberOfIntersectionLines;
210 vtkTypeBool SplitFirstOutput;
211 vtkTypeBool SplitSecondOutput;
212 vtkTypeBool ComputeIntersectionPointArray;
213 vtkTypeBool CheckMesh;
214 vtkTypeBool CheckInput;
215 int Status;
216 double Tolerance;
217 double RelativeSubtriangleArea;
218
219 class Impl; // Implementation class
220};
221
222VTK_ABI_NAMESPACE_END
223#endif // vtkIntersectionPolyDataFilter_h
RealT r2
Definition PyrC2Basis.h:20
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
~vtkIntersectionPolyDataFilter() override
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static void CleanAndCheckSurface(vtkPolyData *pd, double stats[2], double tolerance)
Function to clean and check the output surfaces for bad triangles and free edges.
static vtkIntersectionPolyDataFilter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3], double q2[3], double r2[3], int &coplanar, double pt1[3], double pt2[3], double surfaceid[2], double tolerance)
Given two triangles defined by points (p1, q1, r1) and (p2, q2, r2), returns whether the two triangle...
static void CleanAndCheckInput(vtkPolyData *pd, double tolerance)
Function to clean and check the inputs.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
int vtkTypeBool
Definition vtkABI.h:64