VTK  9.2.6
vtkImprintFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImprintFilter.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 =========================================================================*/
96 #ifndef vtkImprintFilter_h
97 #define vtkImprintFilter_h
98 
99 #include "vtkFiltersModelingModule.h" // For export macro
100 #include "vtkPolyDataAlgorithm.h"
101 
103 
104 class VTKFILTERSMODELING_EXPORT vtkImprintFilter : public vtkPolyDataAlgorithm
105 {
106 public:
108 
111  static vtkImprintFilter* New();
113  void PrintSelf(ostream& os, vtkIndent indent) override;
115 
120  void SetTargetConnection(vtkAlgorithmOutput* algOutput);
121  vtkAlgorithmOutput* GetTargetConnection();
122 
124 
129  void SetTargetData(vtkDataObject* target);
130  vtkDataObject* GetTarget();
132 
138  void SetImprintConnection(vtkAlgorithmOutput* algOutput);
139  vtkAlgorithmOutput* GetImprintConnection();
140 
142 
146  void SetImprintData(vtkDataObject* imprint);
147  vtkDataObject* GetImprint();
149 
151 
156  vtkSetClampMacro(Tolerance, double, 0.0, VTK_FLOAT_MAX);
157  vtkGetMacro(Tolerance, double);
159 
160  // Used to control how the merge tolerance is interpreted.
161  // ABSOLUTE_TOLERANCE is a tolerance expressed in world coordinates;
162  // RELATIVE_TO_TOLERANCE is a tolerance relative to the projection
163  // tolerance; and RELATIVE_TO_MIN_EDGE_LENGTH is a tolerance relative
164  // to the minimum edge length of the tool/imprint mesh.
166  {
167  ABSOLUTE_TOLERANCE = 0,
168  RELATIVE_TO_PROJECTION_TOLERANCE = 1,
169  RELATIVE_TO_MIN_EDGE_LENGTH = 2
170  };
171 
173 
178  vtkSetClampMacro(MergeToleranceType, int, ABSOLUTE_TOLERANCE, RELATIVE_TO_MIN_EDGE_LENGTH);
179  vtkGetMacro(MergeToleranceType, int);
180  void SetMergeToleranceTypeToAbsolute() { this->SetMergeToleranceType(ABSOLUTE_TOLERANCE); }
182  {
183  this->SetMergeToleranceType(RELATIVE_TO_PROJECTION_TOLERANCE);
184  }
186  {
187  this->SetMergeToleranceType(RELATIVE_TO_MIN_EDGE_LENGTH);
188  }
189  vtkSetClampMacro(MergeTolerance, double, 0.0, VTK_FLOAT_MAX);
190  vtkGetMacro(MergeTolerance, double);
192 
194  {
195  TARGET_CELLS = 0,
196  IMPRINTED_CELLS = 1,
197  PROJECTED_IMPRINT = 2,
198  IMPRINTED_REGION = 3,
199  MERGED_IMPRINT = 5
200  };
201 
203 
216  vtkSetClampMacro(OutputType, int, TARGET_CELLS, MERGED_IMPRINT);
217  vtkGetMacro(OutputType, int);
218  void SetOutputTypeToTargetCells() { this->SetOutputType(TARGET_CELLS); }
219  void SetOutputTypeToImprintedCells() { this->SetOutputType(IMPRINTED_CELLS); }
220  void SetOutputTypeToProjectedImprint() { this->SetOutputType(PROJECTED_IMPRINT); }
221  void SetOutputTypeToImprintedRegion() { this->SetOutputType(IMPRINTED_REGION); }
222  void SetOutputTypeToMergedImprint() { this->SetOutputType(MERGED_IMPRINT); }
224 
226 
233  vtkSetMacro(BoundaryEdgeInsertion, bool);
234  vtkGetMacro(BoundaryEdgeInsertion, bool);
235  vtkBooleanMacro(BoundaryEdgeInsertion, bool);
237 
239 
243  vtkSetMacro(PassCellData, bool);
244  vtkGetMacro(PassCellData, bool);
245  vtkBooleanMacro(PassCellData, bool);
247 
249 
257  vtkSetMacro(PassPointData, bool);
258  vtkGetMacro(PassPointData, bool);
259  vtkBooleanMacro(PassPointData, bool);
261 
263  {
264  USE_TARGET_EDGES = 0,
265  USE_IMPRINT_EDGES = 1
266  };
267 
269 
274  vtkSetClampMacro(PointInterpolation, int, USE_TARGET_EDGES, USE_IMPRINT_EDGES);
275  vtkGetMacro(PointInterpolation, int);
276  void SetPointInterpolationToTargetEdges() { this->SetPointInterpolation(USE_TARGET_EDGES); }
277  void SetPointInterpolationToImprintEdges() { this->SetPointInterpolation(USE_IMPRINT_EDGES); }
279 
281  {
282  NO_DEBUG_OUTPUT = 0,
283  TRIANGULATION_INPUT = 1,
284  TRIANGULATION_OUTPUT = 2
285  };
286 
288 
295  vtkSetMacro(TriangulateOutput, bool);
296  vtkGetMacro(TriangulateOutput, bool);
297  vtkBooleanMacro(TriangulateOutput, bool);
299 
301 
309  vtkSetClampMacro(DebugOutputType, int, NO_DEBUG_OUTPUT, TRIANGULATION_OUTPUT);
310  vtkGetMacro(DebugOutputType, int);
311  void SetDebugOutputTypeToNoDebugOutput() { this->SetDebugOutputType(NO_DEBUG_OUTPUT); }
312  void SetDebugOutputTypeToTriangulationInput() { this->SetDebugOutputType(TRIANGULATION_INPUT); }
313  void SetDebugOutputTypeToTriangulationOutput() { this->SetDebugOutputType(TRIANGULATION_OUTPUT); }
314  vtkSetMacro(DebugCellId, vtkIdType);
315  vtkGetMacro(DebugCellId, vtkIdType);
317 
319 
323  vtkPolyData* GetDebugOutput();
325 
326 protected:
328  ~vtkImprintFilter() override;
329 
330  double Tolerance;
333  double ComputeMergeTolerance(vtkPolyData* pdata);
334 
338 
342 
345 
348 
349 private:
350  vtkImprintFilter(const vtkImprintFilter&) = delete;
351  void operator=(const vtkImprintFilter&) = delete;
352 };
353 
354 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void SetMergeToleranceTypeToMinEdge()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
void SetOutputTypeToProjectedImprint()
Control what is output by the filter.
void SetMergeToleranceTypeToRelativeToProjection()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
perform fast cell location operations
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
void SetOutputTypeToImprintedRegion()
Control what is output by the filter.
void SetOutputTypeToImprintedCells()
Control what is output by the filter.
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
void SetPointInterpolationToImprintEdges()
If PassPointData is on, indicate how new point data is to generated at the intersection points betwee...
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void SetPointInterpolationToTargetEdges()
If PassPointData is on, indicate how new point data is to generated at the intersection points betwee...
Imprint the contact surface of one object onto another surface.
void SetOutputTypeToMergedImprint()
Control what is output by the filter.
void SetDebugOutputTypeToNoDebugOutput()
The following methods support debugging.
Store zero or more vtkInformation instances.
void SetMergeToleranceTypeToAbsolute()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
void SetDebugOutputTypeToTriangulationOutput()
The following methods support debugging.
general representation of visualization data
Definition: vtkDataObject.h:65
void SetDebugOutputTypeToTriangulationInput()
The following methods support debugging.
void SetOutputTypeToTargetCells()
Control what is output by the filter.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.