VMTK
Loading...
Searching...
No Matches
vtkvmtkTetGenWrapper Class Reference

Wrapped tetgen volumetric meshing utility. More...

#include <vtkvmtkTetGenWrapper.h>

Inheritance diagram for vtkvmtkTetGenWrapper:
[legend]
Collaboration diagram for vtkvmtkTetGenWrapper:
[legend]

Public Types

typedef vtkUnstructuredGridAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkTetGenWrapper * NewInstance () const
void PrintSelf (std::ostream &os, vtkIndent indent) override
virtual void SetLastRunExitStatus (int)
virtual void SetPLC (int)
virtual int GetPLC ()
virtual void PLCOn ()
virtual void PLCOff ()
virtual void SetRefine (int)
virtual int GetRefine ()
virtual void RefineOn ()
virtual void RefineOff ()
virtual void SetCoarsen (int)
virtual int GetCoarsen ()
virtual void CoarsenOn ()
virtual void CoarsenOff ()
virtual void SetNoBoundarySplit (int)
virtual int GetNoBoundarySplit ()
virtual void NoBoundarySplitOn ()
virtual void NoBoundarySplitOff ()
virtual void SetQuality (int)
virtual int GetQuality ()
virtual void QualityOn ()
virtual void QualityOff ()
virtual void SetMinRatio (double)
virtual double GetMinRatio ()
virtual void SetVarVolume (int)
virtual int GetVarVolume ()
virtual void VarVolumeOn ()
virtual void VarVolumeOff ()
virtual void SetFixedVolume (int)
virtual int GetFixedVolume ()
virtual void FixedVolumeOn ()
virtual void FixedVolumeOff ()
virtual void SetMaxVolume (double)
virtual double GetMaxVolume ()
virtual void SetRemoveSliver (int)
virtual int GetRemoveSliver ()
virtual void RemoveSliverOn ()
virtual void RemoveSliverOff ()
virtual void SetMaxDihedral (double)
virtual double GetMaxDihedral ()
virtual void SetMinDihedral (double)
virtual double GetMinDihedral ()
virtual void SetRegionAttrib (int)
virtual int GetRegionAttrib ()
virtual void RegionAttribOn ()
virtual void RegionAttribOff ()
virtual void SetEpsilon (double)
virtual double GetEpsilon ()
virtual void SetNoMerge (int)
virtual int GetNoMerge ()
virtual void NoMergeOn ()
virtual void NoMergeOff ()
virtual void SetDetectInter (int)
virtual int GetDetectInter ()
virtual void DetectInterOn ()
virtual void DetectInterOff ()
virtual void SetCheckClosure (int)
virtual int GetCheckClosure ()
virtual void CheckClosureOn ()
virtual void CheckClosureOff ()
virtual void SetOrder (int)
virtual int GetOrder ()
virtual void SetDoCheck (int)
virtual int GetDoCheck ()
virtual void DoCheckOn ()
virtual void DoCheckOff ()
virtual void SetVerbose (int)
virtual int GetVerbose ()
virtual void VerboseOn ()
virtual void VerboseOff ()
virtual void SetCellEntityIdsArrayName (const char *)
virtual char * GetCellEntityIdsArrayName ()
virtual void SetTetrahedronVolumeArrayName (const char *)
virtual char * GetTetrahedronVolumeArrayName ()
virtual void SetSizingFunctionArrayName (const char *)
virtual char * GetSizingFunctionArrayName ()
virtual void SetOutputSurfaceElements (int)
virtual int GetOutputSurfaceElements ()
virtual void OutputSurfaceElementsOn ()
virtual void OutputSurfaceElementsOff ()
virtual void SetOutputVolumeElements (int)
virtual int GetOutputVolumeElements ()
virtual void OutputVolumeElementsOn ()
virtual void OutputVolumeElementsOff ()
virtual void SetUseSizingFunction (int)
virtual int GetUseSizingFunction ()
virtual void UseSizingFunctionOn ()
virtual void UseSizingFunctionOff ()

Static Public Member Functions

static vtkvmtkTetGenWrapper * New ()
static int IsTypeOf (const char *type)
static vtkvmtkTetGenWrapper * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkTetGenWrapper ()
 ~vtkvmtkTetGenWrapper ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override

Protected Attributes

int PLC
int Refine
int Coarsen
int NoBoundarySplit
int Quality
double MinRatio
int VarVolume
int FixedVolume
double MaxVolume
int RemoveSliver
double MinDihedral
double MaxDihedral
int RegionAttrib
double Epsilon
int NoMerge
int DetectInter
int CheckClosure
int Order
int DoCheck
int Verbose
int UseSizingFunction
int LastRunExitStatus
char * CellEntityIdsArrayName
char * TetrahedronVolumeArrayName
char * SizingFunctionArrayName
int OutputSurfaceElements
int OutputVolumeElements

Detailed Description

Wrapped tetgen volumetric meshing utility.

Wraps Hang Si's TetGen library to Delaunay-tetrahedralize a piecewise linear complex (a closed, possibly multi-region surface, when PLC is on) into a volumetric mesh, or to refine/coarsen an existing tetrahedral mesh. Most properties of this class correspond directly to a TetGen command-line switch (noted per property below); see the TetGen manual for full details of the underlying algorithm. This is the filter behind the vmtkmeshgenerator pype script.

See also
vtkvmtkPolyDataSizingFunction

Definition at line 38 of file vtkvmtkTetGenWrapper.h.

Member Typedef Documentation

◆ Superclass

typedef vtkUnstructuredGridAlgorithm vtkvmtkTetGenWrapper::Superclass

Definition at line 42 of file vtkvmtkTetGenWrapper.h.

Constructor & Destructor Documentation

◆ vtkvmtkTetGenWrapper()

vtkvmtkTetGenWrapper::vtkvmtkTetGenWrapper ( )
protected

Definition at line 40 of file vtkvmtkTetGenWrapper.cxx.

41{
42 this->PLC = 0; // -p switch, 0
43 this->Refine = 0; // -r switch, 0
44 this->Coarsen = 0; // -R switch, 0
45 this->Quality = 0; // -q switch, 0
46 this->NoBoundarySplit = 0; // -Y switch, 0
47 this->VarVolume = 0; // -a switch without number, 0
48 this->FixedVolume = 0; // -a switch with number, 0
49 this->MaxVolume = -1.0; // number after -a, -1.0
50 this->RemoveSliver = 0; // -s switch, 0
51 this->MinRatio = 2.0; // number after -q, 2.0
52 this->MinDihedral = 5.0; // number after -qq, 5.0
53 this->MaxDihedral = 165.0; // number after -qqq, 165.0
54 this->RegionAttrib = 0; // -A switch, 0
55 this->Epsilon = 1.0e-8; // number after -T switch, 1.0e-8
56 this->NoMerge = 0; // -M switch, 0
57 this->DetectInter = 0; // -d switch, 0
58 this->CheckClosure = 0; // -c switch, 0
59 this->Order = 1; // number after -o switch, 1 (e.g. -o2 for quadratic elements)
60 this->DoCheck = 0; // -C switch, 0
61 this->UseSizingFunction = 0; // -m switch, 0
62
63 this->Verbose = 0;
64
65 this->CellEntityIdsArrayName = NULL;
66 this->TetrahedronVolumeArrayName = NULL;
67 this->SizingFunctionArrayName = NULL;
68
69 this->OutputSurfaceElements = 1;
70 this->OutputVolumeElements = 1;
71
72 this->LastRunExitStatus = -1;
73}

◆ ~vtkvmtkTetGenWrapper()

vtkvmtkTetGenWrapper::~vtkvmtkTetGenWrapper ( )
protected

Definition at line 75 of file vtkvmtkTetGenWrapper.cxx.

76{
77 if (this->CellEntityIdsArrayName)
78 {
79 delete[] this->CellEntityIdsArrayName;
80 this->CellEntityIdsArrayName = NULL;
81 }
82
84 {
85 delete[] this->TetrahedronVolumeArrayName;
86 this->TetrahedronVolumeArrayName = NULL;
87 }
88
90 {
91 delete[] this->SizingFunctionArrayName;
92 this->SizingFunctionArrayName = NULL;
93 }
94}

Member Function Documentation

◆ New()

vtkvmtkTetGenWrapper * vtkvmtkTetGenWrapper::New ( )
static

◆ IsTypeOf()

int vtkvmtkTetGenWrapper::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkTetGenWrapper::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkvmtkTetGenWrapper * vtkvmtkTetGenWrapper::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkTetGenWrapper::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkTetGenWrapper * vtkvmtkTetGenWrapper::NewInstance ( ) const

◆ PrintSelf()

void vtkvmtkTetGenWrapper::PrintSelf ( std::ostream & os,
vtkIndent indent )
override

Definition at line 614 of file vtkvmtkTetGenWrapper.cxx.

615{
616 this->Superclass::PrintSelf(os,indent);
617}

◆ SetPLC()

virtual void vtkvmtkTetGenWrapper::SetPLC ( int )
virtual

Toggle tetrahedralizing the input as a piecewise linear complex (TetGen "-p" switch): treat the input surface as the boundary of the volume(s) to mesh, rather than as a point cloud. Default: off.

◆ GetPLC()

virtual int vtkvmtkTetGenWrapper::GetPLC ( )
virtual

Toggle tetrahedralizing the input as a piecewise linear complex (TetGen "-p" switch): treat the input surface as the boundary of the volume(s) to mesh, rather than as a point cloud. Default: off.

◆ PLCOn()

virtual void vtkvmtkTetGenWrapper::PLCOn ( )
virtual

Toggle tetrahedralizing the input as a piecewise linear complex (TetGen "-p" switch): treat the input surface as the boundary of the volume(s) to mesh, rather than as a point cloud. Default: off.

◆ PLCOff()

virtual void vtkvmtkTetGenWrapper::PLCOff ( )
virtual

Toggle tetrahedralizing the input as a piecewise linear complex (TetGen "-p" switch): treat the input surface as the boundary of the volume(s) to mesh, rather than as a point cloud. Default: off.

◆ SetRefine()

virtual void vtkvmtkTetGenWrapper::SetRefine ( int )
virtual

Toggle refining a previously generated tetrahedral mesh (TetGen "-r" switch). Default: off.

◆ GetRefine()

virtual int vtkvmtkTetGenWrapper::GetRefine ( )
virtual

Toggle refining a previously generated tetrahedral mesh (TetGen "-r" switch). Default: off.

◆ RefineOn()

virtual void vtkvmtkTetGenWrapper::RefineOn ( )
virtual

Toggle refining a previously generated tetrahedral mesh (TetGen "-r" switch). Default: off.

◆ RefineOff()

virtual void vtkvmtkTetGenWrapper::RefineOff ( )
virtual

Toggle refining a previously generated tetrahedral mesh (TetGen "-r" switch). Default: off.

◆ SetCoarsen()

virtual void vtkvmtkTetGenWrapper::SetCoarsen ( int )
virtual

Toggle coarsening a previously generated tetrahedral mesh (TetGen "-R" switch). Default: off.

◆ GetCoarsen()

virtual int vtkvmtkTetGenWrapper::GetCoarsen ( )
virtual

Toggle coarsening a previously generated tetrahedral mesh (TetGen "-R" switch). Default: off.

◆ CoarsenOn()

virtual void vtkvmtkTetGenWrapper::CoarsenOn ( )
virtual

Toggle coarsening a previously generated tetrahedral mesh (TetGen "-R" switch). Default: off.

◆ CoarsenOff()

virtual void vtkvmtkTetGenWrapper::CoarsenOff ( )
virtual

Toggle coarsening a previously generated tetrahedral mesh (TetGen "-R" switch). Default: off.

◆ SetNoBoundarySplit()

virtual void vtkvmtkTetGenWrapper::SetNoBoundarySplit ( int )
virtual

Toggle suppressing splitting of input boundary facets/segments (TetGen "-Y" switch), preserving the input surface mesh exactly in the output. Default: off.

◆ GetNoBoundarySplit()

virtual int vtkvmtkTetGenWrapper::GetNoBoundarySplit ( )
virtual

Toggle suppressing splitting of input boundary facets/segments (TetGen "-Y" switch), preserving the input surface mesh exactly in the output. Default: off.

◆ NoBoundarySplitOn()

virtual void vtkvmtkTetGenWrapper::NoBoundarySplitOn ( )
virtual

Toggle suppressing splitting of input boundary facets/segments (TetGen "-Y" switch), preserving the input surface mesh exactly in the output. Default: off.

◆ NoBoundarySplitOff()

virtual void vtkvmtkTetGenWrapper::NoBoundarySplitOff ( )
virtual

Toggle suppressing splitting of input boundary facets/segments (TetGen "-Y" switch), preserving the input surface mesh exactly in the output. Default: off.

◆ SetQuality()

virtual void vtkvmtkTetGenWrapper::SetQuality ( int )
virtual

Toggle quality mesh generation (TetGen "-q" switch), refining the mesh to satisfy the MinRatio (and, if RemoveSliver is on, MinDihedral/MaxDihedral) constraints. Default: off.

◆ GetQuality()

virtual int vtkvmtkTetGenWrapper::GetQuality ( )
virtual

Toggle quality mesh generation (TetGen "-q" switch), refining the mesh to satisfy the MinRatio (and, if RemoveSliver is on, MinDihedral/MaxDihedral) constraints. Default: off.

◆ QualityOn()

virtual void vtkvmtkTetGenWrapper::QualityOn ( )
virtual

Toggle quality mesh generation (TetGen "-q" switch), refining the mesh to satisfy the MinRatio (and, if RemoveSliver is on, MinDihedral/MaxDihedral) constraints. Default: off.

◆ QualityOff()

virtual void vtkvmtkTetGenWrapper::QualityOff ( )
virtual

Toggle quality mesh generation (TetGen "-q" switch), refining the mesh to satisfy the MinRatio (and, if RemoveSliver is on, MinDihedral/MaxDihedral) constraints. Default: off.

◆ SetMinRatio()

virtual void vtkvmtkTetGenWrapper::SetMinRatio ( double )
virtual

Set/Get the maximum allowed radius-edge ratio of tetrahedra when Quality is on (number after the TetGen "-q" switch). Default: 2.0.

◆ GetMinRatio()

virtual double vtkvmtkTetGenWrapper::GetMinRatio ( )
virtual

Set/Get the maximum allowed radius-edge ratio of tetrahedra when Quality is on (number after the TetGen "-q" switch). Default: 2.0.

◆ SetVarVolume()

virtual void vtkvmtkTetGenWrapper::SetVarVolume ( int )
virtual

Toggle variable (mesh-size-driven) maximum tetrahedron volume constraint (TetGen "-a" switch without a following number, using a sizing function – see UseSizingFunction/ SizingFunctionArrayName). Default: off.

◆ GetVarVolume()

virtual int vtkvmtkTetGenWrapper::GetVarVolume ( )
virtual

Toggle variable (mesh-size-driven) maximum tetrahedron volume constraint (TetGen "-a" switch without a following number, using a sizing function – see UseSizingFunction/ SizingFunctionArrayName). Default: off.

◆ VarVolumeOn()

virtual void vtkvmtkTetGenWrapper::VarVolumeOn ( )
virtual

Toggle variable (mesh-size-driven) maximum tetrahedron volume constraint (TetGen "-a" switch without a following number, using a sizing function – see UseSizingFunction/ SizingFunctionArrayName). Default: off.

◆ VarVolumeOff()

virtual void vtkvmtkTetGenWrapper::VarVolumeOff ( )
virtual

Toggle variable (mesh-size-driven) maximum tetrahedron volume constraint (TetGen "-a" switch without a following number, using a sizing function – see UseSizingFunction/ SizingFunctionArrayName). Default: off.

◆ SetFixedVolume()

virtual void vtkvmtkTetGenWrapper::SetFixedVolume ( int )
virtual

Toggle a fixed maximum tetrahedron volume constraint of MaxVolume (TetGen "-a" switch with a following number). Default: off.

◆ GetFixedVolume()

virtual int vtkvmtkTetGenWrapper::GetFixedVolume ( )
virtual

Toggle a fixed maximum tetrahedron volume constraint of MaxVolume (TetGen "-a" switch with a following number). Default: off.

◆ FixedVolumeOn()

virtual void vtkvmtkTetGenWrapper::FixedVolumeOn ( )
virtual

Toggle a fixed maximum tetrahedron volume constraint of MaxVolume (TetGen "-a" switch with a following number). Default: off.

◆ FixedVolumeOff()

virtual void vtkvmtkTetGenWrapper::FixedVolumeOff ( )
virtual

Toggle a fixed maximum tetrahedron volume constraint of MaxVolume (TetGen "-a" switch with a following number). Default: off.

◆ SetMaxVolume()

virtual void vtkvmtkTetGenWrapper::SetMaxVolume ( double )
virtual

Set/Get the maximum tetrahedron volume enforced when FixedVolume is on (number after the TetGen "-a" switch). Default: -1.0 (unset).

◆ GetMaxVolume()

virtual double vtkvmtkTetGenWrapper::GetMaxVolume ( )
virtual

Set/Get the maximum tetrahedron volume enforced when FixedVolume is on (number after the TetGen "-a" switch). Default: -1.0 (unset).

◆ SetRemoveSliver()

virtual void vtkvmtkTetGenWrapper::SetRemoveSliver ( int )
virtual

Toggle a post-processing pass (TetGen "-s" switch) that removes sliver tetrahedra whose dihedral angles fall outside [MinDihedral, MaxDihedral]. Default: off.

◆ GetRemoveSliver()

virtual int vtkvmtkTetGenWrapper::GetRemoveSliver ( )
virtual

Toggle a post-processing pass (TetGen "-s" switch) that removes sliver tetrahedra whose dihedral angles fall outside [MinDihedral, MaxDihedral]. Default: off.

◆ RemoveSliverOn()

virtual void vtkvmtkTetGenWrapper::RemoveSliverOn ( )
virtual

Toggle a post-processing pass (TetGen "-s" switch) that removes sliver tetrahedra whose dihedral angles fall outside [MinDihedral, MaxDihedral]. Default: off.

◆ RemoveSliverOff()

virtual void vtkvmtkTetGenWrapper::RemoveSliverOff ( )
virtual

Toggle a post-processing pass (TetGen "-s" switch) that removes sliver tetrahedra whose dihedral angles fall outside [MinDihedral, MaxDihedral]. Default: off.

◆ SetMaxDihedral()

virtual void vtkvmtkTetGenWrapper::SetMaxDihedral ( double )
virtual

Set/Get the maximum acceptable dihedral angle (in degrees) for sliver removal when RemoveSliver is on (number after "-qqq"). Default: 165.0.

◆ GetMaxDihedral()

virtual double vtkvmtkTetGenWrapper::GetMaxDihedral ( )
virtual

Set/Get the maximum acceptable dihedral angle (in degrees) for sliver removal when RemoveSliver is on (number after "-qqq"). Default: 165.0.

◆ SetMinDihedral()

virtual void vtkvmtkTetGenWrapper::SetMinDihedral ( double )
virtual

Set/Get the minimum acceptable dihedral angle (in degrees) for sliver removal when RemoveSliver is on (number after "-qq"). Default: 5.0.

◆ GetMinDihedral()

virtual double vtkvmtkTetGenWrapper::GetMinDihedral ( )
virtual

Set/Get the minimum acceptable dihedral angle (in degrees) for sliver removal when RemoveSliver is on (number after "-qq"). Default: 5.0.

◆ SetRegionAttrib()

virtual void vtkvmtkTetGenWrapper::SetRegionAttrib ( int )
virtual

Toggle assigning region attributes to tetrahedra (TetGen "-A" switch), tagging each tetrahedron with the id of the closed sub-region (bounded by distinct facet markers) it belongs to. Default: off.

◆ GetRegionAttrib()

virtual int vtkvmtkTetGenWrapper::GetRegionAttrib ( )
virtual

Toggle assigning region attributes to tetrahedra (TetGen "-A" switch), tagging each tetrahedron with the id of the closed sub-region (bounded by distinct facet markers) it belongs to. Default: off.

◆ RegionAttribOn()

virtual void vtkvmtkTetGenWrapper::RegionAttribOn ( )
virtual

Toggle assigning region attributes to tetrahedra (TetGen "-A" switch), tagging each tetrahedron with the id of the closed sub-region (bounded by distinct facet markers) it belongs to. Default: off.

◆ RegionAttribOff()

virtual void vtkvmtkTetGenWrapper::RegionAttribOff ( )
virtual

Toggle assigning region attributes to tetrahedra (TetGen "-A" switch), tagging each tetrahedron with the id of the closed sub-region (bounded by distinct facet markers) it belongs to. Default: off.

◆ SetEpsilon()

virtual void vtkvmtkTetGenWrapper::SetEpsilon ( double )
virtual

Set/Get the coplanar/collinear tolerance used by TetGen's geometric predicates (number after the "-T" switch). Default: 1.0e-8.

◆ GetEpsilon()

virtual double vtkvmtkTetGenWrapper::GetEpsilon ( )
virtual

Set/Get the coplanar/collinear tolerance used by TetGen's geometric predicates (number after the "-T" switch). Default: 1.0e-8.

◆ SetNoMerge()

virtual void vtkvmtkTetGenWrapper::SetNoMerge ( int )
virtual

Toggle suppressing merging of coplanar facets (TetGen "-M" switch). Default: off.

◆ GetNoMerge()

virtual int vtkvmtkTetGenWrapper::GetNoMerge ( )
virtual

Toggle suppressing merging of coplanar facets (TetGen "-M" switch). Default: off.

◆ NoMergeOn()

virtual void vtkvmtkTetGenWrapper::NoMergeOn ( )
virtual

Toggle suppressing merging of coplanar facets (TetGen "-M" switch). Default: off.

◆ NoMergeOff()

virtual void vtkvmtkTetGenWrapper::NoMergeOff ( )
virtual

Toggle suppressing merging of coplanar facets (TetGen "-M" switch). Default: off.

◆ SetDetectInter()

virtual void vtkvmtkTetGenWrapper::SetDetectInter ( int )
virtual

Toggle detecting (rather than avoiding) self-intersections of the input facets (TetGen "-d" switch), useful for diagnosing a non-manifold/self-intersecting input surface. Default: off.

◆ GetDetectInter()

virtual int vtkvmtkTetGenWrapper::GetDetectInter ( )
virtual

Toggle detecting (rather than avoiding) self-intersections of the input facets (TetGen "-d" switch), useful for diagnosing a non-manifold/self-intersecting input surface. Default: off.

◆ DetectInterOn()

virtual void vtkvmtkTetGenWrapper::DetectInterOn ( )
virtual

Toggle detecting (rather than avoiding) self-intersections of the input facets (TetGen "-d" switch), useful for diagnosing a non-manifold/self-intersecting input surface. Default: off.

◆ DetectInterOff()

virtual void vtkvmtkTetGenWrapper::DetectInterOff ( )
virtual

Toggle detecting (rather than avoiding) self-intersections of the input facets (TetGen "-d" switch), useful for diagnosing a non-manifold/self-intersecting input surface. Default: off.

◆ SetCheckClosure()

virtual void vtkvmtkTetGenWrapper::SetCheckClosure ( int )
virtual

Toggle checking whether the input surface forms a valid closed piecewise linear complex (TetGen "-c" switch) before meshing. Default: off.

◆ GetCheckClosure()

virtual int vtkvmtkTetGenWrapper::GetCheckClosure ( )
virtual

Toggle checking whether the input surface forms a valid closed piecewise linear complex (TetGen "-c" switch) before meshing. Default: off.

◆ CheckClosureOn()

virtual void vtkvmtkTetGenWrapper::CheckClosureOn ( )
virtual

Toggle checking whether the input surface forms a valid closed piecewise linear complex (TetGen "-c" switch) before meshing. Default: off.

◆ CheckClosureOff()

virtual void vtkvmtkTetGenWrapper::CheckClosureOff ( )
virtual

Toggle checking whether the input surface forms a valid closed piecewise linear complex (TetGen "-c" switch) before meshing. Default: off.

◆ SetOrder()

virtual void vtkvmtkTetGenWrapper::SetOrder ( int )
virtual

Set/Get the element order (number after the TetGen "-o" switch): 1 for linear tetrahedra (default), 2 for quadratic (10-node) tetrahedra.

◆ GetOrder()

virtual int vtkvmtkTetGenWrapper::GetOrder ( )
virtual

Set/Get the element order (number after the TetGen "-o" switch): 1 for linear tetrahedra (default), 2 for quadratic (10-node) tetrahedra.

◆ SetDoCheck()

virtual void vtkvmtkTetGenWrapper::SetDoCheck ( int )
virtual

Toggle having TetGen check the consistency of the final mesh (TetGen "-C" switch) after generation. Default: off.

◆ GetDoCheck()

virtual int vtkvmtkTetGenWrapper::GetDoCheck ( )
virtual

Toggle having TetGen check the consistency of the final mesh (TetGen "-C" switch) after generation. Default: off.

◆ DoCheckOn()

virtual void vtkvmtkTetGenWrapper::DoCheckOn ( )
virtual

Toggle having TetGen check the consistency of the final mesh (TetGen "-C" switch) after generation. Default: off.

◆ DoCheckOff()

virtual void vtkvmtkTetGenWrapper::DoCheckOff ( )
virtual

Toggle having TetGen check the consistency of the final mesh (TetGen "-C" switch) after generation. Default: off.

◆ SetVerbose()

virtual void vtkvmtkTetGenWrapper::SetVerbose ( int )
virtual

Toggle verbose TetGen console output (TetGen "-V" switch). Default: off.

◆ GetVerbose()

virtual int vtkvmtkTetGenWrapper::GetVerbose ( )
virtual

Toggle verbose TetGen console output (TetGen "-V" switch). Default: off.

◆ VerboseOn()

virtual void vtkvmtkTetGenWrapper::VerboseOn ( )
virtual

Toggle verbose TetGen console output (TetGen "-V" switch). Default: off.

◆ VerboseOff()

virtual void vtkvmtkTetGenWrapper::VerboseOff ( )
virtual

Toggle verbose TetGen console output (TetGen "-V" switch). Default: off.

◆ SetCellEntityIdsArrayName()

virtual void vtkvmtkTetGenWrapper::SetCellEntityIdsArrayName ( const char * )
virtual

Set/Get the name of the cell data array where the region/boundary marker of each output cell (as assigned via RegionAttrib and/or the input surface's own markers) is stored. Commonly named "CellEntityIds".

◆ GetCellEntityIdsArrayName()

virtual char * vtkvmtkTetGenWrapper::GetCellEntityIdsArrayName ( )
virtual

Set/Get the name of the cell data array where the region/boundary marker of each output cell (as assigned via RegionAttrib and/or the input surface's own markers) is stored. Commonly named "CellEntityIds".

◆ SetTetrahedronVolumeArrayName()

virtual void vtkvmtkTetGenWrapper::SetTetrahedronVolumeArrayName ( const char * )
virtual

Set/Get the name of the output cell data array where the volume of each output tetrahedron is stored. Commonly named "TetrahedronVolume".

◆ GetTetrahedronVolumeArrayName()

virtual char * vtkvmtkTetGenWrapper::GetTetrahedronVolumeArrayName ( )
virtual

Set/Get the name of the output cell data array where the volume of each output tetrahedron is stored. Commonly named "TetrahedronVolume".

◆ SetSizingFunctionArrayName()

virtual void vtkvmtkTetGenWrapper::SetSizingFunctionArrayName ( const char * )
virtual

Set/Get the name of the point data array of the input surface holding the desired local mesh size (target tetrahedron edge length/volume) at each point, used when UseSizingFunction (and VarVolume) are on. See vtkvmtkPolyDataSizingFunction. Commonly named "VolumeSizingFunction".

◆ GetSizingFunctionArrayName()

virtual char * vtkvmtkTetGenWrapper::GetSizingFunctionArrayName ( )
virtual

Set/Get the name of the point data array of the input surface holding the desired local mesh size (target tetrahedron edge length/volume) at each point, used when UseSizingFunction (and VarVolume) are on. See vtkvmtkPolyDataSizingFunction. Commonly named "VolumeSizingFunction".

◆ SetOutputSurfaceElements()

virtual void vtkvmtkTetGenWrapper::SetOutputSurfaceElements ( int )
virtual

Toggle including the boundary (surface) triangles in the output mesh, in addition to the volumetric tetrahedra. Default: on.

◆ GetOutputSurfaceElements()

virtual int vtkvmtkTetGenWrapper::GetOutputSurfaceElements ( )
virtual

Toggle including the boundary (surface) triangles in the output mesh, in addition to the volumetric tetrahedra. Default: on.

◆ OutputSurfaceElementsOn()

virtual void vtkvmtkTetGenWrapper::OutputSurfaceElementsOn ( )
virtual

Toggle including the boundary (surface) triangles in the output mesh, in addition to the volumetric tetrahedra. Default: on.

◆ OutputSurfaceElementsOff()

virtual void vtkvmtkTetGenWrapper::OutputSurfaceElementsOff ( )
virtual

Toggle including the boundary (surface) triangles in the output mesh, in addition to the volumetric tetrahedra. Default: on.

◆ SetOutputVolumeElements()

virtual void vtkvmtkTetGenWrapper::SetOutputVolumeElements ( int )
virtual

Toggle including the volumetric tetrahedra in the output mesh. Default: on.

◆ GetOutputVolumeElements()

virtual int vtkvmtkTetGenWrapper::GetOutputVolumeElements ( )
virtual

Toggle including the volumetric tetrahedra in the output mesh. Default: on.

◆ OutputVolumeElementsOn()

virtual void vtkvmtkTetGenWrapper::OutputVolumeElementsOn ( )
virtual

Toggle including the volumetric tetrahedra in the output mesh. Default: on.

◆ OutputVolumeElementsOff()

virtual void vtkvmtkTetGenWrapper::OutputVolumeElementsOff ( )
virtual

Toggle including the volumetric tetrahedra in the output mesh. Default: on.

◆ SetUseSizingFunction()

virtual void vtkvmtkTetGenWrapper::SetUseSizingFunction ( int )
virtual

Toggle using the per-point sizing function (SizingFunctionArrayName) as a spatially-varying maximum tetrahedron volume constraint (TetGen "-m" switch, used together with VarVolume). Default: off.

Turning this on is refused, with an error saying what to do instead: "-m" takes its sizes from a background mesh, this wrapper cannot supply one, and the mesh TetGen then builds for itself puts it on a path that does not answer the same way twice - the same input meshed twice in one session comes back tetrahedralized once and empty once. Bound the element volume with FixedVolume and MaxVolume instead.

◆ GetUseSizingFunction()

virtual int vtkvmtkTetGenWrapper::GetUseSizingFunction ( )
virtual

Toggle using the per-point sizing function (SizingFunctionArrayName) as a spatially-varying maximum tetrahedron volume constraint (TetGen "-m" switch, used together with VarVolume). Default: off.

Turning this on is refused, with an error saying what to do instead: "-m" takes its sizes from a background mesh, this wrapper cannot supply one, and the mesh TetGen then builds for itself puts it on a path that does not answer the same way twice - the same input meshed twice in one session comes back tetrahedralized once and empty once. Bound the element volume with FixedVolume and MaxVolume instead.

◆ UseSizingFunctionOn()

virtual void vtkvmtkTetGenWrapper::UseSizingFunctionOn ( )
virtual

Toggle using the per-point sizing function (SizingFunctionArrayName) as a spatially-varying maximum tetrahedron volume constraint (TetGen "-m" switch, used together with VarVolume). Default: off.

Turning this on is refused, with an error saying what to do instead: "-m" takes its sizes from a background mesh, this wrapper cannot supply one, and the mesh TetGen then builds for itself puts it on a path that does not answer the same way twice - the same input meshed twice in one session comes back tetrahedralized once and empty once. Bound the element volume with FixedVolume and MaxVolume instead.

◆ UseSizingFunctionOff()

virtual void vtkvmtkTetGenWrapper::UseSizingFunctionOff ( )
virtual

Toggle using the per-point sizing function (SizingFunctionArrayName) as a spatially-varying maximum tetrahedron volume constraint (TetGen "-m" switch, used together with VarVolume). Default: off.

Turning this on is refused, with an error saying what to do instead: "-m" takes its sizes from a background mesh, this wrapper cannot supply one, and the mesh TetGen then builds for itself puts it on a path that does not answer the same way twice - the same input meshed twice in one session comes back tetrahedralized once and empty once. Bound the element volume with FixedVolume and MaxVolume instead.

◆ SetLastRunExitStatus()

virtual void vtkvmtkTetGenWrapper::SetLastRunExitStatus ( int )
virtual

Set the exit status recorded for the most recent TetGen run; set internally after each RequestData(), 0 on success, non-zero on failure. Only a setter is provided (no corresponding getter is declared).

◆ RequestData()

int vtkvmtkTetGenWrapper::RequestData ( vtkInformation * ,
vtkInformationVector ** ,
vtkInformationVector *  )
overrideprotectedvirtual

Definition at line 96 of file vtkvmtkTetGenWrapper.cxx.

100{
101 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
102 vtkInformation *outInfo = outputVector->GetInformationObject(0);
103
104 vtkUnstructuredGrid *input = vtkUnstructuredGrid::SafeDownCast(
105 inInfo->Get(vtkDataObject::DATA_OBJECT()));
106 vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
107 outInfo->Get(vtkDataObject::DATA_OBJECT()));
108
109 if (this->VarVolume && !this->TetrahedronVolumeArrayName)
110 {
111 vtkErrorMacro(<<"VarVolumeOn but TetrahedronVolumeArrayName not specified");
112 return 1;
113 }
114
115 vtkStdString tetgenOptionString;
116
117 char buffer[64];
118
119 if (this->PLC)
120 {
121 tetgenOptionString += "p";
122 }
123
124 if (this->Refine)
125 {
126 tetgenOptionString += "r";
127 }
128
129 if (this->Coarsen)
130 {
131 tetgenOptionString += "R";
132 }
133
134 if (this->Quality)
135 {
136 tetgenOptionString += "q";
137 sprintf(buffer,"%f",this->MinRatio);
138 tetgenOptionString += buffer;
139 tetgenOptionString += "q";
140 sprintf(buffer,"%f",this->MinDihedral);
141 tetgenOptionString += buffer;
142 tetgenOptionString += "q";
143 sprintf(buffer,"%f",this->MaxDihedral);
144 tetgenOptionString += buffer;
145 }
146
147 if (this->NoBoundarySplit)
148 {
149 tetgenOptionString += "Y";
150 }
151
152 if (this->RemoveSliver)
153 {
154 tetgenOptionString += "s";
155 }
156
157 if (this->Order == 2)
158 {
159 tetgenOptionString += "o2";
160 }
161
162 tetgenOptionString += "T";
163 sprintf(buffer,"%e",this->Epsilon);
164 tetgenOptionString += buffer;
165
166 if (this->VarVolume)
167 {
168 tetgenOptionString += "a";
169 }
170
171 if (this->FixedVolume)
172 {
173 tetgenOptionString += "a";
174 sprintf(buffer,"%f",this->MaxVolume);
175 tetgenOptionString += buffer;
176 }
177
178 if (this->RegionAttrib)
179 {
180 tetgenOptionString += "A";
181 }
182
183 if (this->NoMerge)
184 {
185 tetgenOptionString += "M";
186 }
187
188 if (this->DetectInter)
189 {
190 tetgenOptionString += "d";
191 }
192
193 if (this->DoCheck)
194 {
195 tetgenOptionString += "C";
196 }
197
198 if (this->CheckClosure)
199 {
200 tetgenOptionString += "c";
201 }
202
203 tetgenOptionString += "z";
204// tetgenOptionString += "Y";
205
206 if (this->Verbose)
207 {
208 tetgenOptionString += "V";
209 }
210 else
211 {
212 tetgenOptionString += "Q";
213 }
214
215 vtkDataArray* sizingFunctionArray = NULL;
216 if (this->SizingFunctionArrayName)
217 {
218 sizingFunctionArray = input->GetPointData()->GetArray(this->SizingFunctionArrayName);
219 }
220
221 if (this->UseSizingFunction && sizingFunctionArray)
222 {
223 // TetGen reads a sizing function through its -m switch, and -m means "take the sizes from a
224 // background mesh". This wrapper has no way to hand one over, so TetGen makes its own by
225 // duplicating the mesh it is about to refine, and that path does not answer the same way
226 // twice: the same surface, meshed twice over in one session, comes back filled with
227 // tetrahedra one time and empty the next. Nothing is produced here rather than a mesh that
228 // cannot be reproduced.
229 vtkErrorMacro(<<"UseSizingFunction is on, and the sizing function array '"
230 <<this->SizingFunctionArrayName<<"' was found on the input, so TetGen would be run with its "
231 "-m switch. -m takes element sizes from a background mesh; with none given, TetGen builds "
232 "one out of the mesh it is meshing, and that gives a different answer from one run to the "
233 "next - the same input meshed twice in one session comes back tetrahedralized once and "
234 "empty once. No mesh is generated, rather than one that cannot be reproduced.\n"
235 " To ask for a size without it: leave UseSizingFunction off and bound the element volume "
236 "instead, with SetFixedVolume(1) and SetMaxVolume(v), where v is the volume of the regular "
237 "tetrahedron of the edge length wanted - v = a*a*a/(6*sqrt(2)) for edge length a. That "
238 "gives the same mesh every time.\n"
239 " A single volume bound is one size for the whole mesh, where the sizing function was a "
240 "size per point. Where the size has to vary, vary the triangles of the surface that is "
241 "handed in: the elements against it follow their size, and the bound then only says how "
242 "coarse the middle may become.");
243 this->SetLastRunExitStatus(1);
244 return 1;
245 }
246
247 tetgenio in_tetgenio;
248 tetgenio out_tetgenio;
249
250 in_tetgenio.firstnumber = 0;
251
252 const int meshDimensionality = 3; //TODO: set this
253 in_tetgenio.mesh_dim = meshDimensionality;
254
255 //TODO - all point arrays except marker array
256 in_tetgenio.pointattributelist = NULL; //REAL*
257 in_tetgenio.numberofpointattributes = 0;
258 //TODO
259
260 in_tetgenio.pointmtrlist = NULL;
261 in_tetgenio.numberofpointmtrs = 0;
262
263 int numberOfPoints = input->GetNumberOfPoints();
264
265 in_tetgenio.numberofpoints = numberOfPoints;
266 in_tetgenio.pointlist = new REAL[meshDimensionality * numberOfPoints];
267#if 0
268 if (pointMarkerArray)
269 {
270 in_tetgenio.pointmarkerlist = new int[numberOfPoints];
271 }
272#endif
273 if (sizingFunctionArray)
274 {
275 in_tetgenio.numberofpointmtrs = 1;
276 in_tetgenio.pointmtrlist = new REAL[numberOfPoints];
277 }
278
279 double point[3];
280 int i;
281 for (i=0; i<numberOfPoints; i++)
282 {
283 input->GetPoint(i,point);
284 in_tetgenio.pointlist[meshDimensionality * i + 0] = point[0];
285 in_tetgenio.pointlist[meshDimensionality * i + 1] = point[1];
286 in_tetgenio.pointlist[meshDimensionality * i + 2] = point[2];
287#if 0
288 if (pointMarkerArray)
289 {
290 in_tetgenio.pointmarkerlist[i] = static_cast<int>(pointMarkerArray->GetComponent(i,0));
291 }
292 else
293 {
294 in_tetgenio.pointmarkerlist[i] = 0;
295 }
296#endif
297 if (sizingFunctionArray)
298 {
299 in_tetgenio.pointmtrlist[i] = sizingFunctionArray->GetComponent(i,0);
300 if (in_tetgenio.pointmtrlist[i] == 0.0)
301 {
302 in_tetgenio.pointmtrlist[i] = VTK_VMTK_FLOAT_TOL;
303 }
304 }
305 }
306
307 vtkIdList* facetCellIds = vtkIdList::New();
308 vtkIdList* tetraCellIds = vtkIdList::New();
309
310 int numberOfCells = input->GetNumberOfCells();
311 for (i=0; i<numberOfCells; i++)
312 {
313 vtkCell* cell = input->GetCell(i);
314 int cellType = cell->GetCellType();
315 switch (cellType)
316 {
317 case VTK_TRIANGLE:
318 case VTK_QUADRATIC_TRIANGLE:
319 case VTK_POLYGON:
320 facetCellIds->InsertNextId(i);
321 break;
322 case VTK_TETRA:
323 if (this->Order != 1)
324 {
325 vtkErrorMacro(<<"Element of incorrect order found.");
326 break;
327 }
328 tetraCellIds->InsertNextId(i);
329 break;
330 case VTK_QUADRATIC_TETRA:
331 if (this->Order != 2)
332 {
333 vtkErrorMacro(<<"Element of incorrect order found.");
334 break;
335 }
336 tetraCellIds->InsertNextId(i);
337 break;
338 default:
339 vtkErrorMacro(<<"Invalid element found, cellId "<<i<<", cellType "<<cellType);
340 break;
341 }
342 }
343
344 int numberOfFacets = facetCellIds->GetNumberOfIds();
345 int numberOfTetras = tetraCellIds->GetNumberOfIds();
346
347 //TODO - input as vtkPointSet (point inside hole ([0],[1],[2]))
348 in_tetgenio.holelist = NULL; //REAL*
349 in_tetgenio.numberofholes = 0;
350 //TODO
351
352 if (numberOfFacets > 0)
353 {
354 in_tetgenio.numberoffacets = numberOfFacets;
355 in_tetgenio.facetlist = new tetgenio::facet[numberOfFacets];
356 in_tetgenio.facetmarkerlist = new int[numberOfFacets];
357
358 vtkDataArray* facetMarkerArray = input->GetCellData()->GetArray(this->CellEntityIdsArrayName);
359
360 for (i=0; i<numberOfFacets; i++)
361 {
362 vtkIdType npts;
363 const vtkIdType *pts;
364 input->GetCellPoints(facetCellIds->GetId(i),npts,pts);
365 in_tetgenio.facetlist[i].numberofpolygons = 1;
366 in_tetgenio.facetlist[i].polygonlist = new tetgenio::polygon[in_tetgenio.facetlist[i].numberofpolygons];
367 in_tetgenio.facetlist[i].numberofholes = 0;
368 in_tetgenio.facetlist[i].holelist = NULL;
369 in_tetgenio.facetlist[i].polygonlist[0].numberofvertices = npts;
370 in_tetgenio.facetlist[i].polygonlist[0].vertexlist = new int[npts];
371 for (int j=0; j<npts; j++)
372 {
373 in_tetgenio.facetlist[i].polygonlist[0].vertexlist[j] = pts[j];
374 }
375
376 if (facetMarkerArray)
377 {
378 in_tetgenio.facetmarkerlist[i] = static_cast<int>(facetMarkerArray->GetComponent(facetCellIds->GetId(i),0));
379 }
380 else
381 {
382 in_tetgenio.facetmarkerlist[i] = 0;
383 }
384 }
385 }
386
387 //TODO - all cell arrays except volume array
388 in_tetgenio.tetrahedronattributelist = NULL; //REAL*
389 in_tetgenio.numberoftetrahedronattributes = 0;
390 //TODO
391
392 if (numberOfTetras > 0)
393 {
394 vtkDataArray* tetrahedronVolumeArray = NULL;
395 if (this->VarVolume)
396 {
397 tetrahedronVolumeArray = input->GetCellData()->GetArray(this->TetrahedronVolumeArrayName);
398 }
399
400 in_tetgenio.numberoftetrahedra = numberOfTetras;
401 switch (this->Order)
402 {
403 case 1:
404 in_tetgenio.numberofcorners = 4;
405 break;
406 case 2:
407 in_tetgenio.numberofcorners = 10;
408 break;
409 default:
410 in_tetgenio.numberofcorners = 0;
411 break;
412 }
413
414 in_tetgenio.tetrahedronlist = new int[in_tetgenio.numberofcorners * numberOfTetras];
415
416 if (tetrahedronVolumeArray)
417 {
418 in_tetgenio.tetrahedronvolumelist = new REAL[numberOfTetras];
419 }
420
421 for (i=0; i<numberOfTetras; i++)
422 {
423 vtkIdType npts;
424 const vtkIdType *pts;
425 input->GetCellPoints(tetraCellIds->GetId(i),npts,pts);
426 for (int j=0; j<npts; j++)
427 {
428 in_tetgenio.tetrahedronlist[i*in_tetgenio.numberofcorners + j] = pts[j];
429 }
430
431 if (tetrahedronVolumeArray)
432 {
433 in_tetgenio.tetrahedronvolumelist[i] = tetrahedronVolumeArray->GetComponent(i,0);
434 }
435 }
436 }
437
438 facetCellIds->Delete();
439 tetraCellIds->Delete();
440
441 //TODO - input as vtkPointSet + arrays for attributes (point inside region ([0],[1],[2]), regional attribute [3], volume constraint [4])
442 in_tetgenio.regionlist = NULL; //REAL*
443 in_tetgenio.numberofregions = 0;
444 //TODO
445
446 char tetgenOptions[512];
447 strcpy(tetgenOptions,tetgenOptionString.c_str());
448 std::cout<<"TetGen command line options: "<<tetgenOptions<<endl;
449 try
450 {
451 tetrahedralize(tetgenOptions,&in_tetgenio,&out_tetgenio);
452 }
453 catch ( ... )
454 {
455 vtkErrorMacro(<<"TetGen quit with an exception.");
456 this->LastRunExitStatus = 1;
457 return 1;
458 }
459
460 this->LastRunExitStatus = 0;
461
462 //TODO
463// out_tetgenio.edgelist; //int*
464// out_tetgenio.edgemarkerlist; //int*
465// out_tetgenio.numberofedges;
466// out_tetgenio.neighborlist; //int*
467 //TODO
468
469 vtkPoints* outputPoints = vtkPoints::New();
470
471 outputPoints->SetNumberOfPoints(out_tetgenio.numberofpoints);
472 for (i=0; i<out_tetgenio.numberofpoints; i++)
473 {
474 point[0] = out_tetgenio.pointlist[meshDimensionality * i + 0];
475 point[1] = out_tetgenio.pointlist[meshDimensionality * i + 1];
476 point[2] = out_tetgenio.pointlist[meshDimensionality * i + 2];
477 outputPoints->SetPoint(i,point);
478 }
479
480 output->SetPoints(outputPoints);
481
482 vtkCellArray* outputCellArray = vtkCellArray::New();
483
484 int numberOfOutputCells = 0;
485
486 if (this->OutputVolumeElements)
487 {
488 numberOfOutputCells += out_tetgenio.numberoftetrahedra;
489 }
490
491 if (this->OutputSurfaceElements)
492 {
493 numberOfOutputCells += out_tetgenio.numberoftrifaces;
494 }
495
496 int* outputCellTypes = new int[numberOfOutputCells];
497
498 vtkIntArray* outputCellMarkerArray = vtkIntArray::New();
499 outputCellMarkerArray->SetNumberOfTuples(numberOfOutputCells);
500 outputCellMarkerArray->SetName(this->CellEntityIdsArrayName);
501 outputCellMarkerArray->FillComponent(0,0.0);
502
503 int cellIdOffset = 0;
504
505#if 1
506 if (this->OutputVolumeElements)
507 {
508 int outputCellType;
509 switch (this->Order)
510 {
511 case 1:
512 outputCellType = VTK_TETRA;
513 break;
514 case 2:
515 outputCellType = VTK_QUADRATIC_TETRA;
516 break;
517 default:
518 outputCellType = VTK_TETRA;
519 }
520
521 for (i=0; i<out_tetgenio.numberoftetrahedra; i++)
522 {
523 outputCellArray->InsertNextCell(out_tetgenio.numberofcorners);
524 for (int j=0; j<out_tetgenio.numberofcorners; j++)
525 {
526 outputCellArray->InsertCellPoint(out_tetgenio.tetrahedronlist[i*out_tetgenio.numberofcorners + j]);
527 }
528 outputCellTypes[cellIdOffset+i] = outputCellType;
529 }
530
531 cellIdOffset = out_tetgenio.numberoftetrahedra;
532 }
533
534 if (this->OutputSurfaceElements)
535 {
536 int outputCellType = VTK_TRIANGLE;
537 int numberOfTrifaceCorners = 3;
538
539 for (i=0; i<out_tetgenio.numberoftrifaces; i++)
540 {
541 outputCellArray->InsertNextCell(numberOfTrifaceCorners);
542 for (int j=0; j<numberOfTrifaceCorners; j++)
543 {
544 outputCellArray->InsertCellPoint(out_tetgenio.trifacelist[i*numberOfTrifaceCorners + j]);
545 }
546 outputCellTypes[cellIdOffset+i] = outputCellType;
547 outputCellMarkerArray->SetValue(cellIdOffset+i,out_tetgenio.trifacemarkerlist[i]);
548 }
549
550 cellIdOffset = out_tetgenio.numberoftrifaces;
551 }
552#else
553 if (this->OutputSurfaceElements)
554 {
555 int outputCellType = VTK_TRIANGLE;
556 int numberOfTrifaceCorners = 3;
557
558 for (i=0; i<out_tetgenio.numberoftrifaces; i++)
559 {
560 outputCellArray->InsertNextCell(numberOfTrifaceCorners);
561 for (int j=0; j<numberOfTrifaceCorners; j++)
562 {
563 outputCellArray->InsertCellPoint(out_tetgenio.trifacelist[i*numberOfTrifaceCorners + j]);
564 }
565 outputCellTypes[cellIdOffset+i] = outputCellType;
566 outputCellMarkerArray->SetValue(cellIdOffset+i,out_tetgenio.trifacemarkerlist[i]+1);
567 }
568
569 cellIdOffset = out_tetgenio.numberoftrifaces;
570 }
571
572 if (this->OutputVolumeElements)
573 {
574 int outputCellType;
575 switch (this->Order)
576 {
577 case 1:
578 outputCellType = VTK_TETRA;
579 break;
580 case 2:
581 outputCellType = VTK_QUADRATIC_TETRA;
582 break;
583 default:
584 outputCellType = VTK_TETRA;
585 }
586
587 for (i=0; i<out_tetgenio.numberoftetrahedra; i++)
588 {
589 outputCellArray->InsertNextCell(out_tetgenio.numberofcorners);
590 for (int j=0; j<out_tetgenio.numberofcorners; j++)
591 {
592 outputCellArray->InsertCellPoint(out_tetgenio.tetrahedronlist[i*out_tetgenio.numberofcorners + j]);
593 }
594 outputCellTypes[cellIdOffset+i] = outputCellType;
595 }
596
597 cellIdOffset = out_tetgenio.numberoftetrahedra;
598 }
599#endif
600
601 output->SetCells(outputCellTypes,outputCellArray);
602
603 output->GetCellData()->AddArray(outputCellMarkerArray);
604
605 outputPoints->Delete();
606 outputCellArray->Delete();
607 delete[] outputCellTypes;
608
609 outputCellMarkerArray->Delete();
610
611 return 1;
612}
virtual void SetLastRunExitStatus(int)
#define VTK_VMTK_FLOAT_TOL

Member Data Documentation

◆ PLC

int vtkvmtkTetGenWrapper::PLC
protected

Definition at line 318 of file vtkvmtkTetGenWrapper.h.

◆ Refine

int vtkvmtkTetGenWrapper::Refine
protected

Definition at line 319 of file vtkvmtkTetGenWrapper.h.

◆ Coarsen

int vtkvmtkTetGenWrapper::Coarsen
protected

Definition at line 320 of file vtkvmtkTetGenWrapper.h.

◆ NoBoundarySplit

int vtkvmtkTetGenWrapper::NoBoundarySplit
protected

Definition at line 321 of file vtkvmtkTetGenWrapper.h.

◆ Quality

int vtkvmtkTetGenWrapper::Quality
protected

Definition at line 322 of file vtkvmtkTetGenWrapper.h.

◆ MinRatio

double vtkvmtkTetGenWrapper::MinRatio
protected

Definition at line 323 of file vtkvmtkTetGenWrapper.h.

◆ VarVolume

int vtkvmtkTetGenWrapper::VarVolume
protected

Definition at line 324 of file vtkvmtkTetGenWrapper.h.

◆ FixedVolume

int vtkvmtkTetGenWrapper::FixedVolume
protected

Definition at line 325 of file vtkvmtkTetGenWrapper.h.

◆ MaxVolume

double vtkvmtkTetGenWrapper::MaxVolume
protected

Definition at line 326 of file vtkvmtkTetGenWrapper.h.

◆ RemoveSliver

int vtkvmtkTetGenWrapper::RemoveSliver
protected

Definition at line 327 of file vtkvmtkTetGenWrapper.h.

◆ MinDihedral

double vtkvmtkTetGenWrapper::MinDihedral
protected

Definition at line 328 of file vtkvmtkTetGenWrapper.h.

◆ MaxDihedral

double vtkvmtkTetGenWrapper::MaxDihedral
protected

Definition at line 329 of file vtkvmtkTetGenWrapper.h.

◆ RegionAttrib

int vtkvmtkTetGenWrapper::RegionAttrib
protected

Definition at line 330 of file vtkvmtkTetGenWrapper.h.

◆ Epsilon

double vtkvmtkTetGenWrapper::Epsilon
protected

Definition at line 331 of file vtkvmtkTetGenWrapper.h.

◆ NoMerge

int vtkvmtkTetGenWrapper::NoMerge
protected

Definition at line 332 of file vtkvmtkTetGenWrapper.h.

◆ DetectInter

int vtkvmtkTetGenWrapper::DetectInter
protected

Definition at line 333 of file vtkvmtkTetGenWrapper.h.

◆ CheckClosure

int vtkvmtkTetGenWrapper::CheckClosure
protected

Definition at line 334 of file vtkvmtkTetGenWrapper.h.

◆ Order

int vtkvmtkTetGenWrapper::Order
protected

Definition at line 335 of file vtkvmtkTetGenWrapper.h.

◆ DoCheck

int vtkvmtkTetGenWrapper::DoCheck
protected

Definition at line 336 of file vtkvmtkTetGenWrapper.h.

◆ Verbose

int vtkvmtkTetGenWrapper::Verbose
protected

Definition at line 337 of file vtkvmtkTetGenWrapper.h.

◆ UseSizingFunction

int vtkvmtkTetGenWrapper::UseSizingFunction
protected

Definition at line 338 of file vtkvmtkTetGenWrapper.h.

◆ LastRunExitStatus

int vtkvmtkTetGenWrapper::LastRunExitStatus
protected

Definition at line 339 of file vtkvmtkTetGenWrapper.h.

◆ CellEntityIdsArrayName

char* vtkvmtkTetGenWrapper::CellEntityIdsArrayName
protected

Definition at line 341 of file vtkvmtkTetGenWrapper.h.

◆ TetrahedronVolumeArrayName

char* vtkvmtkTetGenWrapper::TetrahedronVolumeArrayName
protected

Definition at line 342 of file vtkvmtkTetGenWrapper.h.

◆ SizingFunctionArrayName

char* vtkvmtkTetGenWrapper::SizingFunctionArrayName
protected

Definition at line 343 of file vtkvmtkTetGenWrapper.h.

◆ OutputSurfaceElements

int vtkvmtkTetGenWrapper::OutputSurfaceElements
protected

Definition at line 345 of file vtkvmtkTetGenWrapper.h.

◆ OutputVolumeElements

int vtkvmtkTetGenWrapper::OutputVolumeElements
protected

Definition at line 346 of file vtkvmtkTetGenWrapper.h.


The documentation for this class was generated from the following files: