VTK  9.3.0
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
54 #ifndef vtkIntersectionPolyDataFilter_h
55 #define vtkIntersectionPolyDataFilter_h
56 
57 #include "vtkFiltersGeneralModule.h" // For export macro
58 #include "vtkPolyDataAlgorithm.h"
59 
60 VTK_ABI_NAMESPACE_BEGIN
61 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
62 {
63 public:
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
72  vtkGetMacro(NumberOfIntersectionPoints, int);
73  vtkGetMacro(NumberOfIntersectionLines, int);
75 
77 
81  vtkGetMacro(SplitFirstOutput, vtkTypeBool);
82  vtkSetMacro(SplitFirstOutput, vtkTypeBool);
83  vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
85 
87 
91  vtkGetMacro(SplitSecondOutput, vtkTypeBool);
92  vtkSetMacro(SplitSecondOutput, vtkTypeBool);
93  vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
95 
97 
101  vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
102  vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
103  vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
105 
107 
110  vtkGetMacro(CheckInput, vtkTypeBool);
111  vtkSetMacro(CheckInput, vtkTypeBool);
112  vtkBooleanMacro(CheckInput, vtkTypeBool);
114 
116 
120  vtkGetMacro(CheckMesh, vtkTypeBool);
121  vtkSetMacro(CheckMesh, vtkTypeBool);
122  vtkBooleanMacro(CheckMesh, vtkTypeBool);
124 
126 
131  vtkGetMacro(Status, int);
133 
135 
138  vtkGetMacro(Tolerance, double);
139  vtkSetMacro(Tolerance, double);
141 
143 
148  vtkGetMacro(RelativeSubtriangleArea, double);
149  vtkSetMacro(RelativeSubtriangleArea, double);
151 
162  static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
163  double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
164  double tolerance);
165 
170  static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
171 
175  static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
176 
177 protected:
179  ~vtkIntersectionPolyDataFilter() override; // Destructor
180 
182  vtkInformationVector*) override; // Update
183  int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
184 
185 private:
187  void operator=(const vtkIntersectionPolyDataFilter&) = delete;
188 
189  int NumberOfIntersectionPoints;
190  int NumberOfIntersectionLines;
191  vtkTypeBool SplitFirstOutput;
192  vtkTypeBool SplitSecondOutput;
193  vtkTypeBool ComputeIntersectionPointArray;
194  vtkTypeBool CheckMesh;
195  vtkTypeBool CheckInput;
196  int Status;
197  double Tolerance;
198  double RelativeSubtriangleArea;
199 
200  class Impl; // Implementation class
201 };
202 
203 VTK_ABI_NAMESPACE_END
204 #endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition: vtkIndent.h:29
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:80
int vtkTypeBool
Definition: vtkABI.h:64