TRIReader Class Reference

TRI (triangle) file reader. More...

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

Public Member Functions

 TRIReader (const fileName &filename)
 Read from file, filling in the information. More...
 
 ~TRIReader ()=default
 Destructor. More...
 
void clear ()
 Flush all values. More...
 
label mergePointsMap (labelList &pointMap) const
 Calculate merge points mapping, return old to new pointMap. More...
 
label mergePointsMap (const scalar mergeTol, labelList &pointMap) const
 Calculate merge points mapping, return old to new pointMap. More...
 
bool sorted () const
 File read was already sorted. More...
 
List< STLpoint > & points ()
 Return full access to the points. More...
 
List< label > & zoneIds ()
 Return full access to the zones. More...
 
List< word > & names ()
 The list of solid names in the order of their first appearance. More...
 
List< label > & sizes ()
 The list of zone sizes in the order of their first appearance. More...
 
- Public Member Functions inherited from surfaceFormatsCore
 surfaceFormatsCore ()=default
 Default construct. More...
 
virtual ~surfaceFormatsCore ()=default
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from surfaceFormatsCore
static bool checkSupport (const wordHashSet &available, const word &fileType, const bool verbose=false, const char *functionName=nullptr)
 Verbose checking of fileType in the list of available types. More...
 
static fileName findFile (const IOobject &io, const bool isGlobal=true)
 
static fileName findFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 
- Static Public Attributes inherited from surfaceFormatsCore
static word nativeExt
 The file extension corresponding to 'native' surface format. More...
 
- Static Protected Member Functions inherited from surfaceFormatsCore
static string getLineNoComment (ISstream &is, const char comment='#')
 Read non-empty and non-comment line. More...
 
template<class Container >
static List< surfZoneoneZone (const Container &container, const word &name="zone0")
 
static labelList getSelectedPatches (const surfZoneList &patches, const wordRes &allow, const wordRes &deny=wordRes())
 Return ids for zone/patch that match by name. More...
 
static fileName relativeFilePath (const IOobject &io, const fileName &f, const bool isGlobal=true)
 Return fileName. More...
 
static fileName checkFile (const IOobject &io, const bool isGlobal=true)
 Return fileName to load IOobject from. More...
 
static fileName checkFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 Return fileName to load IOobject from. More...
 

Detailed Description

TRI (triangle) file reader.

For TRI format (eg, AC3D). Each input line has 9 floats (3 points, each 3 floats) followed by hex colour. The colour is used to build regions numbered from 0 upwards.

Reading and stitching similar to the STLReader.

Source files

Definition at line 61 of file TRIReader.H.

Constructor & Destructor Documentation

◆ TRIReader()

TRIReader ( const fileName filename)

Read from file, filling in the information.

Definition at line 167 of file TRIReader.C.

◆ ~TRIReader()

~TRIReader ( )
default

Destructor.

Member Function Documentation

◆ clear()

void clear ( )

Flush all values.

Definition at line 184 of file TRIReader.C.

◆ mergePointsMap() [1/2]

Foam::label mergePointsMap ( labelList pointMap) const

Calculate merge points mapping, return old to new pointMap.

Use merge tolerance as per STL ascii

Returns
number of unique points

Definition at line 194 of file TRIReader.C.

References Foam::doubleScalarSMALL.

Referenced by TRIsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ mergePointsMap() [2/2]

Foam::label mergePointsMap ( const scalar  mergeTol,
labelList pointMap 
) const

Calculate merge points mapping, return old to new pointMap.

Returns
number of unique points

Definition at line 208 of file TRIReader.C.

References Foam::mergePoints().

Here is the call graph for this function:

◆ sorted()

bool sorted ( ) const
inline

File read was already sorted.

Definition at line 115 of file TRIReader.H.

Referenced by TRIsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ points()

List< STLpoint > & points ( )
inline

Return full access to the points.

Definition at line 121 of file TRIReader.H.

Referenced by TRIsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ zoneIds()

List< label > & zoneIds ( )
inline

Return full access to the zones.

Definition at line 127 of file TRIReader.H.

Referenced by TRIsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ names()

List< word > & names ( )
inline

The list of solid names in the order of their first appearance.

Definition at line 133 of file TRIReader.H.

◆ sizes()

List< label > & sizes ( )
inline

The list of zone sizes in the order of their first appearance.

Definition at line 139 of file TRIReader.H.

Referenced by TRIsurfaceFormat< Face >::read().

Here is the caller graph for this function:

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