1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : libGeometry_Swig.i
21 // Created : Tue Mar 26 15:04:48 2002
22 // Author : Nicolas REJNERI, Paul RASCLE
29 #include "libGEOM_Swig.h"
33 managing C++ exception in the Python API
37 class PyAllowThreadsGuard {
39 // Py_BEGIN_ALLOW_THREADS
40 PyAllowThreadsGuard() { _save = PyEval_SaveThread(); }
41 // Py_END_ALLOW_THREADS
42 ~PyAllowThreadsGuard() { PyEval_RestoreThread(_save); }
47 PyAllowThreadsGuard guard;
58 void createAndDisplayGO( const char* theEntry, bool theUpdateViewer = true );
59 void createAndDisplayFitAllGO( const char* theEntry );
60 void eraseGO( const char* theEntry, bool theUpdateViewer = true );
64 void setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer = true );
65 void setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
66 void setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
67 void setNameMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
68 void setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer = true );
69 void setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer = true );
70 void setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer = true );
71 void setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer = true );
72 void setMaterial( const char* theEntry, const char* theMaterial, bool theUpdateViewer = true );
73 void setMaterialProperty( const char* theEntry, const char* theMaterial, bool theUpdateViewer = true );
75 int getIndexTopology( const char* theSubIOR, const char* theMainIOR );
76 const char* getShapeTypeString( const char* theIOR );
77 const char* getShapeTypeIcon( const char* theIOR );