/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _IGES_IMPORT_H_ #define _IGES_IMPORT_H_ #include "OdPlatformSettings.h" #include "RxModule.h" #include "Gs/Gs.h" #define OdDwg2IgesModuleName L"Dwg2Iges" #ifdef DWG2IGES_EXPORTS #define DWG2IGES_EXPORT OD_TOOLKIT_EXPORT #define DWG2IGES_EXPORT_STATIC OD_STATIC_EXPORT #else #define DWG2IGES_EXPORT OD_TOOLKIT_IMPORT #define DWG2IGES_EXPORT_STATIC OD_STATIC_IMPORT #endif // DWG2IGES_IMPORTS #define ODRX_DECLARE_DWG2IGES_STATIC_MODULES_ENTRY_POINTS() \ ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdSDAIModule); \ ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdIgesIOModule); \ ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdIgesModule); \ ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdIgesToolsModuleImpl); \ ODRX_DECLARE_STATIC_MODULE_ENTRY_POINT(OdDwg2IgesModuleImpl); \ // end of ODRX_DECLARE_DWG2IGES_STATIC_MODULES_ENTRY_POINTS macro #define ODRX_DEFINE_DWG2IGES_STATIC_APPMODULES() \ ODRX_DEFINE_STATIC_APPMODULE(OdSDAIModuleName, OdSDAIModule) \ ODRX_DEFINE_STATIC_APPMODULE(OdIgesIoModuleName, OdIgesIOModule) \ ODRX_DEFINE_STATIC_APPMODULE(OdIgesSchemaModuleName, OdIgesModule) \ ODRX_DEFINE_STATIC_APPMODULE(OdIgesToolsModuleName, OdIgesToolsModuleImpl) \ ODRX_DEFINE_STATIC_APPMODULE(OdDwg2IgesModuleName, OdDwg2IgesModuleImpl) \ // end of ODRX_DEFINE_DWG2IGES_STATIC_APPMODULES macro class OdGiDrawable; /** \details Contains declarations related to the functionality of converting data from the .dwg to the IGES format. */ namespace DWG_IGES_IMPORT { /** \details Contains declarations, which represents the .dwg to .igs conversion modes. */ enum ConversionMode { /**Convert PMI dimensions.*/ kPMIConversion = 0x0001, /**Output conversion log data to the console.*/ kEnableConsoleLog = 0x0002, /**Output conversion log data to the file.*/ kEnableFileLog = 0x0004, }; /** \details An abstract class that provides the interface for .dwg to IGES format data conversion. */ class OdIgesImport : public OdRxObject { public: /** \details Contains .dwg to .iges format conversion results. */ enum ImportResult { /**The conversion is successfully done.*/ success, /**The conversion is failed.*/ fail, /**The password is incorrect.*/ bad_password, /**The file .dwg is invalid.*/ bad_file, /**The input .dwg database is invalid.*/ bad_database, /**The input file is encrypted.*/ encrypted_file }; /** \details A pure virtual method that provides an interface for conversion from a .dwg drawing to an .iges file. \returns The ImportResult::success value if the conversion process is successful; otherwise, the method returns an appropriate error code. \remarks Use the properties() method to set the conversion process options. */ virtual ImportResult import() = 0; /** \details A pure virtual method that provides an interface for the access to the properties of the .dwg to .iges conversion process. \returns A smart pointer to an Rx dictionary object that contains the conversion properties values. */ virtual OdRxDictionaryPtr properties() = 0; /** \details A pure virtual method that provides an interface for method which writes converted IGES model into a file with defined file name. \returns eOk if writing is successful; appropriate error code otherwise. */ virtual OdResult writeIgesFile(const OdString &fileName) = 0; }; /** \details A data type that represents a smart pointer to an object that is derived from the OdIgesImport class. */ typedef OdSmartPtr OdIgesImportPtr; /** \details An abstract class that provides the interface for the .dwg to .iges format data conversion module. */ class OdDwg2IgesModule : public OdRxModule { public: /** \details A pure virtual method that provides an interface for the creation of a new .dwg to .iges converter instance. \returns A smart pointer to the created object. */ virtual OdIgesImportPtr create() = 0; }; /** \details A data type that represents a smart pointer to an object that is derived from the OdDwg2IgesModule class. */ typedef OdSmartPtr OdDwg2IgesModulePtr; } #endif // _IGES_IMPORT_H_