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
83 #include "vtkPolyDataAlgorithm.h"
84 
86 
87 class VTKFILTERSMODELING_EXPORT vtkImprintFilter : public vtkPolyDataAlgorithm
88 {
89 public:
91 
94  static vtkImprintFilter* New();
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 
267 protected:
269  ~vtkImprintFilter() override;
270 
271  double Tolerance;
275 
279 
282 
285 
286 private:
287  vtkImprintFilter(const vtkImprintFilter&) = delete;
288  void operator=(const vtkImprintFilter&) = delete;
289 };
290 
291 #endif
vtkImprintFilter::MergeTolerance
double MergeTolerance
Definition: vtkImprintFilter.h:272
vtkImprintFilter::SetImprintData
void SetImprintData(vtkDataObject *imprint)
Specify the a second vtkPolyData input which defines the surface mesh with which to imprint the targe...
vtkImprintFilter::New
static vtkImprintFilter * New()
Standard methods to instantiate, print and provide type information.
vtkImprintFilter::GetImprint
vtkDataObject * GetImprint()
Specify the a second vtkPolyData input which defines the surface mesh with which to imprint the targe...
vtkImprintFilter::SetMergeToleranceTypeToAbsolute
void SetMergeToleranceTypeToAbsolute()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
Definition: vtkImprintFilter.h:163
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkImprintFilter::GetTarget
vtkDataObject * GetTarget()
Specify the first vtkPolyData input which defines the surface mesh to imprint (i.e....
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkImprintFilter::SetTargetData
void SetTargetData(vtkDataObject *target)
Specify the first vtkPolyData input which defines the surface mesh to imprint (i.e....
vtkImprintFilter::SetDebugOutputTypeToTriangulationInput
void SetDebugOutputTypeToTriangulationInput()
Indicate whether the output should be triangulated.
Definition: vtkImprintFilter.h:253
vtkImprintFilter::vtkImprintFilter
vtkImprintFilter()
vtkImprintFilter::MergeToleranceType
int MergeToleranceType
Definition: vtkImprintFilter.h:273
vtkImprintFilter::~vtkImprintFilter
~vtkImprintFilter() override
vtkImprintFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkImprintFilter::TriangulateOutput
bool TriangulateOutput
Definition: vtkImprintFilter.h:278
vtkPolyDataAlgorithm.h
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:1004
vtkImprintFilter::SetMergeToleranceTypeToMinEdge
void SetMergeToleranceTypeToMinEdge()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
Definition: vtkImprintFilter.h:168
vtkImprintFilter::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkImprintFilter::SetOutputTypeToProjectedImprint
void SetOutputTypeToProjectedImprint()
Control what is output by the filter.
Definition: vtkImprintFilter.h:203
vtkImprintFilter::SetDebugOutputTypeToTriangulationOutput
void SetDebugOutputTypeToTriangulationOutput()
Indicate whether the output should be triangulated.
Definition: vtkImprintFilter.h:254
vtkImprintFilter::DebugOutput
DebugOutput
Definition: vtkImprintFilter.h:222
vtkImprintFilter::SetTargetConnection
void SetTargetConnection(vtkAlgorithmOutput *algOutput)
Specify the first vtkPolyData input connection which defines the surface mesh to imprint (i....
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkImprintFilter::OutputType
int OutputType
Definition: vtkImprintFilter.h:276
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
vtkImprintFilter::SetMergeToleranceTypeToRelativeToProjection
void SetMergeToleranceTypeToRelativeToProjection()
Specify a tolerance which is used to determine whether two points are considered coincident to one an...
Definition: vtkImprintFilter.h:164
vtkImprintFilter::GetImprintConnection
vtkAlgorithmOutput * GetImprintConnection()
vtkImprintFilter::SetOutputTypeToTargetCells
void SetOutputTypeToTargetCells()
Control what is output by the filter.
Definition: vtkImprintFilter.h:201
vtkImprintFilter::SetOutputTypeToImprintedRegion
void SetOutputTypeToImprintedRegion()
Control what is output by the filter.
Definition: vtkImprintFilter.h:204
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkImprintFilter
Imprint the contact surface of one object onto another surface.
Definition: vtkImprintFilter.h:88
vtkImprintFilter::SetOutputTypeToImprintedCells
void SetOutputTypeToImprintedCells()
Control what is output by the filter.
Definition: vtkImprintFilter.h:202
vtkImprintFilter::Tolerance
double Tolerance
Definition: vtkImprintFilter.h:271
vtkImprintFilter::GetTargetConnection
vtkAlgorithmOutput * GetTargetConnection()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkImprintFilter::DebugCellId
vtkIdType DebugCellId
Definition: vtkImprintFilter.h:281
vtkImprintFilter::MergeTolType
MergeTolType
Definition: vtkImprintFilter.h:149
vtkImprintFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to instantiate, print and provide type information.
vtkImprintFilter::GetDebugOutput
vtkPolyData * GetDebugOutput()
Get the output data (in the second output, if the DebugOutput != NO_DEBUG_OUTPUT).
vtkImprintFilter::SetImprintConnection
void SetImprintConnection(vtkAlgorithmOutput *algOutput)
Specify the a second vtkPolyData input connection which defines the surface mesh with which to imprin...
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkImprintFilter::BoundaryEdgeInsertion
bool BoundaryEdgeInsertion
Definition: vtkImprintFilter.h:277
vtkImprintFilter::SetOutputTypeToMergedImprint
void SetOutputTypeToMergedImprint()
Control what is output by the filter.
Definition: vtkImprintFilter.h:205
vtkStaticCellLocator
perform fast cell location operations
Definition: vtkStaticCellLocator.h:51
vtkImprintFilter::ComputeMergeTolerance
double ComputeMergeTolerance(vtkPolyData *pdata)
vtkImprintFilter::SpecifiedOutput
SpecifiedOutput
Definition: vtkImprintFilter.h:177
vtkImprintFilter::SetDebugOutputTypeToNoDebugOutput
void SetDebugOutputTypeToNoDebugOutput()
Indicate whether the output should be triangulated.
Definition: vtkImprintFilter.h:252
vtkImprintFilter::DebugOutputType
int DebugOutputType
Definition: vtkImprintFilter.h:280
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151