VTK  9.2.6
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 =========================================================================*/
66 #ifndef vtkIntersectionPolyDataFilter_h
67 #define vtkIntersectionPolyDataFilter_h
68 
69 #include "vtkFiltersGeneralModule.h" // For export macro
70 #include "vtkPolyDataAlgorithm.h"
71 
72 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
73 {
74 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
80 
83  vtkGetMacro(NumberOfIntersectionPoints, int);
84  vtkGetMacro(NumberOfIntersectionLines, int);
86 
88 
92  vtkGetMacro(SplitFirstOutput, vtkTypeBool);
93  vtkSetMacro(SplitFirstOutput, vtkTypeBool);
94  vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
96 
98 
102  vtkGetMacro(SplitSecondOutput, vtkTypeBool);
103  vtkSetMacro(SplitSecondOutput, vtkTypeBool);
104  vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
106 
108 
112  vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
113  vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
114  vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
116 
118 
121  vtkGetMacro(CheckInput, vtkTypeBool);
122  vtkSetMacro(CheckInput, vtkTypeBool);
123  vtkBooleanMacro(CheckInput, vtkTypeBool);
125 
127 
131  vtkGetMacro(CheckMesh, vtkTypeBool);
132  vtkSetMacro(CheckMesh, vtkTypeBool);
133  vtkBooleanMacro(CheckMesh, vtkTypeBool);
135 
137 
142  vtkGetMacro(Status, int);
144 
146 
149  vtkGetMacro(Tolerance, double);
150  vtkSetMacro(Tolerance, double);
152 
154 
159  vtkGetMacro(RelativeSubtriangleArea, double);
160  vtkSetMacro(RelativeSubtriangleArea, double);
162 
173  static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
174  double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
175  double tolerance);
176 
181  static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
182 
186  static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
187 
188 protected:
189  vtkIntersectionPolyDataFilter(); // Constructor
190  ~vtkIntersectionPolyDataFilter() override; // Destructor
191 
193  vtkInformationVector*) override; // Update
194  int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
195 
196 private:
198  void operator=(const vtkIntersectionPolyDataFilter&) = delete;
199 
200  int NumberOfIntersectionPoints;
201  int NumberOfIntersectionLines;
202  vtkTypeBool SplitFirstOutput;
203  vtkTypeBool SplitSecondOutput;
204  vtkTypeBool ComputeIntersectionPointArray;
205  vtkTypeBool CheckMesh;
206  vtkTypeBool CheckInput;
207  int Status;
208  double Tolerance;
209  double RelativeSubtriangleArea;
210 
211  class Impl; // Implementation class
212 };
213 
214 #endif // vtkIntersectionPolyDataFilter_h
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.