CAD Exchanger SDK
cadex::ACIS_Reader Class Reference

Reads ACIS files. More...

Inheritance diagram for cadex::ACIS_Reader:
cadex::Base_Reader

Public Member Functions

 ACIS_Reader ()
 Creates an object. More...
 
bool ReadMemory (const void *theData, size_t theSize)
 Parses memory buffer containing SAB or SAT file. More...
 
const ACIS_ReaderParametersParameters () const
 Returns parameters.
 
ACIS_ReaderParametersParameters ()
 Sets parameters.
 
- Public Member Functions inherited from cadex::Base_Reader
 ~Base_Reader ()
 Destructor.
 
bool ReadFile (const Base_UTF16String &theFileName)
 Reads the file into memory. More...
 
bool ReadFile (std::istream &theStream)
 Reads the file into memory. More...
 
bool ReadFile (const std::shared_ptr< Base_IStreamProviderFactory > &theFactory, const Base_UTF16String &theFileName)
 Reads the file into memory. More...
 
bool Transfer (ModelData_Model &theModel)
 Converts read file into a resulting model. More...
 
bool Transfer (TopoDS_Shape &theShape)
 Converts read file into a resulting shape. More...
 
Base_ProgressStatusProgressStatus () const
 Returns a progress status.
 
internal::Base_Reader_Private * Impl () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::Base_Reader
 Base_Reader (internal::Base_Reader_Private *theImpl)
 Constructor.
 

Detailed Description

Reads ACIS files.

Refer to ACIS Converter.

Examples:
progressindicator/main.cxx.

Constructor & Destructor Documentation

◆ ACIS_Reader()

cadex::ACIS_Reader::ACIS_Reader ( )

Creates an object.

Empty constructor.

Exceptions
LicenseManager_LicenseErrorif no ACIS license was activated.

Member Function Documentation

◆ ReadMemory()

bool cadex::ACIS_Reader::ReadMemory ( const void *  theData,
size_t  theSize 
)

Parses memory buffer containing SAB or SAT file.

This syntax is to be used when parsing excerpts from DXF or DWG files containing sections with 3D data written in the ACIS SAT or SAB format. For instance, DXF files may contain encoded SAT file and DWG may contain SAB files.

The method will automatically recognize whether the buffer contains SAT-encoded or SAB contents using the following heuristics:

  • if the buffer starts with "ACIS BinaryFile" string (without double quotes) then the buffer is assumed to contain a SAB file;
  • if the buffer starts with a single digit integer (e.g. " 1", without double quotes) then the buffer is assumed to contain a SAT-encoded-and-interleaved file (e.g. from DXF);
  • if the buffer starts with a alpha symbol (e.g. "koo km n o", without double quotes) then the buffer is assumed to contain a SAT-encoded file (e.g. from DWG 2000 file);
  • otherwise the buffer is assumed to contain a plain SAT file.

theSize specifies the size of the buffer.

Returns true if the contents has been successfully recognized and parsed, and false otherwise.