Loading...
Searching...
No Matches
isoSurfaceParams Class Reference

Preferences for controlling iso-surface algorithms. More...

#include <isoSurfaceParams.H>

Inheritance diagram for isoSurfaceParams:
Collaboration diagram for isoSurfaceParams:

Public Types

enum  algorithmType : uint8_t { ALGO_DEFAULT = 0 , ALGO_TOPO , ALGO_CELL , ALGO_POINT }
 The algorithm types. More...
enum class  filterType : uint8_t {
  NONE = 0 , CELL , DIAGCELL , NONMANIFOLD ,
  PARTIAL = CELL , FULL = DIAGCELL , CLEAN = NONMANIFOLD
}
 The filtering (regularization) to apply. More...

Public Member Functions

 isoSurfaceParams (const algorithmType algo=algorithmType::ALGO_DEFAULT, const filterType filter=filterType::DIAGCELL) noexcept
 Default construct, or with specified algorithm.
 isoSurfaceParams (const dictionary &dict, const isoSurfaceParams &params=isoSurfaceParams())
 Default construct, setting parameters from dictionary.
 isoSurfaceParams (const dictionary &dict, const algorithmType algo, const filterType filter=filterType::DIAGCELL)
 Default construct, setting parameters from dictionary.
algorithmType algorithm () const noexcept
 Get current algorithm.
void algorithm (algorithmType algo) noexcept
 Set algorithm.
filterType filter () const noexcept
 Get current filter type.
void filter (filterType fltr) noexcept
 Set filter type.
bool snap () const noexcept
 Get point snapping flag.
void snap (bool on) noexcept
 Set point snapping flag.
scalar mergeTol () const noexcept
 Get current merge tolerance.
void mergeTol (const scalar relTol) noexcept
 Set merge tolerance (cell/point algo).
const boundBoxgetClipBounds () const noexcept
 Get optional clipping bounding box.
boundBoxgetClipBounds () noexcept
 Access optional clipping bounding box.
void setClipBounds (const boundBox &bb)
 Set optional clipping bounding box.
void print (Ostream &os) const
 Print information about the settings.

Static Public Member Functions

static algorithmType getAlgorithmType (const dictionary &dict, const algorithmType deflt)
 Get 'isoMethod' or 'isoAlgorithm' as enumeration.
static filterType getFilterType (const dictionary &dict, const filterType deflt)
 Get 'regularise' as bool or enumeration.

Static Public Attributes

static const Enum< algorithmTypealgorithmNames
 Names for the iso-surface algorithms.
static const Enum< filterTypefilterNames
 Names for the filtering types.

Detailed Description

Preferences for controlling iso-surface algorithms.

Some common dictionary properties:

Property Description Required Default
isoMethod Algorithm (cell/topo/point/default) no default
regularise Face simplification (enum or bool) no true
mergeTol Point merge tolerance (cell/point) no 1e-6
snap Point snapping (topo) no true
bounds Optional clip bounds no inverted

The default algorithm denotes the use of the current standard algorithm.

Filtering types (for topological iso-surface)

  • none : leave tet cuts untouched
  • partial , cell : Combine intra-cell faces
  • full , diagcell : Perform partial and remove face-diagonal points
  • clean : Perform full and eliminate open edges as well. (May cause excessive erosion!)
Source files

Definition at line 102 of file isoSurfaceParams.H.

Member Enumeration Documentation

◆ algorithmType

enum algorithmType : uint8_t

The algorithm types.

Enumerator
ALGO_DEFAULT 

Use current 'standard' algorithm.

ALGO_TOPO 
ALGO_CELL 
ALGO_POINT 

Definition at line 111 of file isoSurfaceParams.H.

◆ filterType

enum class filterType : uint8_t
strong

The filtering (regularization) to apply.

Enumerator
NONE 

No filtering.

CELL 

Remove pyramid edge points.

DIAGCELL 

Remove pyramid edge points, face-diagonals.

NONMANIFOLD 

Remove pyramid edge points, face-diagonals and non-manifold faces

PARTIAL 

Same as CELL.

FULL 

Same as DIAGCELL.

CLEAN 

Same as NONMANIFOLD.

Definition at line 122 of file isoSurfaceParams.H.

Constructor & Destructor Documentation

◆ isoSurfaceParams() [1/3]

isoSurfaceParams ( const algorithmType algo = algorithmType::ALGO_DEFAULT,
const filterType filter = filterType::DIAGCELL )
explicitnoexcept

Default construct, or with specified algorithm.

Definition at line 127 of file isoSurfaceParams.C.

References e, filter(), and Foam::noexcept.

Referenced by isoSurfaceBase::isoSurfaceBase(), isoSurfaceParams(), isoSurfaceParams(), isoSurfaceBase::New(), and isoSurfaceBase::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isoSurfaceParams() [2/3]

isoSurfaceParams ( const dictionary & dict,
const isoSurfaceParams & params = isoSurfaceParams() )
explicit

Default construct, setting parameters from dictionary.

