Open CASCADE Technology  6.8.0
Public Member Functions
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.. More...

#include <StlAPI_Writer.hxx>

Public Member Functions

 StlAPI_Writer ()
 Creates a writer object with default parameters: ASCIIMode, RelativeMode, SetCoefficent, SetDeflection. These parameters may be modified. More...
 
void SetDeflection (const Standard_Real aDeflection)
 Sets the deflection of the meshing algorithm. Deflection is used, only if relative mode is false. More...
 
void SetCoefficient (const Standard_Real aCoefficient)
 Sets the coeffiecient for computation of deflection through relative size of shape. Default value = 0.001. More...
 
Standard_BooleanRelativeMode ()
 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;. More...
 
Standard_BooleanASCIIMode ()
 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. More...
 
void Write (const TopoDS_Shape &aShape, const Standard_CString aFileName, const Standard_Boolean InParallel=Standard_False)
 Converts a given shape to STL format and writes it to file with a given filename. More...
 

Detailed Description

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..

Constructor & Destructor Documentation

StlAPI_Writer::StlAPI_Writer ( )

Creates a writer object with default parameters: ASCIIMode, RelativeMode, SetCoefficent, SetDeflection. These parameters may be modified.

Member Function Documentation

Standard_Boolean& StlAPI_Writer::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_Boolean& StlAPI_Writer::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;.

void StlAPI_Writer::SetCoefficient ( const Standard_Real  aCoefficient)

Sets the coeffiecient for computation of deflection through relative size of shape. Default value = 0.001.

void StlAPI_Writer::SetDeflection ( const Standard_Real  aDeflection)

Sets the deflection of the meshing algorithm. Deflection is used, only if relative mode is false.

void StlAPI_Writer::Write ( const TopoDS_Shape aShape,
const Standard_CString  aFileName,
const Standard_Boolean  InParallel = Standard_False 
)

Converts a given shape to STL format and writes it to file with a given filename.


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