|
||||
File indexing completed on 2025-01-18 10:05:05
0001 // Copyright (c) 2022 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _STEPCAFControl_Provider_HeaderFile 0015 #define _STEPCAFControl_Provider_HeaderFile 0016 0017 #include <DE_Provider.hxx> 0018 #include <STEPCAFControl_ConfigurationNode.hxx> 0019 0020 //! The class to transfer STEP files. 0021 //! Reads and Writes any STEP files into/from OCCT. 0022 //! Each operation needs configuration node. 0023 //! 0024 //! Providers grouped by Vendor name and Format type. 0025 //! The Vendor name is "OCC" 0026 //! The Format type is "STEP" 0027 //! The import process is supported. 0028 //! The export process is supported. 0029 class STEPCAFControl_Provider : public DE_Provider 0030 { 0031 public: 0032 DEFINE_STANDARD_RTTIEXT(STEPCAFControl_Provider, DE_Provider) 0033 0034 public: 0035 0036 //! Default constructor 0037 //! Configure translation process with global configuration 0038 Standard_EXPORT STEPCAFControl_Provider(); 0039 0040 //! Configure translation process 0041 //! @param[in] theNode object to copy 0042 Standard_EXPORT STEPCAFControl_Provider(const Handle(DE_ConfigurationNode)& theNode); 0043 0044 public: 0045 0046 //! Reads a CAD file, according internal configuration 0047 //! @param[in] thePath path to the import CAD file 0048 //! @param[out] theDocument document to save result 0049 //! @param[in] theWS current work session 0050 //! @param theProgress[in] progress indicator 0051 //! @return true if Read operation has ended correctly 0052 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0053 const Handle(TDocStd_Document)& theDocument, 0054 Handle(XSControl_WorkSession)& theWS, 0055 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0056 0057 //! Writes a CAD file, according internal configuration 0058 //! @param[in] thePath path to the export CAD file 0059 //! @param[out] theDocument document to export 0060 //! @param[in] theWS current work session 0061 //! @param theProgress[in] progress indicator 0062 //! @return true if Write operation has ended correctly 0063 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0064 const Handle(TDocStd_Document)& theDocument, 0065 Handle(XSControl_WorkSession)& theWS, 0066 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0067 0068 //! Reads a CAD file, according internal configuration 0069 //! @param[in] thePath path to the import CAD file 0070 //! @param[out] theDocument document to save result 0071 //! @param theProgress[in] progress indicator 0072 //! @return true if Read operation has ended correctly 0073 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0074 const Handle(TDocStd_Document)& theDocument, 0075 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0076 0077 //! Writes a CAD file, according internal configuration 0078 //! @param[in] thePath path to the export CAD file 0079 //! @param[out] theDocument document to export 0080 //! @param theProgress[in] progress indicator 0081 //! @return true if Write operation has ended correctly 0082 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0083 const Handle(TDocStd_Document)& theDocument, 0084 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0085 0086 //! Reads a CAD file, according internal configuration 0087 //! @param[in] thePath path to the import CAD file 0088 //! @param[out] theShape shape to save result 0089 //! @param[in] theWS current work session 0090 //! @param theProgress[in] progress indicator 0091 //! @return true if Read operation has ended correctly 0092 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0093 TopoDS_Shape& theShape, 0094 Handle(XSControl_WorkSession)& theWS, 0095 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0096 0097 //! Writes a CAD file, according internal configuration 0098 //! @param[in] thePath path to the export CAD file 0099 //! @param[out] theShape shape to export 0100 //! @param[in] theWS current work session 0101 //! @param theProgress[in] progress indicator 0102 //! @return true if Write operation has ended correctly 0103 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0104 const TopoDS_Shape& theShape, 0105 Handle(XSControl_WorkSession)& theWS, 0106 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0107 0108 //! Reads a CAD file, according internal configuration 0109 //! @param[in] thePath path to the import CAD file 0110 //! @param[out] theShape shape to save result 0111 //! @param theProgress[in] progress indicator 0112 //! @return true if Read operation has ended correctly 0113 Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, 0114 TopoDS_Shape& theShape, 0115 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0116 0117 //! Writes a CAD file, according internal configuration 0118 //! @param[in] thePath path to the export CAD file 0119 //! @param[out] theShape shape to export 0120 //! @param theProgress[in] progress indicator 0121 //! @return true if Write operation has ended correctly 0122 Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, 0123 const TopoDS_Shape& theShape, 0124 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; 0125 0126 public: 0127 0128 //! Gets CAD format name of associated provider 0129 //! @return provider CAD format 0130 Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; 0131 0132 //! Gets provider's vendor name of associated provider 0133 //! @return provider's vendor name 0134 Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; 0135 0136 private: 0137 0138 //! Personizes work session with current format. 0139 //! Creates new temporary session if current session is null 0140 //! @param[in] theWS current work session 0141 void personizeWS(Handle(XSControl_WorkSession)& theWS); 0142 0143 }; 0144 0145 #endif // _STEPCAFControl_Provider_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |