VTK  9.3.0
vtkImprintFilter.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
84 #ifndef vtkImprintFilter_h
85 #define vtkImprintFilter_h
86 
87 #include "vtkFiltersModelingModule.h" // For export macro
88 #include "vtkPolyDataAlgorithm.h"
89 
90 VTK_ABI_NAMESPACE_BEGIN
92 
93 class VTKFILTERSMODELING_EXPORT vtkImprintFilter : public vtkPolyDataAlgorithm
94 {
95 public:
97 
102  void PrintSelf(ostream& os, vtkIndent indent) override;
104 
111 
113 
121 
129 
131 
138 
140 
145  vtkSetClampMacro(Tolerance, double, 0.0, VTK_FLOAT_MAX);
146  vtkGetMacro(Tolerance, double);
148 
149  // Used to control how the merge tolerance is interpreted.
150  // ABSOLUTE_TOLERANCE is a tolerance expressed in world coordinates;
151  // RELATIVE_TO_TOLERANCE is a tolerance relative to the projection
152  // tolerance; and RELATIVE_TO_MIN_EDGE_LENGTH is a tolerance relative
153  // to the minimum edge length of the tool/imprint mesh.
155  {
156  ABSOLUTE_TOLERANCE = 0,
157  RELATIVE_TO_PROJECTION_TOLERANCE = 1,
158  RELATIVE_TO_MIN_EDGE_LENGTH = 2
159  };
160 
162 
167  vtkSetClampMacro(MergeToleranceType, int, ABSOLUTE_TOLERANCE, RELATIVE_TO_MIN_EDGE_LENGTH);
168  vtkGetMacro(MergeToleranceType, int);
169  void SetMergeToleranceTypeToAbsolute() { this->SetMergeToleranceType(ABSOLUTE_TOLERANCE); }
171  {
172  this->SetMergeToleranceType(RELATIVE_TO_PROJECTION_TOLERANCE);
173  }
175  {
176  this->SetMergeToleranceType(RELATIVE_TO_MIN_EDGE_LENGTH);
177  }
178  vtkSetClampMacro(MergeTolerance, double, 0.0, VTK_FLOAT_MAX);
179  vtkGetMacro(MergeTolerance, double);
181 
183  {
184  TARGET_CELLS = 0,
185  IMPRINTED_CELLS = 1,
186  PROJECTED_IMPRINT = 2,
187  IMPRINTED_REGION = 3,
188  MERGED_IMPRINT = 5
189  };
190 
192 
205  vtkSetClampMacro(OutputType, int, TARGET_CELLS, MERGED_IMPRINT);
206  vtkGetMacro(OutputType, int);
207  void SetOutputTypeToTargetCells() { this->SetOutputType(TARGET_CELLS); }
208  void SetOutputTypeToImprintedCells() { this->SetOutputType(IMPRINTED_CELLS); }
209  void SetOutputTypeToProjectedImprint() { this->SetOutputType(PROJECTED_IMPRINT); }
210  void SetOutputTypeToImprintedRegion() { this->SetOutputType(IMPRINTED_REGION); }
211  void SetOutputTypeToMergedImprint() { this->SetOutputType(MERGED_IMPRINT); }
213 
215 
222  vtkSetMacro(BoundaryEdgeInsertion, bool);
223  vtkGetMacro(BoundaryEdgeInsertion, bool);
224  vtkBooleanMacro(BoundaryEdgeInsertion, bool);
226 
228 
232  vtkSetMacro(PassCellData, bool);
233  vtkGetMacro(PassCellData, bool);
234  vtkBooleanMacro(PassCellData, bool);
236 
238 
246  vtkSetMacro(PassPointData, bool);
247  vtkGetMacro(PassPointData, bool);
248  vtkBooleanMacro(PassPointData, bool);
250 
252  {
253  USE_TARGET_EDGES = 0,
254  USE_IMPRINT_EDGES = 1
255  };
256 
258 
263  vtkSetClampMacro(PointInterpolation, int, USE_TARGET_EDGES, USE_IMPRINT_EDGES);
264  vtkGetMacro(PointInterpolation, int);
265  void SetPointInterpolationToTargetEdges() { this->SetPointInterpolation(USE_TARGET_EDGES); }
266  void SetPointInterpolationToImprintEdges() { this->SetPointInterpolation(USE_IMPRINT_EDGES); }
268 
270  {
271  NO_DEBUG_OUTPUT = 0,
272  TRIANGULATION_INPUT = 1,
273  TRIANGULATION_OUTPUT = 2
274  };
275 
277 
284  vtkSetMacro(TriangulateOutput, bool);
285  vtkGetMacro(TriangulateOutput, bool);
286  vtkBooleanMacro(TriangulateOutput, bool);
288 
290 
298  vtkSetClampMacro(DebugOutputType, int, NO_DEBUG_OUTPUT, TRIANGULATION_OUTPUT);
299  vtkGetMacro(DebugOutputType, int);
300  void SetDebugOutputTypeToNoDebugOutput() { this->SetDebugOutputType(NO_DEBUG_OUTPUT); }
301  void SetDebugOutputTypeToTriangulationInput() { this->SetDebugOutputType(TRIANGULATION_INPUT); }
302  void SetDebugOutputTypeToTriangulationOutput() { this->SetDebugOutputType(TRIANGULATION_OUTPUT); }
303  vtkSetMacro(DebugCellId, vtkIdType);
304  vtkGetMacro(DebugCellId, vtkIdType);
306 
308 
314 
315 protected:
317  ~vtkImprintFilter() override;
318 
319  double Tolerance;
323 
327 
331 
334 
337 
338 private:
339  vtkImprintFilter(const vtkImprintFilter&) = delete;
340  void operator=(const vtkImprintFilter&) = delete;
341 };
342 
343 VTK_ABI_NAMESPACE_END
344 #endif
Proxy object to connect input/output ports.
general representation of visualization data
Definition: vtkDataObject.h:64
Imprint the contact surface of one object onto another surface.
void SetImprintData(vtkDataObject *imprint)
Specify the a second vtkPolyData input which defines the surface mesh with which to imprint the targe...
~vtkImprintFilter() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPolyData * GetDebugOutput()
Get the output data (in the second output, if the DebugOutput != NO_DEBUG_OUTPUT).
void SetPointInterpolationToImprintEdges()
If PassPointData is on, indicate how new point data is to generated at the intersection points betwee...
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataObject * GetTarget()
Specify the first vtkPolyData input which defines the surface mesh to imprint (i.e....
static vtkImprintFilter * New()
Standard methods to instantiate, print and provide type information.
void SetOutputTypeToTargetCells()
Control what is output by the filter.
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 SetMergeToleranceTypeToAbsolute()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
void SetDebugOutputTypeToNoDebugOutput()
The following methods support debugging.
void SetImprintConnection(vtkAlgorithmOutput *algOutput)
Specify the a second vtkPolyData input connection which defines the surface mesh with which to imprin...
void SetDebugOutputTypeToTriangulationOutput()
The following methods support debugging.
void SetDebugOutputTypeToTriangulationInput()
The following methods support debugging.
vtkAlgorithmOutput * GetImprintConnection()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to instantiate, print and provide type information.
vtkAlgorithmOutput * GetTargetConnection()
void SetMergeToleranceTypeToRelativeToProjection()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
vtkDataObject * GetImprint()
Specify the a second vtkPolyData input which defines the surface mesh with which to imprint the targe...
void SetOutputTypeToImprintedCells()
Control what is output by the filter.
void SetPointInterpolationToTargetEdges()
If PassPointData is on, indicate how new point data is to generated at the intersection points betwee...
void SetTargetData(vtkDataObject *target)
Specify the first vtkPolyData input which defines the surface mesh to imprint (i.e....
void SetOutputTypeToMergedImprint()
Control what is output by the filter.
void SetOutputTypeToImprintedRegion()
Control what is output by the filter.
double ComputeMergeTolerance(vtkPolyData *pdata)
void SetTargetConnection(vtkAlgorithmOutput *algOutput)
Specify the first vtkPolyData input connection which defines the surface mesh to imprint (i....
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
perform fast cell location operations
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition: vtkType.h:315
#define VTK_FLOAT_MAX
Definition: vtkType.h:152