Definition at line 141 of file isoSurfaceParams.C.

References dict, getAlgorithmType(), getFilterType(), and isoSurfaceParams().

Here is the call graph for this function:

◆ isoSurfaceParams() [3/3]

isoSurfaceParams ( const dictionary & dict,
const algorithmType algo,
const filterType filter = filterType::DIAGCELL )
explicit

Default construct, setting parameters from dictionary.

Definition at line 157 of file isoSurfaceParams.C.

References dict, filter(), and isoSurfaceParams().

Here is the call graph for this function:

Member Function Documentation

◆ getAlgorithmType()

Foam::isoSurfaceParams::algorithmType getAlgorithmType ( const dictionary & dict,
const algorithmType deflt )
static

Get 'isoMethod' or 'isoAlgorithm' as enumeration.

Definition at line 60 of file isoSurfaceParams.C.

References dict.

Referenced by isoSurfaceParams().

Here is the caller graph for this function:

◆ getFilterType()

Foam::isoSurfaceParams::filterType getFilterType ( const dictionary & dict,
const filterType deflt )
static

Get 'regularise' as bool or enumeration.

Definition at line 92 of file isoSurfaceParams.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, filterNames, Switch::find(), Switch::good(), keyType::LITERAL, Foam::nl, and NONE.

Referenced by isoSurfaceParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ algorithm() [1/2]

algorithmType algorithm ( ) const
inlinenoexcept

Get current algorithm.

Definition at line 238 of file isoSurfaceParams.H.

References Foam::noexcept.

Referenced by isoSurfaceBase::New(), and sampledIsoSurface::sampledIsoSurface().

Here is the caller graph for this function:

◆ algorithm() [2/2]

void algorithm ( algorithmType algo)
inlinenoexcept

Set algorithm.

Definition at line 246 of file isoSurfaceParams.H.

◆ filter() [1/2]

filterType filter ( ) const
inlinenoexcept

Get current filter type.

Definition at line 254 of file isoSurfaceParams.H.

References Foam::noexcept.

Referenced by isoSurfaceCell::isoSurfaceCell(), isoSurfaceParams(), isoSurfaceParams(), isoSurfacePoint::isoSurfacePoint(), and isoSurfaceTopo::isoSurfaceTopo().

Here is the caller graph for this function:

◆ filter() [2/2]

void filter ( filterType fltr)
inlinenoexcept

Set filter type.

Definition at line 262 of file isoSurfaceParams.H.

◆ snap() [1/2]

bool snap ( ) const
inlinenoexcept

Get point snapping flag.

Definition at line 270 of file isoSurfaceParams.H.

References Foam::noexcept.

Referenced by isoSurfaceTopo::isoSurfaceTopo().

Here is the caller graph for this function:

◆ snap() [2/2]

void snap ( bool on)
inlinenoexcept

Set point snapping flag.

Definition at line 278 of file isoSurfaceParams.H.

◆ mergeTol() [1/2]

scalar mergeTol ( ) const
inlinenoexcept

Get current merge tolerance.

Definition at line 286 of file isoSurfaceParams.H.

References Foam::noexcept.

Referenced by isoSurfaceCell::isoSurfaceCell(), and isoSurfacePoint::isoSurfacePoint().

Here is the caller graph for this function:

◆ mergeTol() [2/2]

void mergeTol ( const scalar relTol)
inlinenoexcept

Set merge tolerance (cell/point algo).

Definition at line 294 of file isoSurfaceParams.H.

◆ getClipBounds() [1/2]

const boundBox & getClipBounds ( ) const
inlinenoexcept

Get optional clipping bounding box.

Definition at line 302 of file isoSurfaceParams.H.

References Foam::noexcept.

Referenced by isoSurfaceCell::isoSurfaceCell(), isoSurfacePoint::isoSurfacePoint(), and isoSurfaceTopo::isoSurfaceTopo().

Here is the caller graph for this function:

◆ getClipBounds() [2/2]

boundBox & getClipBounds ( )
inlinenoexcept

Access optional clipping bounding box.

Definition at line 310 of file isoSurfaceParams.H.

References Foam::noexcept.

◆ setClipBounds()

void setClipBounds ( const boundBox & bb)

Set optional clipping bounding box.

Definition at line 170 of file isoSurfaceParams.C.

◆ print()

void print ( Ostream & os) const

Print information about the settings.

Definition at line 176 of file isoSurfaceParams.C.

References algorithmNames, filterNames, and os().

Here is the call graph for this function:

Member Data Documentation

◆ algorithmNames

const Foam::Enum< Foam::isoSurfaceParams::algorithmType > algorithmNames
static

Names for the iso-surface algorithms.

Definition at line 173 of file isoSurfaceParams.H.

Referenced by print().

◆ filterNames

const Foam::Enum< Foam::isoSurfaceParams::filterType > filterNames
static

Names for the filtering types.

Definition at line 178 of file isoSurfaceParams.H.

Referenced by getFilterType(), isoSurfaceTopo::isoSurfaceTopo(), and print().


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