qoccinputoutput.h

Go to the documentation of this file.
00001 /************************************************************************************
00002 **
00003 ** This file is part of the QtOPENCASCADE Toolkit.
00004 **
00005 ** Copyright (C) 2006, 2007, 2008 QtOCC Team Members
00006 **               Peter Dolbey, Marc Britten, Stephane Routelous
00007 **               Stefan Boeykens, Pawel Dobrolowski, Walter Steffe
00008 **               Álvaro Castro Castilla, Dirk Burski, Fotis Sioutis
00009 **
00010 ** This library is free software; you can redistribute it and/or
00011 ** modify it under the terms of the GNU Lesser General Public
00012 ** License as published by the Free Software Foundation; either
00013 ** version 2.1 of the License, or (at your option) any later version.
00014 ** 
00015 ** This library is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 ** Lesser General Public License for more details.
00019 ** 
00020 ** You should have received a copy of the GNU Lesser General Public
00021 ** License along with this library; if not, write to the Free Software
00022 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023 **
00024 ***********************************************************************************/
00025 #ifndef QOCCINPUTOUTPUT_H
00026 #define QOCCINPUTOUTPUT_H
00027 
00028 #include <QtCore/QObject>
00029 #include "qocc.h"
00030 
00031 class QOCC_DECLSPEC QoccInputOutput : public QObject
00032 {
00033         Q_OBJECT
00034 
00035 public:
00036 
00037     enum FileFormat{    FormatBREP, 
00038                                                 FormatIGES, 
00039                                                 FormatSTEP, 
00040                                                 FormatCSFDB, 
00041                                                 FormatVRML, 
00042                                                 FormatSTL       };
00043 
00044         QoccInputOutput(void);
00045         ~QoccInputOutput(void);
00046 
00047     bool importModel( const QString& fileName, 
00048                                           const FileFormat format, 
00049                                           const Handle(AIS_InteractiveContext)& ic );
00050 
00051     bool exportModel( const QString& fileName, 
00052                                           const FileFormat format, 
00053                                           const Handle(AIS_InteractiveContext)& ic);
00054 
00055         bool importMesh( const QString& fileName,
00056                                          const FileFormat format,
00057                                          const Handle(AIS_InteractiveContext)& ic );
00058 
00059 
00060     QString info() const;
00061 
00062 signals:
00063 
00064         void error (int errorCode, QString& errorDescription);
00065 
00066 private:
00067 
00068     Handle(TopTools_HSequenceOfShape)  importModel( const FileFormat format, 
00069                                                                                             const QString& fileName );
00070     bool                               exportModel( const FileFormat format, 
00071                                                                                                     const QString&,
00072                                                     const Handle_TopTools_HSequenceOfShape& );
00073         
00074     Handle(TopTools_HSequenceOfShape) getShapes( const Handle_AIS_InteractiveContext& oc);
00075 
00076         Handle(TopTools_HSequenceOfShape) importBREP ( const QString& );
00077 
00078         Handle(TopTools_HSequenceOfShape) importIGES ( const QString& );
00079         Handle(TopTools_HSequenceOfShape) importSTEP ( const QString& );
00080         Handle(TopTools_HSequenceOfShape) importCSFDB( const QString& );
00081 
00082         bool exportBREP ( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00083         bool exportIGES ( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00084         bool exportSTEP ( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00085         bool exportCSFDB( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00086         bool exportSTL  ( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00087         bool exportVRML ( const QString& fileName, const Handle(TopTools_HSequenceOfShape)& shapes );
00088 
00089     bool checkFacetedBrep( const Handle(TopTools_HSequenceOfShape)& );
00090 
00091         // Attributes
00092         
00093         QString myInfo;
00094 
00095 };
00096 
00097 #endif
00098 

Generated on Sat Feb 23 21:22:18 2008 for QtGEOM by  doxygen 1.4.7