Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_ModelReader Class Reference

Reads any format that CAD Exchanger can import. More...

#include <cadex/ModelData_ModelReader.hxx>

Public Member Functions

 ModelData_ModelReader ()
 Constructor.
 
 ~ModelData_ModelReader ()
 Destructor.
 
bool Read (const Base_UTF16String &theFilePath, ModelData_Model &theModel)
 Reads the file at the specified path into the specified model.
 
bool Read (const Base_UTF16String &theFilePath, ModelData_BIMModel &theModel)
 Reads the file at the specified path into the specified BIM model.
 
void SetReaderParameters (const Base_ReaderParameters &theParameters)
 Sets reader parameters.
 
void SetProgressStatus (const Base_ProgressStatus &theProgressStatus)
 Sets the progress status for the reading process.
 
const Base_ProgressStatusProgressStatus () const
 Returns the progress status for the reading process.
 
internal::ModelData_ModelReaderImpl * Impl ()
 

Detailed Description

Reads any format that CAD Exchanger can import.

Use this class to streamline the code where multiple formats have to be read in a uniform fashion. This reader handles the task of determining the suitable reader itself, the client code then receives the resulting ModelData_Model.

Each CAD Exchanger reader has its own binary. This class will load the binaries of readers at runtime for its operation. No linking is done at compile-time. If you're planning to omit some CAD Exchanger libraries from your software distribution, make sure to include the libraries for all the formats you intend to read.

Examples
Eyeshot/conversion/MainForm.cs, MTKConverter/Program.cs, MTKConverter/main.cxx, Unigine/source/ModelImporter.cpp, Unity/Assets/Scripts/ModelImporter.cs, advgeom/brepsimplify/Program.cs, advgeom/brepsimplify/main.cxx, advgeom/meshsimplify/Program.cs, advgeom/meshsimplify/main.cxx, bim/exploring/Program.cs, bim/exploring/main.cxx, conversion/cdxwebconverter/Program.cs, conversion/cdxwebconverter/main.cxx, conversion/export/Program.cs, conversion/export/main.cxx, conversion/screenshot/Program.cs, conversion/screenshot/main.cxx, conversion/transfer/Program.cs, conversion/transfer/main.cxx, conversion/transferparams/Program.cs, conversion/transferparams/main.cxx, exploring/appearance/Program.cs, exploring/appearance/main.cxx, exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/brepgeometry/Program.cs, exploring/breprepresentation/Program.cs, exploring/breprepresentation/main.cxx, exploring/configurations/Program.cs, exploring/configurations/main.cxx, exploring/drawings/Program.cs, exploring/drawings/main.cxx, exploring/layers/Program.cs, exploring/layers/main.cxx, exploring/pmi/Program.cs, exploring/pmi/main.cxx, exploring/polyrepresentation/Program.cs, exploring/polyrepresentation/main.cxx, exploring/propertytable/Program.cs, exploring/propertytable/main.cxx, exploring/transformations/Program.cs, exploring/transformations/main.cxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, meshing/mefisto/Program.cs, meshing/mefisto/main.cxx, meshing/netgen/Program.cs, meshing/netgen/main.cxx, meshing/remeshing/Program.cs, meshing/remeshing/main.cxx, meshing/visualizationmesher/Program.cs, meshing/visualizationmesher/main.cxx, misc/logging/Program.cs, misc/logging/main.cxx, modeling/elementremoval/Program.cs, modeling/elementremoval/main.cxx, modification/coloring/Program.cs, modification/coloring/main.cxx, modification/renaming/Program.cs, modification/renaming/main.cxx, modification/rotation/Program.cs, modification/rotation/main.cxx, sheet_metal/dfm_analyzer/Program.cs, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/Program.cs, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/Program.cs, sheet_metal/unfolder/main.cxx, visualization/offscreen/Program.cs, visualization/offscreen/main.cxx, visualization/qtquick_qml/baseviewer/main.cxx, visualization/winforms/baseviewer/Program.cs, visualization/wpf/baseviewer/App.xaml.cs, wall_thickness/analyzer/Program.cs, wall_thickness/analyzer/main.cxx, wall_thickness/visualization/Program.cs, and wall_thickness/visualization/main.cxx.

Member Function Documentation

◆ Read() [1/2]

bool cadex::ModelData_ModelReader::Read ( const Base_UTF16String theFileName,
ModelData_BIMModel theBIMModel 
)

Reads the file at the specified path into the specified BIM model.

Automatically selects a reader suitable for the specified file. The selection is performed from the readers that can be loaded at runtime. Returns true if the reading process succeeded, false otherwise.

Note
Aside from the exceptions listed below, this function call may be interrupted by exceptions specific to the formats being used; see other classes derived from Base_Exception.
Exceptions
BaseError_MissingFileif the file can't be found at the specified path.
BaseError_MissingModuleif no reader for the specified file could be found (either because the format is not supported by CAD Exchanger, or because a related module couldn't be loaded).
LicenseManager_LicenseErrorif the corresponding reader was found but there was no active license for it.

◆ Read() [2/2]

bool cadex::ModelData_ModelReader::Read ( const Base_UTF16String theFileName,
ModelData_Model theModel 
)

Reads the file at the specified path into the specified model.

Automatically selects a reader suitable for the specified file. The selection is performed from the readers that can be loaded at runtime. Returns true if the reading process succeeded, false otherwise.

Note
Aside from the exceptions listed below, this function call may be interrupted by exceptions specific to the formats being used; see other classes derived from Base_Exception.
Exceptions
BaseError_MissingFileif the file can't be found at the specified path.
BaseError_MissingModuleif no reader for the specified file could be found (either because the format is not supported by CAD Exchanger, or because a related module couldn't be loaded).
LicenseManager_LicenseErrorif the corresponding reader was found but there was no active license for it.
Examples
Eyeshot/conversion/MainForm.cs, MTKConverter/Program.cs, MTKConverter/main.cxx, Unigine/source/ModelImporter.cpp, Unity/Assets/Scripts/ModelImporter.cs, advgeom/brepsimplify/Program.cs, advgeom/brepsimplify/main.cxx, advgeom/meshsimplify/Program.cs, advgeom/meshsimplify/main.cxx, bim/exploring/main.cxx, conversion/cdxwebconverter/Program.cs, conversion/cdxwebconverter/main.cxx, conversion/transfer/Program.cs, conversion/transfer/main.cxx, conversion/transferparams/Program.cs, conversion/transferparams/main.cxx, exploring/configurations/Program.cs, exploring/configurations/main.cxx, exploring/drawings/Program.cs, exploring/drawings/main.cxx, exploring/pmi/Program.cs, exploring/pmi/main.cxx, exploring/polyrepresentation/Program.cs, exploring/polyrepresentation/main.cxx, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/main.cxx, meshing/remeshing/Program.cs, meshing/remeshing/main.cxx, meshing/visualizationmesher/Program.cs, meshing/visualizationmesher/main.cxx, misc/logging/Program.cs, misc/logging/main.cxx, modification/coloring/main.cxx, modification/renaming/main.cxx, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/main.cxx, visualization/offscreen/Program.cs, visualization/offscreen/main.cxx, visualization/qtquick_qml/baseviewer/main.cxx, visualization/winforms/baseviewer/Program.cs, visualization/wpf/baseviewer/App.xaml.cs, wall_thickness/analyzer/main.cxx, and wall_thickness/visualization/main.cxx.

◆ SetReaderParameters()

void cadex::ModelData_ModelReader::SetReaderParameters ( const Base_ReaderParameters theParameters)