VTK  9.1.0
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=========================================================================*/
79#ifndef vtkImprintFilter_h
80#define vtkImprintFilter_h
81
82#include "vtkFiltersModelingModule.h" // For export macro
84
86
87class VTKFILTERSMODELING_EXPORT vtkImprintFilter : public vtkPolyDataAlgorithm
88{
89public:
91
96 void PrintSelf(ostream& os, vtkIndent indent) override;
98
105
107
115
123
125
132
134
139 vtkSetClampMacro(Tolerance, double, 0.0, VTK_FLOAT_MAX);
140 vtkGetMacro(Tolerance, double);
142
143 // Used to control how the merge tolerance is interpreted.
144 // ABSOLUTE is a tolerance expressed in world coordinates;
145 // RELATIVE_TO_TOLERANCE is a tolerance relative to the projection
146 // tolerance; and RELATIVE_TO_MIN_EDGE_LENGTH is a tolerance relative
147 // to the minimum edge length of the tool/imprint mesh.
149 {
150 ABSOLUTE = 0,
151 RELATIVE_TO_PROJECTION_TOLERANCE = 1,
152 RELATIVE_TO_MIN_EDGE_LENGTH = 2
153 };
154
156
161 vtkSetClampMacro(MergeToleranceType, int, ABSOLUTE, RELATIVE_TO_MIN_EDGE_LENGTH);
162 vtkGetMacro(MergeToleranceType, int);
163 void SetMergeToleranceTypeToAbsolute() { this->SetMergeToleranceType(ABSOLUTE); }
165 {
166 this->SetMergeToleranceType(RELATIVE_TO_PROJECTION_TOLERANCE);
167 }
169 {
170 this->SetMergeToleranceType(RELATIVE_TO_MIN_EDGE_LENGTH);
171 }
172 vtkSetClampMacro(MergeTolerance, double, 0.0, VTK_FLOAT_MAX);
173 vtkGetMacro(MergeTolerance, double);
175
177 {
178 TARGET_CELLS = 0,
179 IMPRINTED_CELLS = 1,
180 PROJECTED_IMPRINT = 2,
181 IMPRINTED_REGION = 3,
182 MERGED_IMPRINT = 5
183 };
184
186
199 vtkSetClampMacro(OutputType, int, TARGET_CELLS, MERGED_IMPRINT);
200 vtkGetMacro(OutputType, int);
201 void SetOutputTypeToTargetCells() { this->SetOutputType(TARGET_CELLS); }
202 void SetOutputTypeToImprintedCells() { this->SetOutputType(IMPRINTED_CELLS); }
203 void SetOutputTypeToProjectedImprint() { this->SetOutputType(PROJECTED_IMPRINT); }
204 void SetOutputTypeToImprintedRegion() { this->SetOutputType(IMPRINTED_REGION); }
205 void SetOutputTypeToMergedImprint() { this->SetOutputType(MERGED_IMPRINT); }
207
209
216 vtkSetMacro(BoundaryEdgeInsertion, bool);
217 vtkGetMacro(BoundaryEdgeInsertion, bool);
218 vtkBooleanMacro(BoundaryEdgeInsertion, bool);
220
222 {
223 NO_DEBUG_OUTPUT = 0,
224 TRIANGULATION_INPUT = 1,
225 TRIANGULATION_OUTPUT = 2
226 };
227
229
236 vtkSetMacro(TriangulateOutput, bool);
237 vtkGetMacro(TriangulateOutput, bool);
238 vtkBooleanMacro(TriangulateOutput, bool);
240
242
250 vtkSetClampMacro(DebugOutputType, int, NO_DEBUG_OUTPUT, TRIANGULATION_OUTPUT);
251 vtkGetMacro(DebugOutputType, int);
252 void SetDebugOutputTypeToNoDebugOutput() { this->SetDebugOutputType(NO_DEBUG_OUTPUT); }
253 void SetDebugOutputTypeToTriangulationInput() { this->SetDebugOutputType(TRIANGULATION_INPUT); }
254 void SetDebugOutputTypeToTriangulationOutput() { this->SetDebugOutputType(TRIANGULATION_OUTPUT); }
255 vtkSetMacro(DebugCellId, vtkIdType);
256 vtkGetMacro(DebugCellId, vtkIdType);
258
260
266
267protected:
270
271 double Tolerance;
275
279
282
285
286private:
287 vtkImprintFilter(const vtkImprintFilter&) = delete;
288 void operator=(const vtkImprintFilter&) = delete;
289};
290
291#endif
Proxy object to connect input/output ports.
general representation of visualization data
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.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataObject * GetImprint()
Specify the a second vtkPolyData input which defines the surface mesh with which to imprint the targe...
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()
Indicate whether the output should be triangulated.
void SetImprintConnection(vtkAlgorithmOutput *algOutput)
Specify the a second vtkPolyData input connection which defines the surface mesh with which to imprin...
void SetDebugOutputTypeToTriangulationOutput()
Indicate whether the output should be triangulated.
void SetDebugOutputTypeToTriangulationInput()
Indicate whether the output should be triangulated.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to instantiate, print and provide type information.
vtkPolyData * GetDebugOutput()
Get the output data (in the second output, if the DebugOutput != NO_DEBUG_OUTPUT).
void SetMergeToleranceTypeToRelativeToProjection()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
void SetOutputTypeToImprintedCells()
Control what is output by the filter.
vtkDataObject * GetTarget()
Specify the first vtkPolyData input which defines the surface mesh to imprint (i.e....
void SetTargetData(vtkDataObject *target)
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.
vtkAlgorithmOutput * GetImprintConnection()
vtkAlgorithmOutput * GetTargetConnection()
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:113
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:195
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:332
#define VTK_FLOAT_MAX
Definition: vtkType.h:163