VTK  9.1.0
vtkIntersectionPolyDataFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkIntersectionPolyDataFilter.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=========================================================================*/
72#ifndef vtkIntersectionPolyDataFilter_h
73#define vtkIntersectionPolyDataFilter_h
74
75#include "vtkFiltersGeneralModule.h" // For export macro
77
78class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
79{
80public:
83 void PrintSelf(ostream& os, vtkIndent indent) override;
84
86
89 vtkGetMacro(NumberOfIntersectionPoints, int);
90 vtkGetMacro(NumberOfIntersectionLines, int);
92
94
98 vtkGetMacro(SplitFirstOutput, vtkTypeBool);
99 vtkSetMacro(SplitFirstOutput, vtkTypeBool);
100 vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
102
104
108 vtkGetMacro(SplitSecondOutput, vtkTypeBool);
109 vtkSetMacro(SplitSecondOutput, vtkTypeBool);
110 vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
112
114
118 vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
119 vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
120 vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
122
124
127 vtkGetMacro(CheckInput, vtkTypeBool);
128 vtkSetMacro(CheckInput, vtkTypeBool);
129 vtkBooleanMacro(CheckInput, vtkTypeBool);
131
133
137 vtkGetMacro(CheckMesh, vtkTypeBool);
138 vtkSetMacro(CheckMesh, vtkTypeBool);
139 vtkBooleanMacro(CheckMesh, vtkTypeBool);
141
143
148 vtkGetMacro(Status, int);
150
152
155 vtkGetMacro(Tolerance, double);
156 vtkSetMacro(Tolerance, double);
158
160
165 vtkGetMacro(RelativeSubtriangleArea, double);
166 vtkSetMacro(RelativeSubtriangleArea, double);
168
179 static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
180 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
181 double tolerance);
182
187 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
188
192 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
193
194protected:
196 ~vtkIntersectionPolyDataFilter() override; // Destructor
197
199 vtkInformationVector*) override; // Update
200 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
201
202private:
204 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
205
206 int NumberOfIntersectionPoints;
207 int NumberOfIntersectionLines;
208 vtkTypeBool SplitFirstOutput;
209 vtkTypeBool SplitSecondOutput;
210 vtkTypeBool ComputeIntersectionPointArray;
211 vtkTypeBool CheckMesh;
212 vtkTypeBool CheckInput;
213 int Status;
214 double Tolerance;
215 double RelativeSubtriangleArea;
216
217 class Impl; // Implementation class
218};
219
220#endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition: vtkIndent.h:43
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
Definition: vtkPolyData.h:95
int vtkTypeBool
Definition: vtkABI.h:69