Reads any format that CAD Exchanger can import.
More...
#include <cadex/ModelData_ModelReader.hxx>
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/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, 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, and wall_thickness/analyzer/main.cxx.
◆ Read() [1/2]
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_MissingFile | if the file can't be found at the specified path. |
BaseError_MissingModule | if 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_LicenseError | if the corresponding reader was found but there was no active license for it. |
◆ Read() [2/2]
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_MissingFile | if the file can't be found at the specified path. |
BaseError_MissingModule | if 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_LicenseError | if 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, 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, and wall_thickness/analyzer/main.cxx.
◆ SetReaderParameters()
Sets reader parameters.
Any child of Base_ReaderParameters can be passed to this function and it will affect the reading of the corresponding format only. Call multiple times with parameter objects for different readers to customize the behavior of these readers.
- Examples
- Unity/Assets/Scripts/ModelImporter.cs, 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, visualization/offscreen/main.cxx, visualization/qtquick_qml/baseviewer/main.cxx, visualization/winforms/baseviewer/Program.cs, and visualization/wpf/baseviewer/App.xaml.cs.