Version: 9.12.0
libGEOM_Swig.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File : libGEOM_Swig.h
23 // Author : Nicolas REJNERI, Paul RASCLE
24 
25 #ifndef LIBGEOM_SWIG_H
26 #define LIBGEOM_SWIG_H
27 
28 #include "GEOM_GEOMGUI.hxx"
29 #include <vector>
30 
33 
34 class GEOM_Swig
35 {
36 public:
37  GEOMGUI_EXPORT GEOM_Swig( bool updateOB = true );
39 
40  GEOMGUI_EXPORT void createAndDisplayGO( const char* theEntry, bool theUpdateViewer = true );
41  GEOMGUI_EXPORT void createAndDisplayFitAllGO( const char* theEntry );
42  GEOMGUI_EXPORT void eraseGO( const char* theEntry, bool theUpdateViewer = true );
43 
45 
46  GEOMGUI_EXPORT void setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer = true );
47  GEOMGUI_EXPORT void setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
48  GEOMGUI_EXPORT void setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
49  GEOMGUI_EXPORT void setNameMode( const char* theEntry, bool theOn, bool theUpdateViewer = true );
50  GEOMGUI_EXPORT void setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer = true );
51  GEOMGUI_EXPORT void setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer = true );
52  GEOMGUI_EXPORT void setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer = true );
53  GEOMGUI_EXPORT void setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer = true );
54  GEOMGUI_EXPORT void setMaterial( const char* theEntry, const char* theMaterial, bool theUpdateViewer = true );
55  GEOMGUI_EXPORT void setMaterialProperty( const char* theEntry, const char* theMaterial, bool theUpdateViewer = true );
56 
57  GEOMGUI_EXPORT void initLocalSelection( const char* theEntry, int theMode);
58  GEOMGUI_EXPORT std::vector<int> getLocalSelection();
60 
61  GEOMGUI_EXPORT int getIndexTopology( const char* theSubIOR, const char* theMainIOR );
62  GEOMGUI_EXPORT const char* getShapeTypeString( const char* theIOR );
63  GEOMGUI_EXPORT const char* getShapeTypeIcon( const char* theIOR );
64 
66 
69 
70 private:
71  void init( bool updateOB );
72 };
73 
74 #endif // LIBGEOM_SWIG_H
#define GEOMGUI_EXPORT
Definition: GEOM_GEOMGUI.hxx:36
Definition: GEOMGUI_OCCSelector.h:35
Definition: GEOM_Swig_LocalSelector.h:34
Definition: libGEOM_Swig.h:35
GEOMGUI_EXPORT const char * getShapeTypeIcon(const char *theIOR)
Get shape's icon ID (specified by its type)
Definition: libGEOM_Swig.cxx:288
GEOMGUI_EXPORT void createAndDisplayFitAllGO(const char *theEntry)
Same as createAndDisplayGO, but also fits the active view to the contents.
Definition: libGEOM_Swig.cxx:154
GEOMGUI_EXPORT void UpdateViewer()
Update active viewer contents.
Definition: libGEOM_Swig.cxx:209
GEOMGUI_EXPORT void setColor(const char *theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer=true)
Change color of the presentation.
Definition: libGEOM_Swig.cxx:423
GEOMGUI_EXPORT void setNameMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide name of shape for the presentation.
Definition: libGEOM_Swig.cxx:409
GEOMGUI_EXPORT void setIsos(const char *theEntry, int theNbU, int theNbV, bool theUpdateViewer=true)
Set number of iso-lines to the presentation.
Definition: libGEOM_Swig.cxx:436
GEOMGUI_EXPORT bool initGeomGen()
Initialize GEOM module's engine.
Definition: libGEOM_Swig.cxx:623
GEOMGUI_EXPORT void createAndDisplayGO(const char *theEntry, bool theUpdateViewer=true)
Display the presenation in the currently active view.
Definition: libGEOM_Swig.cxx:128
GEOMGUI_EXPORT GEOM_Swig(bool updateOB=true)
Constructor.
Definition: libGEOM_Swig.cxx:59
GEOMGUI_EXPORT const char * getShapeTypeString(const char *theIOR)
Get shape type name.
Definition: libGEOM_Swig.cxx:261
GEOMGUI_EXPORT std::vector< int > getLocalSelection()
get local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:560
GEOMGUI_EXPORT void setVectorsMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide edges direction vectors for the presentation.
Definition: libGEOM_Swig.cxx:385
GEOMGUI_EXPORT void setTransparency(const char *theEntry, float theTransparency, bool theUpdateViewer=true)
Set transparency of the presentation.
Definition: libGEOM_Swig.cxx:449
GEOMGUI_EXPORT void setMaterial(const char *theEntry, const char *theMaterial, bool theUpdateViewer=true)
Set material to the presentation.
Definition: libGEOM_Swig.cxx:473
GEOMGUI_EXPORT void initLocalSelection(const char *theEntry, int theMode)
initialize local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:498
GEOMGUI_EXPORT void closeLocalSelection()
close local subShapes selection on a given shape
Definition: libGEOM_Swig.cxx:585
GEOMGUI_EXPORT void setMaterialProperty(const char *theEntry, const char *theMaterial, bool theUpdateViewer=true)
Set material property to the presentation.
Definition: libGEOM_Swig.cxx:487
GEOMGUI_EXPORT ~GEOM_Swig()
Destructor.
Definition: libGEOM_Swig.cxx:67
GEOMGUI_EXPORT void eraseGO(const char *theEntry, bool theUpdateViewer=true)
Erase presentation in the currently active viewer.
Definition: libGEOM_Swig.cxx:185
static GEOMGUI_OCCSelector * myOCCSelector
Definition: libGEOM_Swig.h:68
void init(bool updateOB)
Internal initialization.
Definition: libGEOM_Swig.cxx:74
GEOMGUI_EXPORT void setDisplayMode(const char *theEntry, int theMode, bool theUpdateViewer=true)
Set display mode to the presentation.
Definition: libGEOM_Swig.cxx:373
GEOMGUI_EXPORT void setVerticesMode(const char *theEntry, bool theOn, bool theUpdateViewer=true)
Show / hide vertices for the presentation.
Definition: libGEOM_Swig.cxx:397
GEOMGUI_EXPORT int getIndexTopology(const char *theSubIOR, const char *theMainIOR)
Get sub-shape index inside main shape.
Definition: libGEOM_Swig.cxx:231
static GEOM_Swig_LocalSelector * myLocalSelector
Definition: libGEOM_Swig.h:67
GEOMGUI_EXPORT void setDeflection(const char *theEntry, float theDeflection, bool theUpdateViewer=true)
Set deflection coefficient of the presentation.
Definition: libGEOM_Swig.cxx:461