OCC Main Page | DataExchange | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

DataExchange
TKSTL
StlAPI


StlAPI_Writer Class Reference

This class creates and writes
STL files from Open CASCADE shapes. An STL file can be
written to an existing STL file or to a new one..
.

#include <StlAPI_Writer.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT StlAPI_Writer ()
 Creates a writer object with
default parameters: ASCIIMode, RelativeMode, SetCoefficent,
SetDeflection. These parameters may be modified.
.
Standard_EXPORT void SetDeflection (const Standard_Real aDeflection)
 Sets the deflection of the meshing algorithm.
Deflection is used, only if relative mode is false
.
Standard_EXPORT void SetCoefficient (const Standard_Real aCoefficient)
 Sets the coeffiecient for computation of deflection through
relative size of shape. Default value = 0.001
.
Standard_EXPORT Standard_Boolean & RelativeMode ()
 Returns the address to the
flag defining the relative mode for writing the file.
This address may be used to either read or change the flag.
If the mode returns True (default value), the
deflection is calculated from the relative size of the
shape. If the mode returns False, the user defined deflection is used.
Example
Read:
Standard_Boolean val = Writer.RelativeMode( );
Modify:
Writer.RelativeMode( ) = Standard_True;
.
Standard_EXPORT Standard_Boolean & ASCIIMode ()
 Returns the address to the
flag defining the mode for writing the file. This address
may be used to either read or change the flag.
If the mode returns True (default value) the generated
file is an ASCII file. If the mode returns False, the
generated file is a binary file.
.
Standard_EXPORT void Write (const TopoDS_Shape &aShape, const Standard_CString aFileName)
 Converts a given shape to STL format and writes it to file with a given filename.
.

Private Attributes

Standard_Boolean theRelativeMode
Standard_Boolean theASCIIMode
Standard_Real theDeflection
Standard_Real theCoefficient
Handle_StlMesh_Mesh theStlMesh


Constructor & Destructor Documentation

Standard_EXPORT StlAPI_Writer::StlAPI_Writer  ) 
 


Member Function Documentation

Standard_EXPORT Standard_Boolean& StlAPI_Writer::ASCIIMode  ) 
 

void StlAPI_Writer::operator delete void *  anAddress  )  [inline]
 

void* StlAPI_Writer::operator new size_t  size  )  [inline]
 

void* StlAPI_Writer::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_EXPORT Standard_Boolean& StlAPI_Writer::RelativeMode  ) 
 

Standard_EXPORT void StlAPI_Writer::SetCoefficient const Standard_Real  aCoefficient  ) 
 

Standard_EXPORT void StlAPI_Writer::SetDeflection const Standard_Real  aDeflection  ) 
 

Standard_EXPORT void StlAPI_Writer::Write const TopoDS_Shape &  aShape,
const Standard_CString  aFileName
 


Field Documentation

Standard_Boolean StlAPI_Writer::theASCIIMode [private]
 

Standard_Real StlAPI_Writer::theCoefficient [private]
 

Standard_Real StlAPI_Writer::theDeflection [private]
 

Standard_Boolean StlAPI_Writer::theRelativeMode [private]
 

Handle_StlMesh_Mesh StlAPI_Writer::theStlMesh [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 14:45:54 2008 for OpenCASCADE by  doxygen 1.4.1